/*
Theme Name: Matchstone Blog
Theme URI: https://matchstone.fr
Description: Thème du blog de Matchstone, fidèle au site principal matchstone.fr (en-tête, pied de page, couleurs, typographie). Interface en français.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matchstone-blog
Tags: blog, one-column, custom-logo, threaded-comments
*/

/* ==========================================================================
   1. Polices (hébergées dans le thème, licence OFL — voir assets/fonts)
   Le site utilise Inter (texte) et Petrona (titres).
   ========================================================================== */
@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
	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: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
	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;
}
@font-face {
	font-family: "Petrona";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/petrona-latin-wght-normal.woff2") format("woff2");
	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: "Petrona";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/petrona-latin-ext-wght-normal.woff2") format("woff2");
	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;
}

/* ==========================================================================
   2. Couleurs et mesures — valeurs prélevées dans la feuille de style de
   matchstone.fr (variables --background, --primary, etc.)
   ========================================================================== */
:root {
	--ms-bg: #0c102b;                          /* fond du site (--background) */
	--ms-fg: #ffffff;                          /* texte principal (--foreground) */
	--ms-primary: #f4d595;                     /* doré, couleur d'accent visible (--primary) */
	--ms-accent: #3784f4;                      /* bleu défini par le site (--accent), non utilisé sur les pages blog */
	--ms-muted: rgba(255, 255, 255, 0.6);      /* texte secondaire (--muted-foreground) */
	--ms-muted-70: rgba(255, 255, 255, 0.42);  /* texte secondaire à 70 % (dates des cartes) */
	--ms-border: rgba(255, 255, 255, 0.2);     /* bordures (--border) */
	--ms-card: rgba(255, 255, 255, 0.05);      /* fonds de cartes (--card) */
	--ms-panel: #111536;                       /* menus déroulants et menu mobile */
	--ms-header-scrolled: rgba(12, 16, 43, 0.65);
	--ms-gold-15: rgba(244, 213, 149, 0.15);
	--ms-gold-40: rgba(244, 213, 149, 0.4);
	--ms-gold-50: rgba(244, 213, 149, 0.5);
	--ms-prose: #d1d5db;                       /* texte des articles */
	--ms-radius: 5px;
	--ms-radius-pill: 16px;
	--ms-radius-box: 12px;
	--ms-font-sans: "Inter", Arial, Helvetica, sans-serif;
	--ms-font-serif: "Petrona", Georgia, "Times New Roman", serif;
	--ms-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   3. Base
   ========================================================================== */
*,
*::before,
*::after {
	box-sizing: border-box;
	border: 0 solid;
	margin: 0;
	padding: 0;
}

html {
	height: 100%;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	scroll-padding-top: 88px;
}

body {
	min-height: 100%;
	display: flex;
	flex-direction: column;
	background-color: var(--ms-bg);
	color: var(--ms-fg);
	font-family: var(--ms-font-sans);
	font-size: 16px;
	line-height: 1.5;
	overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ms-font-serif);
	font-weight: 600;
	font-size: inherit;
}

a {
	color: inherit;
	text-decoration: inherit;
}

img,
svg,
video,
iframe {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
	background: transparent;
	letter-spacing: inherit;
}

button {
	cursor: pointer;
}

ul,
ol {
	list-style: none;
}

:focus-visible {
	outline: 2px solid var(--ms-primary);
	outline-offset: 2px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	top: 8px;
	left: 8px;
	z-index: 100;
	padding: 8px 16px;
	background: var(--ms-panel);
	color: var(--ms-fg);
	border-radius: var(--ms-radius);
}

.ms-gold {
	color: var(--ms-primary);
}

/* ==========================================================================
   4. Boutons (styles repris des boutons du site)
   ========================================================================== */
.ms-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-family: var(--ms-font-sans);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	white-space: nowrap;
	border-radius: var(--ms-radius);
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	cursor: pointer;
}

