/*
Theme Name: Marsactu Editorial
Description: Thème éditorial WordPress pour le journal Marsactu.
Version: 1.0.2
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: marsactu-editorial
*/

:root {
	--ink: #092141;
	--deep: #003c57;
	--mint: #c7e4e2;
	--teal: #0e5557;
	--orange: #ffa32a;
	--pink: #ff3962;
	--blue-light: #a3d0e7;
	--light: #f9f9f9;
	--line: #d5dfe4;
	--body: #272d2d;
	--sans: Arial, Helvetica, sans-serif;
	--slab: Rockwell, "Roboto Slab", Georgia, serif;
	--gap: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color: var(--ink); background: white; scroll-padding-top: 92px; }
body { margin: 0; padding-block-start: 70px; font: 16px/1.5 var(--sans); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, textarea:focus-visible {
	outline: 3px solid #089e95;
	outline-offset: 3px;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p { margin-block-start: 0; }
.m-shell { width: calc(100% - 32px); max-width: 1136px; margin-inline: auto; }
.m-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; }
.m-links a { text-decoration: none; }
.m-links a:hover { text-decoration: underline; }
.screen-reader-text, .m-skip-link:not(:focus) {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
.m-skip-link:focus { position: fixed; inset: 8px auto auto 8px; z-index: 1200; background: white; padding: 8px 16px; }

.m-header { color: var(--ink); }
.m-masthead {
	position: fixed;
	inset: 0 0 auto;
	z-index: 950;
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	width: 100%;
	max-width: none;
	min-height: 70px;
	padding: 0 16px 0 24px;
	border-block-end: 1px solid #ebebeb;
	background: var(--light);
}
.admin-bar .m-masthead { inset-block-start: 32px; }
.m-header-tools, .m-header-account { display: flex; align-items: center; gap: 8px; }
.m-header-account { justify-content: end; }
.m-mobile-wordmark { display: none; }
.m-brandline { min-height: 150px; display: grid; justify-items: center; align-content: start; padding: 16px 14px 0; }
.m-wordmark, .m-masthead .custom-logo-link { text-decoration: none; font-weight: 800; }
.m-wordmark > span { font-size: 36px; letter-spacing: -.07em; line-height: 1; }
.m-wordmark-dot { color: var(--pink); }
.m-brandline img { width: 192px; height: auto; }
.m-tool {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 4px 9px 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 14px;
	font-weight: 400;
	text-transform: uppercase;
}
.m-tool:hover { text-decoration: underline; }
.m-menu-icon { width: 28px; height: 16px; margin-inline-end: 7px; border-block: 1.5px solid currentColor; display: inline-grid; align-items: center; }
.m-menu-icon::before { content: ""; border-top: 1.5px solid currentColor; }
.m-search-icon { position: relative; display: inline-block; width: 12px; height: 12px; border: 2px solid; border-radius: 50%; }
.m-search-icon::after { content: ""; width: 7px; height: 2px; background: currentColor; transform: rotate(45deg); position: absolute; right: -5px; bottom: -2px; }
.m-account-icon { position: relative; display: inline-block; width: 16px; height: 16px; margin-inline-end: 8px; }
.m-account-icon::before { content: ""; position: absolute; top: 0; left: 5px; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; }
.m-account-icon::after { content: ""; position: absolute; inset: auto 0 0; height: 6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 8px 8px 0 0; }
.m-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .55rem .94rem;
	border: 1px solid var(--ink);
	border-radius: 3px;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}
.m-button:hover { filter: brightness(.92); }
.m-button--subscribe { color: #fff; background: var(--orange); border-color: var(--orange); }
.m-button--account { color: var(--ink); background: transparent; }
.m-header-account .m-button { padding: 9px 16px; border-radius: 999px; font-size: 14px; letter-spacing: .01em; }
.m-header-account .m-button--subscribe { font-weight: 400; text-transform: uppercase; }
.m-primary-nav-inner { display: flex; align-items: center; gap: 20px; min-height: 70px; width: max-content; max-width: calc(100% - 28px); overflow: auto; scrollbar-width: thin; }
.m-primary-nav .m-links { flex-wrap: nowrap; align-items: center; gap: 13px; }
.m-primary-nav a { display: block; white-space: nowrap; font-size: 14px; font-weight: 700; text-transform: uppercase; }
.m-primary-nav a.m-home-link { font-size: 22px; text-decoration: none; }

.m-dialog {
	width: min(560px, calc(100vw - 32px));
	padding: 26px;
	border: 0;
	background: white;
	color: var(--ink);
}
.m-dialog::backdrop { background: rgb(9 33 65 / .55); }
.m-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block-end: 20px; }
.m-dialog-head h2 { margin: 0; font: 700 24px/1.25 var(--slab); }
.m-dialog-close { border: 0; background: transparent; color: inherit; padding: 0 8px; font-size: 34px; line-height: 1; }
.m-drawer { inset: 0 auto 0 0; width: min(400px, 100vw); height: 100dvh; max-height: 100dvh; margin: 0; background: var(--ink); color: white; }
.m-drawer-actions { display: flex; align-items: center; gap: 20px; margin-block-end: 20px; }
.m-search-form { display: flex; gap: 8px; margin-block: 8px 24px; }
.m-search-form label { flex: 1; min-width: 0; }
.m-search-form input { width: 100%; padding: .55rem .65rem; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; }
.m-drawer h3 { margin: 24px 0 8px; text-transform: uppercase; font-size: 15px; color: var(--blue-light); }
.m-drawer .m-links { display: grid; gap: 6px; padding: 6px 0; }
.m-drawer details .m-links { padding-inline-start: 18px; }
.m-drawer summary { cursor: pointer; font-weight: 700; }
.m-mobile-nav { display: none; }

.m-home { padding-block: 8px 48px; }
@media (min-width: 1200px) { .m-home { max-width: 1180px; } }
.m-home-lead, .m-home-section, .m-home-week { margin-block-end: 42px; }
.m-home-week { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.m-home-week--comments-only { grid-template-columns: 1fr; }
.m-home-week .m-home-section { margin-block-end: 0; }
.m-home-empty { padding: 32px; border-block: 3px solid var(--ink); }
.m-lead-stories { display: grid; gap: var(--gap); }
.m-lead-secondary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.m-lead-secondary:has(> :only-child) { grid-template-columns: 1fr; }
.m-card { position: relative; min-width: 0; background: white; }
.m-card-link { display: block; height: 100%; color: inherit; text-decoration: none; }
.m-card-link:hover .m-card-title, .m-card-title a:hover { text-decoration: underline; }
.m-card-image { display: block; width: 100%; overflow: hidden; aspect-ratio: 16 / 9; background: var(--mint); }
.m-card-image img, img.m-card-image { width: 100%; height: 100%; object-fit: cover; }
.m-card-body { min-width: 0; padding-block-start: 14px; }
.m-card-meta { margin-block-end: 7px; color: var(--teal); font-size: 13px; font-weight: 700; }
.m-card-title { margin: 0 0 9px; font: 700 21px/1.22 var(--slab); overflow-wrap: anywhere; }
.m-card-title a { color: inherit; text-decoration: none; }
.m-card-excerpt { margin: 0; color: var(--body); line-height: 1.45; }
.m-card--lead { border: 1px solid var(--line); }
.m-card--lead .m-card-body { padding: clamp(20px, 4vw, 42px); }
.m-card--lead .m-card-title { margin-block-end: 14px; font-size: clamp(27px, 3vw, 45px); }
.m-card--lead:has(.m-card-image) { border: 0; }
.m-card--lead .m-card-link:has(.m-card-image) .m-card-body {
	position: relative;
	margin: clamp(-128px, -10vw, -64px) clamp(16px, 4vw, 48px) 0;
	background: white;
	text-align: center;
}
.m-card--lead:has(.m-card-image) .m-card-excerpt { max-width: 720px; margin-inline: auto; }
.m-card-topic { display: inline-block; margin-inline-end: 5px; padding: 3px 7px; background: var(--ink); color: white; font-size: .86em; text-transform: uppercase; }
.m-lead-secondary .m-card { border: 1px solid var(--line); }
.m-lead-secondary .m-card-body { padding: 18px; }
.m-lead-secondary .m-card:last-child:not(:only-child) { background: var(--deep); color: white; }
.m-lead-secondary .m-card:last-child:not(:only-child) :is(.m-card-meta, .m-card-excerpt) { color: #dcebf5; }
.m-lead-secondary .m-card:last-child:not(:only-child) .m-card-link:has(.m-card-image) { display: grid; align-items: end; min-height: 230px; }
.m-lead-secondary .m-card:last-child:not(:only-child) .m-card-link:has(.m-card-image) > * { grid-area: 1 / 1; }
.m-lead-secondary .m-card:last-child:not(:only-child) .m-card-image { height: 100%; }
.m-lead-secondary .m-card:last-child:not(:only-child) .m-card-body { z-index: 1; background: linear-gradient(transparent, rgb(0 60 87 / .97) 37%); padding-block-start: 56px; }
.m-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.m-section-title { margin: 0 0 18px; padding-block-start: 8px; border-block-start: 3px solid currentColor; font: 700 22px/1.25 var(--slab); }
.m-section-more { display: inline-block; margin-bottom: 14px; font-size: 14px; font-weight: bold; }
.m-story-grid, .m-listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.m-story-grid--enquetes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m-story-grid > .m-card, .m-listing-grid > .m-card { padding-block-end: 18px; border-block-end: 1px solid var(--line); }
.m-brefs { display: grid; grid-template-columns: 1fr 5fr; gap: 20px; margin-block-start: var(--gap); padding: 22px; background: var(--ink); color: white; }
.m-brefs .m-section-head { display: block; }
.m-brefs .m-section-title { padding: 0; border-block-start: 0; margin-block-end: 12px; white-space: nowrap; }
.m-brefs .m-section-more { margin: 0; padding: 4px 8px; background: white; color: var(--ink); text-decoration: none; }
.m-brief-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.m-brief-item { padding-inline-start: 12px; border-inline-start: 1px solid #5e768d; font: 700 16px/1.34 var(--slab); }
.m-brief-item a { display: block; text-decoration: none; }
.m-brief-item a:hover { text-decoration: underline; }
.m-brief-date { display: block; margin-block-end: 5px; color: var(--blue-light); font: 400 12px/1.25 var(--sans); }
.m-recent-comments { padding: 16px; background: var(--mint); }
.m-recent-comments ul, .m-recent-comments ol { padding-inline-start: 18px; }
.m-recent-comments li + li { margin-block-start: 12px; }

.m-listing, .m-article, .m-page { min-height: 38vh; padding-block: 30px 60px; }
.m-listing-header { border-block-start: 3px solid var(--ink); margin-block-end: 24px; padding-block-start: 10px; }
.m-listing-title { font: 700 clamp(26px, 4vw, 37px)/1.15 var(--slab); margin-block-end: 12px; }
.m-listing-description { max-width: 680px; color: var(--body); }
.m-pagination { margin-block-start: 30px; }
.m-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.m-pagination .page-numbers { min-width: 36px; padding: 5px 9px; border: 1px solid var(--line); text-align: center; }
.m-pagination .current { background: var(--ink); color: white; }
.m-article-header, .m-article-body, .m-article-topics, .m-article-author, .m-comments { max-width: 680px; margin-inline: auto; }
.m-article-header { margin-block-end: 22px; }
.m-article-type { display: inline-block; margin: 0 0 10px; color: var(--teal); font-size: 15px; font-weight: bold; }
.m-article-title { margin: 0 0 15px; color: #000; font: 700 32px/1.125 var(--slab); overflow-wrap: anywhere; }
.m-article-byline { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-block-end: 12px; font-size: 14px; }
.m-article-deck { margin-block: 24px 0; font: 700 22px/1.35 var(--sans); color: var(--ink); }
.m-article-hero { margin-block: 0 30px; }
.m-article-hero img { width: 100%; max-height: 680px; object-fit: cover; }
.m-article-hero figcaption { padding: 10px 15px; background: var(--deep); color: white; font-size: 13px; }
.m-article-body { color: var(--body); font-size: 18px; line-height: 1.62; overflow-wrap: anywhere; }
.m-article-body :is(h2, h3) { color: var(--ink); font-family: var(--slab); line-height: 1.24; margin-top: 1.6em; }
.m-article-body iframe { max-width: 100%; }
.m-article-body blockquote { margin-inline: 0; padding-inline-start: 20px; border-inline-start: 4px solid var(--teal); }
.m-article-body .alignwide { width: min(920px, calc(100vw - 32px)); max-width: none; margin-inline: 50% 0; transform: translateX(-50%); }
.m-article-topics, .m-article-author { margin-block: 24px; padding-block-start: 12px; border-block-start: 1px solid var(--line); }
.m-article-related { margin-block-start: 42px; }
.m-comments { margin-block: 42px 0; }
.m-comments-list { padding-inline-start: 24px; }
.m-comments-list li { margin-block-end: 16px; }
.m-comments textarea, .m-comments input:not([type="checkbox"]):not([type="submit"]) {
	display: block;
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--line);
	padding: 8px;
}
.m-comments .submit { padding: 8px 12px; border: 0; background: var(--ink); color: white; }

.m-footer { background: var(--ink); color: #fff; padding: 42px 0 18px; }
.m-footer-brand { display: flex; gap: 35px; align-items: center; padding-block-end: 25px; border-block-end: 1px solid #547185; }
.m-footer-brand p { margin-block-end: 8px; font: 700 20px/1.3 var(--slab); }
.m-footer .m-wordmark img { width: 195px; }
.m-footer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: var(--gap); margin-block: 24px; }
.m-footer-nav h2 { margin-bottom: 9px; color: var(--blue-light); font-size: 16px; }
.m-footer-nav .m-links { display: grid; gap: 5px; }
.m-footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block-start: 14px; border-block-start: 1px solid #547185; font-size: 14px; }

@media (max-width: 1199px) {
	.m-shell { max-width: 976px; }
	.m-masthead { max-width: none; }
}
@media (max-width: 991px) {
	:root { --gap: 22px; }
	.m-shell { max-width: 736px; }
	.m-masthead { max-width: none; }
	.m-brefs { display: block; }
	.m-brefs .m-section-head { display: flex; }
	.m-brief-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	:root { --gap: 18px; }
	body { padding-block: 50px 62px; }
	html { scroll-padding-top: 64px; }
	.m-shell { width: calc(100% - 28px); }
	.m-masthead { width: 100%; min-height: 50px; display: flex; padding-inline: 26px 16px; gap: 18px; }
	.admin-bar .m-masthead { inset-block-start: 46px; }
	.m-mobile-wordmark { display: block; }
	.m-brandline { display: none; }
	.m-masthead .m-wordmark img, .m-masthead .custom-logo { width: 92px; max-height: 45px; object-fit: contain; }
	.m-wordmark > span { font-size: 27px; }
	.m-header-tools { gap: 0; }
	.m-tool { padding: 8px 0; }
	.m-search-button { display: none; }
	.m-menu-icon { width: 28px; margin-inline-end: 0; }
	.m-tool span:last-child { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
	.m-header-account { margin-inline-start: auto; gap: 12px; }
	.m-header-account .m-button { font-size: 11px; padding: 7px 9px; }
	.m-header-account .m-button--subscribe { font-weight: 700; text-transform: none; }
	.m-header-account .m-button--account { padding: 5px 2px; border-color: transparent; }
	.m-header-account .m-button--account .m-account-icon { margin: 0; }
	.m-header-account .m-button--account span:last-child { position: absolute; clip-path: inset(50%); }
	.m-primary-nav-inner { width: calc(100% - 42px); max-width: none; padding-inline: 10px; min-height: 62px; scrollbar-width: none; }
	.m-primary-nav .m-links { gap: 16px; }
	.m-primary-nav a { font-size: 12px; }
	.m-mobile-nav {
		position: fixed;
		z-index: 940;
		inset: auto 0 0;
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		background: var(--light);
		border-block-start: 1px solid var(--line);
		padding-block-end: env(safe-area-inset-bottom);
	}
	.m-mobile-nav :is(a, button) { min-height: 54px; display: grid; place-content: center; justify-items: center; gap: 4px; border: 0; background: none; color: var(--ink); font-size: 11px; text-decoration: none; }
	.m-mobile-nav span { font-size: 21px; line-height: 1; }
	.m-mobile-nav .m-search-icon { margin-block-start: 3px; }
	.m-home { width: calc(100% - 42px); padding-block-start: 16px; }
	.m-home-lead, .m-home-section, .m-home-week { margin-block-end: 28px; }
	.m-lead-secondary, .m-home-week { grid-template-columns: 1fr; }
	.m-card--lead .m-card-link:has(.m-card-image) .m-card-body { margin: -24px 12px 0; }
	.m-story-grid, .m-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.m-brief-list { grid-template-columns: 1fr; gap: 10px; }
	.m-brief-item { padding: 8px 0 0; border: 0; border-block-start: 1px solid #5e768d; }
	.m-footer-nav { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
	.m-masthead { padding-inline: 14px 10px; gap: 11px; }
	.m-masthead .m-wordmark img, .m-masthead .custom-logo { width: 82px; max-height: 40px; }
}
@media (max-width: 460px) {
	.m-story-grid, .m-listing-grid { grid-template-columns: 1fr; }
	.m-footer-brand { align-items: start; flex-direction: column; gap: 12px; }
	.m-article-title { font-size: 28px; }
	.m-article-deck { font-size: 19px; }
}
