/*
Theme Name: CV Anglais
Theme URI: https://cv-anglais.fr
Author: CV Anglais
Description: Thème éditorial pour les guides de CV en anglais. Mise en page de journal, Baskerville et Public Sans, rouge et bleu marine. Compatible avec Rank Math.
Version: 1.2.3
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: cv-anglais
*/

:root {
	--navy: #012169;
	--red: #c8102e;
	--ink: #1c1c1c;
	--muted: #4e4a44;
	--paper: #f4f1ea;
	--sheet: #fffdf8;
	--line: #d8d2c6;
	--serif: "Libre Baskerville", Baskerville, "Palatino Linotype", Palatino, "Times New Roman", serif;
	--sans: "Public Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	--header: 4.75rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

::selection {
	background: var(--navy);
	color: #fff;
}

img {
	max-width: 100%;
	height: auto;
}

button,
input,
textarea {
	font: inherit;
}

a {
	color: var(--navy);
}

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

.skip-link {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 100;
	background: var(--sheet);
	color: var(--ink);
	padding: 0.5rem 0.8rem;
}

.skip-link:focus {
	top: 0.75rem;
}

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

.container {
	width: min(1080px, calc(100% - 2rem));
	margin-inline: auto;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 40;
	background: var(--paper);
}

.header-bar {
	position: relative;
	min-height: var(--header);
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.masthead-rule {
	height: 0;
	border-top: 1px solid var(--ink);
	border-bottom: 3px solid var(--red);
}

.brand {
	display: inline-flex;
	flex: none;
	text-decoration: none;
	color: var(--ink);
}

.brand-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.brand-kicker {
	color: var(--red);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: nowrap;
}

.brand-name {
	font-family: var(--serif);
	font-size: 1.55rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.nav-toggle {
	display: none;
	margin-left: auto;
	align-items: center;
	gap: 0.45rem;
	border: 1px solid var(--ink);
	background: transparent;
	border-radius: 0;
	padding: 0.4rem 0.7rem;
	cursor: pointer;
	color: var(--ink);
}

.nav-toggle-icon {
	display: grid;
	gap: 4px;
	width: 0.95rem;
}

.nav-toggle-icon span {
	display: block;
	height: 1px;
	background: var(--ink);
}

.primary-nav {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.header-search {
	display: none;
}

.primary-nav .menu {
	display: flex;
	align-items: center;
	gap: 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav .menu > li {
	position: relative;
}

.primary-nav .menu > li > a {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.6rem;
	text-decoration: none;
	color: var(--ink);
	font-weight: 500;
	font-size: 0.9rem;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.primary-nav .menu > li > a:hover,
.primary-nav .menu > li.current-menu-item > a,
.primary-nav .menu > li.current-menu-ancestor > a {
	color: var(--red);
	background: transparent;
	box-shadow: inset 0 -2px 0 var(--red);
}

.primary-nav .sub-menu {
	display: none;
	position: absolute;
	top: calc(100% - 0.15rem);
	left: 0;
	z-index: 20;
	min-width: 16.5rem;
	margin: 0;
	padding: 0.35rem 0;
	list-style: none;
	background: var(--sheet);
	border: 1px solid var(--ink);
}

.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
	display: grid;
}

.primary-nav .sub-menu a {
	display: block;
	padding: 0.4rem 0.85rem;
	color: var(--ink);
	text-decoration: none;
	font-size: 0.92rem;
	line-height: 1.35;
}

.primary-nav .sub-menu a:hover,
.primary-nav .sub-menu .current-menu-item > a {
	color: var(--red);
	background: transparent;
}

.search-form {
	display: flex;
	gap: 0;
	align-items: stretch;
}

.search-form label {
	display: block;
	min-width: 0;
}

.search-form input[type="search"] {
	width: 8.75rem;
	height: 100%;
	border: 1px solid var(--ink);
	border-right: 0;
	background: var(--sheet);
	border-radius: 0;
	padding: 0.5rem 0.7rem;
	color: var(--ink);
}

.search-form button,
.button,
.form-submit .submit {
	border: 1px solid var(--navy);
	background: var(--navy);
	color: #fff;
	border-radius: 0;
	padding: 0.62rem 0.95rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
}

.search-form button:hover,
.button:hover,
.form-submit .submit:hover {
	background: var(--red);
	border-color: var(--red);
}

.site-main {
	padding: 0 0 4rem;
}

.hero {
	padding: 1.75rem 0 2rem;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
}

.hero-dateline {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.3rem 1.25rem;
	margin: 0;
	color: var(--navy);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.hero-rule {
	height: 0;
	margin: 0.55rem 0 1.35rem;
	border-top: 1px solid var(--ink);
	border-bottom: 3px solid var(--red);
}

.hero-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.72fr);
	gap: 2.25rem 2.75rem;
	align-items: start;
}

.eyebrow,
.entry-kicker {
	margin: 0;
	color: var(--red);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.hero h1,
.page-intro h1,
.entry-header h1,
.section-head h2,
.related h2,
.comments h2 {
	font-family: var(--serif);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.hero h1 {
	margin: 0 0 0.8rem;
	font-size: clamp(2.9rem, 6vw, 4.5rem);
	font-weight: 400;
	line-height: 0.98;
}

.hero-lead {
	margin: 0;
	max-width: 36rem;
	font-family: var(--serif);
	font-style: italic;
	font-size: 1.25rem;
	line-height: 1.45;
}

.hero .search-form {
	margin-top: 1.3rem;
	max-width: 32rem;
}

.hero .search-form label,
.hero .search-form input[type="search"] {
	width: 100%;
	flex: 1;
}

.hero-note {
	margin: 0.7rem 0 0;
	color: var(--muted);
	font-size: 0.92rem;
}

.hero-index {
	border-left: 1px solid var(--ink);
	padding-left: 1.35rem;
}

.hero-index ol {
	margin: 0.85rem 0 0;
	padding: 0;
	list-style: none;
}

.hero-index li + li {
	margin-top: 0.85rem;
	padding-top: 0.85rem;
	border-top: 1px solid var(--line);
}

.hero-index a {
	display: grid;
	grid-template-columns: 2.1rem minmax(0, 1fr);
	gap: 0.45rem;
	align-items: baseline;
	color: var(--ink);
	text-decoration: none;
}

.hero-index a:hover strong {
	color: var(--red);
}

.hero-index-num {
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--red);
}

.hero-index strong {
	display: block;
	font-family: var(--serif);
	font-weight: 700;
	font-size: 1.12rem;
	line-height: 1.25;
}

.hero-index-meta {
	display: block;
	margin-top: 0.15rem;
	color: var(--muted);
	font-size: 0.84rem;
	letter-spacing: 0.01em;
}

.home-intro {
	max-width: 46rem;
	margin: 2.6rem 0 0;
	color: var(--ink);
}

.home-intro .wp-block-group > p:first-child {
	margin: 0 0 0.55rem;
	color: var(--navy);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.45;
}

.home-intro .wp-block-group > p:first-child strong {
	font-weight: 600;
}

.home-intro h1 {
	max-width: 18em;
	margin: 0 0 0.85rem;
	color: var(--ink);
	font-family: var(--serif);
	font-size: clamp(1.85rem, 3vw, 2.45rem);
	font-weight: 400;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.home-intro p,
.home-intro li {
	max-width: 42rem;
}

.home-intro a {
	color: var(--navy);
}

.rubrique {
	margin-top: 3.2rem;
	scroll-margin-top: 6rem;
}

.section-head {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: end;
	margin-bottom: 0.35rem;
	padding-bottom: 0.7rem;
	border-bottom: 1px solid var(--ink);
}

.section-head h2 {
	margin: 0.2rem 0 0;
	font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.section-head p:last-child {
	margin: 0.4rem 0 0;
	color: var(--muted);
	max-width: 38rem;
}

.section-link {
	flex: none;
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--red);
	text-decoration: none;
	border-bottom: 1px solid var(--red);
}

.guide-grid,
.post-list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 2.5rem;
}

.guide-card,
.post-list-item {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1.05rem 0 1.1rem;
	border-bottom: 1px solid var(--line);
	background: transparent;
	text-decoration: none;
	color: inherit;
}

a.guide-card:hover,
.post-list-item:hover {
	transform: none;
}

.guide-title,
.post-list-item h2 {
	font-family: var(--serif);
	font-size: 1.22rem;
	font-weight: 400;
	line-height: 1.35;
	margin: 0;
}

.post-list-item h2 a {
	color: inherit;
	text-decoration: none;
}

a.guide-card:hover .guide-title,
.post-list-item:hover h2 a {
	color: var(--red);
}

.guide-excerpt,
.post-list-item p,
.entry-meta,
.page-intro p {
	margin: 0;
	color: var(--muted);
}

.guide-kicker {
	color: var(--red);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.page-wrap {
	display: grid;
	gap: 1rem;
	padding-top: 1.4rem;
}

.entry {
	max-width: 46rem;
	background: transparent;
	border: 0;
	padding: 0.3rem 0 0;
}

.entry-header {
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--ink);
}

.entry-header h1 {
	font-size: clamp(2rem, 4vw, 2.85rem);
	font-weight: 400;
	margin: 0.35rem 0 0;
}

.entry-kicker a {
	color: var(--red);
	text-decoration: none;
}

.entry-meta {
	margin-top: 0.75rem;
	font-size: 0.92rem;
}

.breadcrumbs {
	font-size: 0.88rem;
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0.15rem;
	list-style: none;
	margin: 0;
	padding: 0;
	color: var(--muted);
}

.breadcrumbs li:not(:last-child)::after {
	content: "/";
	margin-left: 0.3rem;
	color: #b3aa9c;
}

.breadcrumbs a {
	color: var(--muted);
	text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs [aria-current="page"] {
	color: var(--ink);
}

.toc {
	margin: 0 0 1.5rem;
	padding: 0.9rem 0 1rem;
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--ink);
}

.toc-title {
	margin: 0 0 0.35rem;
	font-family: var(--serif);
	font-weight: 700;
}

.toc ol {
	margin: 0;
	padding-left: 1.2rem;
}

.entry-content .toc a {
	color: var(--ink);
	text-decoration: none;
}

.toc a:hover {
	color: var(--red);
}

.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
}

.entry-content > * + * {
	margin-top: 1rem;
}

.entry-content h2,
.entry-content h3,
.related h2,
.comments h2 {
	scroll-margin-top: 6rem;
	font-family: var(--serif);
	line-height: 1.25;
}

.entry-content h2 {
	margin-top: 2rem;
	padding-top: 0.8rem;
	border-top: 1px solid var(--line);
	font-size: clamp(1.35rem, 2.2vw, 1.65rem);
}

.entry-content h3 {
	margin-top: 1.4rem;
	font-size: 1.15rem;
}

.entry-content a {
	color: var(--navy);
	text-underline-offset: 0.14em;
}

.entry-content a:hover {
	color: var(--red);
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.2rem;
}

.entry-content li + li {
	margin-top: 0.3rem;
}

.entry-content blockquote {
	margin: 1.3rem 0;
	padding: 0.15rem 0 0.15rem 1rem;
	border-left: 3px solid var(--red);
	font-family: var(--serif);
	font-style: italic;
	font-size: 1.2rem;
	line-height: 1.45;
}

.entry-content .alignright,
.entry-content .alignleft {
	max-width: min(260px, 46%);
}

.entry-content .alignright {
	float: right;
	margin: 0.2rem 0 1rem 1.2rem;
}

.entry-content .alignleft {
	float: left;
	margin: 0.2rem 1.2rem 1rem 0;
}

.entry-content .aligncenter {
	display: block;
	margin-inline: auto;
}

.entry-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
	display: table;
}

.wp-block-table {
	margin: 1.3rem 0 1.5rem;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd),
.wp-block-table.is-style-stripes tbody tr:nth-child(even),
.wp-block-table.is-style-stripes td,
.wp-block-table.is-style-stripes th {
	background: transparent;
}

.entry-content thead th,
.wp-block-table th,
.wp-block-table.is-style-stripes th {
	background: transparent;
	color: var(--muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	border-bottom: 1px solid var(--ink);
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--line);
	opacity: 1;
	margin: 2.2rem 0;
}

.wp-block-button__link,
.wp-element-button {
	border-radius: 0;
	padding: 0.72rem 1.05rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.2;
	text-transform: uppercase;
	text-decoration: none;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
	background-color: var(--navy) !important;
	border: 1px solid var(--navy);
	color: #fff !important;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background-color: transparent !important;
	border: 1px solid var(--navy);
	color: var(--navy) !important;
}

.wp-block-button .wp-block-button__link:hover {
	background-color: var(--red) !important;
	border-color: var(--red);
	color: #fff !important;
}

.entry-content th,
.entry-content td {
	border-bottom: 1px solid var(--line);
	padding: 0.5rem 0.6rem;
	text-align: left;
	vertical-align: top;
}

.entry-content::after {
	content: "";
	display: block;
	clear: both;
}

.related {
	margin-top: 1.4rem;
}

.related h2,
.comments h2 {
	font-size: 1.45rem;
	margin: 0 0 0.7rem;
}

.related-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--ink);
}

.related-list a {
	display: flex;
	min-height: 100%;
	align-items: center;
	padding: 0.85rem 0.9rem 0.85rem 0;
	text-decoration: none;
	color: var(--ink);
	font-family: var(--serif);
	font-size: 1.02rem;
	line-height: 1.35;
	border-bottom: 1px solid var(--line);
}

.related-list a:hover {
	color: var(--red);
}

.comments {
	max-width: 46rem;
	margin-top: 1.6rem;
	background: transparent;
	border: 0;
	border-top: 1px solid var(--ink);
	padding: 1.2rem 0 0;
}

.comment-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .comment {
	padding: 0.85rem 0;
	border-top: 1px solid var(--line);
}

.comment-author {
	font-weight: 700;
}

.comment-meta {
	color: var(--muted);
	font-size: 0.88rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: #fff;
}

.comment-form textarea {
	min-height: 8rem;
}

.pagination {
	margin-top: 1rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.pagination .page-numbers {
	display: inline-flex;
	min-width: 2.2rem;
	justify-content: center;
	padding: 0.35rem 0.65rem;
	background: transparent;
	border: 1px solid var(--ink);
	text-decoration: none;
	color: var(--ink);
}

.pagination .page-numbers.current {
	background: var(--navy);
	color: #fff;
	border-color: var(--navy);
}

.empty-state {
	background: var(--sheet);
	border: 1px solid var(--line);
	border-top: 4px solid var(--navy);
	padding: 1.3rem;
}

.empty-state .search-form {
	margin: 1rem 0;
}

.empty-state .search-form input[type="search"] {
	width: min(100%, 22rem);
}

.link-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.link-pills a {
	color: var(--navy);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid var(--red);
}

.site-footer {
	background: transparent;
	color: var(--ink);
	padding: 0 0 1.8rem;
}

.footer-rule {
	margin-bottom: 1.7rem;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.15fr repeat(3, 1fr);
	gap: 1.75rem 1.5rem;
}

.footer-brand .brand {
	align-items: flex-start;
}

.footer-brand .brand-name {
	color: var(--ink);
	white-space: nowrap;
}

.footer-brand .brand-kicker {
	color: var(--red);
}

.footer-brand p {
	margin: 0.85rem 0 0;
	max-width: 22rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.footer-heading {
	margin: 0.15rem 0 0.65rem;
	color: var(--red);
	font-family: var(--sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer li + li {
	margin-top: 0.3rem;
}

.site-footer li {
	font-size: 0.92rem;
	line-height: 1.4;
}

.site-footer a {
	color: var(--ink);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--red);
}

.footer-base {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.8rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.88rem;
}

.footer-base a {
	color: var(--muted);
}

@media (max-width: 980px) {
	.hero-layout {
		grid-template-columns: 1fr;
		gap: 1.6rem;
	}

	.hero-index {
		border-left: 0;
		border-top: 1px solid var(--ink);
		padding: 1rem 0 0;
	}

	.guide-grid,
	.post-list,
	.related-list,
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 1040px) {
	.brand-kicker {
		letter-spacing: 0.08em;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.primary-nav {
		display: none;
		position: absolute;
		top: calc(100% + 0.35rem);
		left: 0;
		right: 0;
		margin: 0;
		padding: 0.4rem 0.85rem 0.8rem;
		flex-direction: column;
		align-items: stretch;
		background: var(--sheet);
		border: 1px solid var(--ink);
	}

	body.nav-open .primary-nav {
		display: flex;
		max-height: calc(100vh - 5.5rem);
		overflow: auto;
	}

	body.nav-open .nav-toggle-icon span:nth-child(1) {
		transform: translateY(5px) rotate(45deg);
	}

	body.nav-open .nav-toggle-icon span:nth-child(2) {
		opacity: 0;
	}

	body.nav-open .nav-toggle-icon span:nth-child(3) {
		transform: translateY(-5px) rotate(-45deg);
	}

	.primary-nav .menu,
	.primary-nav .sub-menu {
		display: grid;
		position: static;
		min-width: 0;
		border: 0;
		padding: 0;
		background: transparent;
	}

	.primary-nav .sub-menu {
		padding-left: 0.75rem;
	}

	.primary-nav .menu > li > a:hover,
	.primary-nav .menu > li.current-menu-item > a,
	.primary-nav .menu > li.current-menu-ancestor > a {
		box-shadow: none;
	}

	.primary-nav .header-search {
		display: block;
	}

	.header-search .search-form,
	.header-search .search-form label,
	.header-search .search-form input[type="search"] {
		width: 100%;
	}

	.section-head,
	.footer-base {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media (max-width: 680px) {
	.guide-grid,
	.post-list,
	.related-list,
	.footer-grid {
		grid-template-columns: 1fr;
	}

	.entry-content .alignright,
	.entry-content .alignleft {
		float: none;
		display: block;
		max-width: 100%;
		margin: 1rem auto;
	}

	.hero .search-form {
		flex-direction: column;
		align-items: stretch;
	}

	.hero .search-form input[type="search"] {
		border-right: 1px solid var(--ink);
		border-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition: none !important;
	}
}