/* « LISTE D'ATTENTE » */
.ms-btn--outline {
	border: 1px solid var(--ms-fg);
	color: var(--ms-fg);
	background: transparent;
	padding: 6px 16px;
	font-size: 12px;
	line-height: 1.5;
}

.ms-btn--outline:hover {
	background: rgba(255, 255, 255, 0.1);
}

/* « DEMANDER MON INVITATION » */
.ms-btn--primary {
	background: var(--ms-primary);
	color: #0c102b;
	padding: 10px 24px;
	font-size: 14px;
	line-height: 1.5;
}

.ms-btn--primary:hover {
	background: rgba(244, 213, 149, 0.9);
}

/* ==========================================================================
   5. En-tête
   Fixe, transparent en haut de page, fond flouté + filet doré au défilement.
   Menu complet à partir de 1180 px (et seulement s'il tient : voir header.js),
   menu burger en dessous. Le logo et le titre ne peuvent jamais chevaucher le menu.
   ========================================================================== */
.ms-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	background-color: transparent;
	transition: background-color 0.3s cubic-bezier(0, 0, 0.2, 1), backdrop-filter 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.admin-bar .ms-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .ms-header {
		top: 46px;
	}
}

.ms-header.is-scrolled {
	background-color: var(--ms-header-scrolled);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.ms-nav {
	max-width: 1280px;
	margin: 0 auto;
	padding: 8px 24px;
	min-height: 64px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ms-header__line {
	margin: 0 24px;
	height: 1px;
	background: var(--ms-gold-40);
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.ms-header.is-scrolled .ms-header__line {
	opacity: 1;
}

/* Logo / titre */
.ms-brand {
	display: flex;
	align-items: center;
	flex: 0 1 auto;
	min-width: 0;
	max-width: calc(100% - 64px);
}

.ms-logo__img {
	display: block;
	width: auto;
	height: auto;
	max-width: 160px;
	max-height: 40px;
}

.ms-logo__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	font-family: var(--ms-font-serif);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.2;
	color: var(--ms-primary);
	overflow-wrap: anywhere;
}

/* Menu bureau */
.ms-menu {
	display: none;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	white-space: nowrap;
}

.ms-menu__item {
	position: relative;
}

.ms-menu__link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 8px 12px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease;
}

.ms-menu__link:hover,
.ms-menu__link.is-active,
.ms-has-sub.is-open > .ms-sub-toggle {
	color: var(--ms-fg);
}

/* Onglet actif (« Blog ») : matchstone.fr ne distingue pas l'onglet actif ;
   on lui applique l'état « survol » du site (texte blanc).
   Pour un rendu strictement identique (onglet gris), supprimez « .ms-menu__link.is-active, » ci-dessus
   et « .ms-mobile__link.is-active, » plus bas. */

.ms-chevron {
	width: 12px;
	height: 12px;
	transition: transform 0.15s ease;
}

.ms-has-sub.is-open .ms-chevron {
	transform: rotate(180deg);
}

.ms-sub {
	display: none;
	position: absolute;
	left: 0;
	top: 100%;
	padding-top: 12px;
	white-space: normal;
}

.ms-has-sub.is-open > .ms-sub {
	display: block;
}

@media (hover: hover) {
	.ms-has-sub:hover > .ms-sub {
		display: block;
	}
	.ms-has-sub:hover > .ms-sub-toggle {
		color: var(--ms-fg);
	}
	.ms-has-sub:hover .ms-chevron {
		transform: rotate(180deg);
	}
}

.ms-sub__panel {
	min-width: 280px;
	padding: 8px 0;
	background: var(--ms-panel);
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
	box-shadow: var(--ms-shadow);
}

.ms-sub__link {
	display: block;
	padding: 8px 16px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease, background-color 0.15s ease;
}

.ms-sub__link:hover {
	color: var(--ms-fg);
	background: rgba(255, 255, 255, 0.05);
}

.ms-actions {
	display: none;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

/* Burger */
.ms-burger {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 8px;
	flex: 0 0 auto;
}

.ms-burger span {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--ms-fg);
}

/* Menu mobile */
.ms-mobile {
	background: var(--ms-panel);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
	box-shadow: var(--ms-shadow);
	max-height: calc(100vh - 65px);
	overflow-y: auto;
}

.ms-mobile[hidden] {
	display: none;
}

.ms-mobile__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ms-mobile__link {
	display: inline-flex;
	font-size: 16px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease;
	text-align: left;
}

.ms-mobile__toggle {
	width: 100%;
	align-items: center;
	justify-content: space-between;
}

.ms-mobile__link:hover,
.ms-mobile__link.is-active {
	color: var(--ms-fg);
}

.ms-mobile__toggle[aria-expanded="true"] .ms-chevron {
	transform: rotate(180deg);
}

.ms-mobile__sub {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-left: 16px;
	border-left: 1px solid var(--ms-border);
}

.ms-mobile__sub[hidden] {
	display: none;
}

.ms-mobile__sublink {
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease;
}

.ms-mobile__sublink:hover {
	color: var(--ms-fg);
}

.ms-mobile__actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Bascule bureau (≥ 1180 px, sauf si header.js détecte que le menu ne tient pas) */
@media (min-width: 1180px) {
	.ms-header:not(.is-compact) .ms-menu,
	.ms-header:not(.is-compact) .ms-actions {
		display: flex;
	}
	.ms-header:not(.is-compact) .ms-burger,
	.ms-header:not(.is-compact) .ms-mobile {
		display: none;
	}
	.ms-header:not(.is-compact) .ms-brand {
		flex: 0 0 auto;
		max-width: 260px;
	}
}

/* ==========================================================================
   6. Mise en page
   ========================================================================== */
.ms-main {
	flex: 1 0 auto;
	width: 100%;
	padding: 96px 24px;
}

.ms-main--wide {
	max-width: 1280px;
	margin: 0 auto;
}

.ms-main--page {
	padding-top: 128px;
	padding-bottom: 96px;
}

@media (min-width: 1024px) {
	.ms-main {
		padding: 128px 64px;
	}
	.ms-main--page {
		padding-top: 160px;
		padding-bottom: 96px;
	}
}

.ms-narrow {
	max-width: 768px;
	margin: 0 auto;
}

/* ==========================================================================
   7. En-tête des listes (blog, catégories, recherche)
   ========================================================================== */
.ms-intro {
	margin-bottom: 56px;
}

.ms-eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 16px;
	font-size: 12px;
	line-height: 1.5;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--ms-primary);
	font-weight: 600;
}

.ms-eyebrow__line {
	height: 1px;
	width: 40px;
	flex-shrink: 0;
	background: var(--ms-gold-40);
}

.ms-h1 {
	font-size: 44px;
	line-height: 1.15;
	margin-bottom: 20px;
}

.ms-intro__text {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 768px;
	color: var(--ms-muted);
	line-height: 1.625;
}

.ms-intro__text > * {
	margin: 0;
}

/* Pastilles de catégories */
.ms-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 48px;
}

.ms-pill {
	padding: 8px 16px;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius-pill);
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.ms-pill:hover {
	color: var(--ms-fg);
}

.ms-pill.is-active {
	border-color: var(--ms-primary);
	color: var(--ms-primary);
}

/* ==========================================================================
   8. Cartes d'articles
   ========================================================================== */
.ms-grid {
	display: grid;
	gap: 32px;
}

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

@media (min-width: 1024px) {
	.ms-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.ms-card-wrap {
	height: 100%;
}

.ms-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 12px;
	border: 1px solid var(--ms-gold-15);
	border-radius: var(--ms-radius);
	background: rgba(255, 255, 255, 0.03);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ms-card:hover {
	border-color: var(--ms-gold-40);
	background: rgba(255, 255, 255, 0.06);
}

.ms-media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
	background: var(--ms-card);
}

.ms-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ms-card .ms-media {
	margin-bottom: 16px;
}

.ms-card .ms-media img {
	transition: transform 0.3s ease;
}

.ms-card:hover .ms-media img {
	transform: scale(1.05);
}

.ms-kicker {
	display: inline-block;
	margin-bottom: 8px;
	font-size: 11px;
	line-height: 1.5;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--ms-primary);
	font-weight: 600;
}

.ms-card__title {
	font-size: 18px;
	line-height: 1.3;
	color: var(--ms-fg);
	margin-bottom: 8px;
	transition: color 0.15s ease;
}

.ms-card:hover .ms-card__title {
	color: var(--ms-primary);
}

.ms-card__excerpt {
	font-size: 14px;
	line-height: 1.625;
	color: var(--ms-muted);
	margin-bottom: 16px;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.ms-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	font-size: 12px;
	line-height: 1.5;
	color: var(--ms-muted-70);
}

.ms-empty {
	color: var(--ms-muted);
	line-height: 1.625;
}

/* Pagination (même style que les pastilles) */
.ms-pagination {
	margin-top: 48px;
}

.ms-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.ms-pagination .page-numbers {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius-pill);
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease;
}

.ms-pagination a.page-numbers:hover {
	color: var(--ms-fg);
}

.ms-pagination .page-numbers.current {
	border-color: var(--ms-primary);
	color: var(--ms-primary);
}

.ms-pagination .page-numbers.dots {
	border-color: transparent;
}

/* « Nos catégories éditoriales » */
.ms-cats {
	margin-top: 96px;
	padding-top: 64px;
	border-top: 1px solid var(--ms-border);
}

.ms-section-title {
	font-size: 30px;
	line-height: 1.2;
	margin-bottom: 32px;
}

.ms-cats__grid {
	display: grid;
	gap: 24px;
}

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

.ms-cat {
	display: block;
	padding: 24px;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
	background: var(--ms-card);
	transition: border-color 0.15s ease;
}

@media (min-width: 1024px) {
	.ms-cat {
		padding: 32px;
	}
}

.ms-cat:hover {
	border-color: var(--ms-gold-50);
}

.ms-cat__title {
	font-size: 18px;
	line-height: 1.5;
	color: var(--ms-primary);
	margin-bottom: 8px;
}

.ms-cat__desc {
	font-size: 14px;
	line-height: 1.625;
	color: var(--ms-muted);
}

/* ==========================================================================
   9. Article seul
   ========================================================================== */
.ms-back {
	display: inline-block;
	margin-bottom: 32px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
	transition: color 0.15s ease;
}

.ms-back:hover {
	color: var(--ms-fg);
}

.ms-article__head {
	margin-bottom: 40px;
}

.ms-article__head .ms-kicker {
	margin-bottom: 16px;
}

.ms-article__title {
	font-size: 40px;
	line-height: 1.15;
	margin-bottom: 20px;
}

.ms-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ms-muted);
}

.ms-article__media {
	margin-bottom: 48px;
}

/* Contenu des articles (typographie « prose » du site) */
.ms-prose {
	color: var(--ms-prose);
	font-size: 16px;
	line-height: 1.75;
}

.ms-prose > :first-child {
	margin-top: 0;
}

.ms-prose > :last-child {
	margin-bottom: 0;
}

.ms-prose p {
	margin: 1.25em 0;
}

.ms-prose a {
	color: var(--ms-primary);
	font-weight: 500;
	text-decoration: none;
}

.ms-prose a:hover {
	text-decoration: underline;
}

.ms-prose strong,
.ms-prose b {
	color: var(--ms-fg);
	font-weight: 600;
}

.ms-prose h1,
.ms-prose h2,
.ms-prose h3,
.ms-prose h4,
.ms-prose h5,
.ms-prose h6 {
	color: var(--ms-fg);
	font-family: var(--ms-font-serif);
}

.ms-prose h1 {
	font-size: 60px;
	font-weight: 800;
	line-height: 1.111;
	margin: 0 0 0.889em;
}

.ms-prose h2 {
	font-size: 48px;
	font-weight: 700;
	line-height: 1.333;
	margin: 2em 0 1em;
}

.ms-prose h3 {
	font-size: 30px;
	font-weight: 600;
	line-height: 1.6;
	margin: 1.6em 0 0.6em;
}

.ms-prose h4 {
	font-size: 25px;
	font-weight: 600;
	line-height: 1.5;
	margin: 1.5em 0 0.5em;
}

.ms-prose h5,
.ms-prose h6 {
	font-size: 1em;
	font-weight: 600;
	margin: 1.5em 0 0.5em;
}

.ms-prose h2 + *,
.ms-prose h3 + *,
.ms-prose h4 + * {
	margin-top: 0;
}

.ms-prose ul,
.ms-prose ol {
	margin: 1.25em 0;
	padding-left: 1.625em;
}

.ms-prose ul {
	list-style: disc;
}

.ms-prose ol {
	list-style: decimal;
}

.ms-prose li {
	margin: 0.5em 0;
	padding-left: 0.375em;
}

.ms-prose ul > li::marker {
	color: #4b5563;
}

.ms-prose ol > li::marker {
	color: #9ca3af;
	font-weight: 400;
}

.ms-prose li > ul,
.ms-prose li > ol {
	margin: 0.75em 0;
}

.ms-prose blockquote {
	margin: 1.6em 0;
	padding-left: 1em;
	border-left: 0.25rem solid #374151;
	color: #f3f4f6;
	font-weight: 500;
	font-style: italic;
	quotes: "\201C" "\201D" "\2018" "\2019";
}

.ms-prose blockquote p:first-of-type::before {
	content: open-quote;
}

.ms-prose blockquote p:last-of-type::after {
	content: close-quote;
}

.ms-prose blockquote cite {
	display: block;
	margin-top: 0.5em;
	font-size: 0.875em;
	font-style: normal;
	color: #9ca3af;
}

.ms-prose hr {
	border-top: 1px solid #374151;
	margin: 3em 0;
}

.ms-prose img,
.ms-prose video,
.ms-prose figure {
	margin: 2em 0;
}

.ms-prose img {
	border-radius: var(--ms-radius);
}

.ms-prose figure > * {
	margin-top: 0;
	margin-bottom: 0;
}

.ms-prose figcaption,
.ms-prose .wp-caption-text {
	margin-top: 0.857em;
	color: #9ca3af;
	font-size: 0.875em;
	line-height: 1.43;
}

.ms-prose code {
	color: var(--ms-fg);
	font-weight: 600;
	font-size: 0.875em;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.ms-prose :not(pre) > code::before,
.ms-prose :not(pre) > code::after {
	content: "`";
}

.ms-prose pre {
	margin: 1.714em 0;
	padding: 0.857em 1.143em;
	overflow-x: auto;
	background: rgba(0, 0, 0, 0.5);
	color: var(--ms-prose);
	font-size: 0.875em;
	line-height: 1.714;
	border-radius: 0.375rem;
}

.ms-prose pre code {
	font-weight: 400;
	font-size: inherit;
	color: inherit;
}

.ms-prose table {
	width: 100%;
	margin: 2em 0;
	border-collapse: collapse;
	font-size: 0.875em;
	line-height: 1.714;
	text-align: left;
}

.ms-prose .wp-block-table thead,
.ms-prose .wp-block-table tfoot {
	border: 0;
}

.ms-prose table th,
.ms-prose table td {
	border: 0;
	border-bottom: 1px solid #374151;
	padding: 0.571em;
	vertical-align: top;
	text-align: left;
}

.ms-prose table thead th {
	color: var(--ms-fg);
	font-weight: 600;
	border-bottom-color: #4b5563;
	padding-top: 0;
}

.ms-prose .alignleft {
	float: left;
	margin: 0.5em 1.5em 1em 0;
}

.ms-prose .alignright {
	float: right;
	margin: 0.5em 0 1em 1.5em;
}

.ms-prose .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.ms-prose::after {
	content: "";
	display: table;
	clear: both;
}

.ms-prose .wp-block-button__link {
	display: inline-flex;
	background: var(--ms-primary);
	color: #0c102b;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	border-radius: var(--ms-radius);
	text-decoration: none;
}

.ms-prose .wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ms-fg);
	border: 1px solid var(--ms-fg);
}

.ms-prose .wp-block-button__link:hover {
	text-decoration: none;
	background: rgba(244, 213, 149, 0.9);
}

.ms-prose iframe,
.ms-prose embed,
.ms-prose object {
	max-width: 100%;
}

.ms-page-links {
	margin-top: 32px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	color: var(--ms-muted);
	font-size: 14px;
}

.ms-page-links a,
.ms-page-links > .post-page-numbers {
	padding: 4px 12px;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius-pill);
}

.ms-page-links .current {
	border-color: var(--ms-primary);
	color: var(--ms-primary);
}

/* ==========================================================================
   10. Pages (même rendu que « Mentions légales » sur matchstone.fr)
   ========================================================================== */
.ms-page__title {
	font-size: 36px;
	line-height: 1.2;
	color: var(--ms-primary);
	margin-bottom: 48px;
}

.ms-page-content {
	color: var(--ms-muted);
	font-size: 16px;
	line-height: 1.625;
}

.ms-page-content > :first-child {
	margin-top: 0;
}

.ms-page-content p {
	margin: 0 0 20px;
}

.ms-page-content h2,
.ms-page-content h3,
.ms-page-content h4 {
	color: var(--ms-fg);
	font-family: var(--ms-font-serif);
	font-weight: 600;
	margin: 48px 0 16px;
}

.ms-page-content h2 {
	font-size: 20px;
	line-height: 1.5;
}

.ms-page-content h3 {
	font-size: 18px;
	line-height: 1.5;
}

.ms-page-content h4 {
	font-size: 16px;
	line-height: 1.5;
}

.ms-page-content strong,
.ms-page-content b {
	color: var(--ms-fg);
	font-weight: 500;
}

.ms-page-content a {
	color: var(--ms-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color 0.15s ease;
}

.ms-page-content a:hover {
	color: var(--ms-fg);
}

.ms-page-content ul,
.ms-page-content ol {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-left: 20px;
	margin: 0 0 20px;
}

.ms-page-content ul {
	list-style: disc outside;
}

.ms-page-content ol {
	list-style: decimal outside;
}

.ms-page-content li::marker {
	color: var(--ms-primary);
}

.ms-page-content img,
.ms-page-content figure {
	margin: 32px 0;
	border-radius: var(--ms-radius);
}

.ms-page-content blockquote {
	margin: 0 0 20px;
	padding-left: 16px;
	border-left: 1px solid var(--ms-border);
}

.ms-page-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 20px;
	font-size: 14px;
}

.ms-page-content th,
.ms-page-content td {
	border-bottom: 1px solid var(--ms-border);
	padding: 8px;
	text-align: left;
}

.ms-page-content th {
	color: var(--ms-fg);
	font-weight: 500;
}

/* ==========================================================================
   11. Recherche, 404
   ========================================================================== */
.ms-search {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	max-width: 560px;
	padding: 6px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--ms-radius-box);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

@media (min-width: 640px) {
	.ms-search {
		flex-direction: row;
	}
}

.ms-search__input {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ms-fg);
	border: 0;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}

.ms-search__input::placeholder {
	color: rgba(255, 255, 255, 0.4);
}

.ms-search__input::-webkit-search-cancel-button {
	filter: invert(1);
}

.ms-search:focus-within {
	border-color: var(--ms-gold-40);
}

.ms-search-wrap {
	margin-bottom: 48px;
}

.ms-404 {
	min-height: 50vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 40px;
	text-align: center;
}

.ms-404__row {
	display: flex;
	align-items: center;
	justify-content: center;
}

.ms-404__code {
	font-size: 24px;
	font-weight: 500;
	line-height: 49px;
	padding-right: 23px;
	margin-right: 20px;
	border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.ms-404__msg {
	font-family: var(--ms-font-serif);
	font-size: 14px;
	line-height: 49px;
}

.ms-404 .ms-search {
	margin: 0 auto;
}

.ms-404 .ms-back {
	margin-bottom: 0;
}

/* ==========================================================================
   12. Commentaires
   ========================================================================== */
.ms-comments {
	margin-top: 64px;
	padding-top: 48px;
	border-top: 1px solid var(--ms-border);
}

.ms-comments__title {
	font-size: 30px;
	line-height: 1.2;
	margin-bottom: 32px;
}

.ms-comment-list,
.ms-comment-list .children {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.ms-comment-list .children {
	margin-top: 16px;
	padding-left: 24px;
	border-left: 1px solid var(--ms-border);
}

.ms-comment__body {
	padding: 20px;
	border: 1px solid var(--ms-gold-15);
	border-radius: var(--ms-radius);
	background: rgba(255, 255, 255, 0.03);
}

.ms-comment__head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.ms-comment__avatar {
	border-radius: 50%;
	flex-shrink: 0;
}

.ms-comment__author {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--ms-fg);
}

.ms-comment__author a:hover {
	color: var(--ms-primary);
}

.ms-comment__date {
	display: block;
	font-size: 12px;
	color: var(--ms-muted-70);
}

.ms-comment__date a:hover {
	color: var(--ms-fg);
}

.ms-comment__pending {
	font-size: 13px;
	color: var(--ms-primary);
	margin-bottom: 8px;
}

.ms-comment__content {
	font-size: 15px;
	line-height: 1.7;
	color: var(--ms-prose);
}

.ms-comment__content p + p {
	margin-top: 0.8em;
}

.ms-comment__content a {
	color: var(--ms-primary);
}

.ms-comment__actions {
	display: flex;
	gap: 16px;
	margin-top: 12px;
	font-size: 13px;
}

.ms-comment__actions a {
	color: var(--ms-primary);
}

.ms-comment__actions a:hover {
	text-decoration: underline;
}

.ms-comments__closed {
	color: var(--ms-muted);
	margin-top: 24px;
}

.ms-comments .comment-respond {
	margin-top: 48px;
}

.ms-comments .comment-reply-title {
	font-size: 24px;
	line-height: 1.2;
	margin-bottom: 16px;
}

.ms-comments .comment-reply-title small {
	display: block;
	margin-top: 8px;
	font-family: var(--ms-font-sans);
	font-size: 13px;
	font-weight: 400;
}

.ms-comments .comment-reply-title small a {
	color: var(--ms-primary);
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form .must-log-in {
	font-size: 13px;
	color: var(--ms-muted);
}

.comment-form .logged-in-as a,
.comment-form .must-log-in a {
	color: var(--ms-primary);
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: var(--ms-muted);
}

.comment-form .required {
	color: var(--ms-primary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	display: block;
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ms-fg);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--ms-radius-box);
	outline: none;
	transition: border-color 0.15s ease;
}

.comment-form textarea {
	min-height: 140px;
	resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--ms-gold-40);
}

.comment-form .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.comment-form .comment-form-cookies-consent label {
	margin: 0;
}

.comment-form .comment-form-cookies-consent input {
	margin-top: 3px;
	accent-color: var(--ms-primary);
}

.ms-comments .comment-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	margin-top: 24px;
	font-size: 14px;
}

.ms-comments .comment-navigation a {
	color: var(--ms-primary);
}

/* ==========================================================================
   13. Barre latérale (visible seulement si des widgets y sont placés)
   ========================================================================== */
.ms-sidebar {
	margin-top: 64px;
	padding-top: 48px;
	border-top: 1px solid var(--ms-border);
	display: grid;
	gap: 24px;
}

@media (min-width: 640px) {
	.ms-sidebar {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	}
}

.ms-widget {
	padding: 24px;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
	background: var(--ms-card);
	font-size: 14px;
	line-height: 1.625;
	color: var(--ms-muted);
}

.ms-widget__title,
.ms-widget h2,
.ms-widget .wp-block-heading {
	font-family: var(--ms-font-serif);
	font-size: 18px;
	line-height: 1.5;
	font-weight: 600;
	color: var(--ms-primary);
	margin-bottom: 12px;
}

.ms-widget ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ms-widget a {
	transition: color 0.15s ease;
}

.ms-widget a:hover {
	color: var(--ms-fg);
}

.ms-widget .ms-search {
	max-width: none;
}

.ms-widget select {
	width: 100%;
	padding: 8px;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
	background: var(--ms-panel);
}

/* ==========================================================================
   14. Pied de page
   ========================================================================== */
.ms-footer {
	padding: 64px 24px 32px;
}

@media (min-width: 1024px) {
	.ms-footer {
		padding-left: 64px;
		padding-right: 64px;
	}
}

.ms-footer__inner {
	max-width: 1280px;
	margin: 0 auto;
}

.ms-footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	margin-bottom: 48px;
}

@media (min-width: 1024px) {
	.ms-footer__grid {
		grid-template-columns: 2fr 1fr 1fr;
		gap: 64px;
	}
	.ms-footer__col {
		padding-top: 8px;
	}
}

.ms-footer__logo {
	display: inline-flex;
	max-width: 100%;
	margin-bottom: 16px;
}

.ms-footer__logo .ms-logo__text {
	font-size: 24px;
	line-height: 1.5;
}

.ms-footer__baseline {
	max-width: 384px;
	margin-bottom: 24px;
	font-size: 14px;
	line-height: 1.625;
	color: var(--ms-muted);
}

.ms-footer__social {
	display: flex;
	gap: 8px;
}

.ms-social {
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ms-border);
	border-radius: var(--ms-radius);
	color: var(--ms-muted);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.ms-social:hover {
	color: var(--ms-fg);
	border-color: var(--ms-fg);
}

.ms-footer__nav {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ms-footer__nav a,
.ms-footer__legal a {
	transition: color 0.15s ease;
}

.ms-footer__nav a {
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
}

.ms-footer__nav a:hover,
.ms-footer__legal a:hover,
.ms-footer__contact a:hover {
	color: var(--ms-fg);
}

.ms-footer__title {
	font-size: 18px;
	line-height: 1.5;
	color: var(--ms-fg);
	margin-bottom: 16px;
}

.ms-footer__contact {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ms-footer__line {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ms-muted);
}

.ms-footer__line img,
.ms-footer__line svg {
	opacity: 0.6;
	flex-shrink: 0;
}

.ms-footer__sep {
	height: 1px;
	background: var(--ms-border);
	margin-bottom: 24px;
}

.ms-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--ms-muted);
}

@media (min-width: 1024px) {
	.ms-footer__bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}

.ms-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

/* ==========================================================================
   15. Classes WordPress usuelles
   ========================================================================== */
.alignleft {
	float: left;
	margin-right: 1.5em;
}

.alignright {
	float: right;
	margin-left: 1.5em;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.wp-caption {
	max-width: 100%;
}

.sticky .ms-card {
	border-color: var(--ms-gold-40);
}

.bypostauthor > .ms-comment__body {
	border-color: var(--ms-gold-40);
}

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 12px;
}

.gallery-item img {
	width: 100%;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

.gallery-caption {
	font-size: 13px;
	color: var(--ms-muted);
}
