/*
Theme Name: Les Portes de Yesha — Le Journal
Theme URI: https://www.les-portes-de-yesha.com/
Author: Les Portes de Yesha
Author URI: https://www.les-portes-de-yesha.com/
Description: Thème de blog aux couleurs et à la typographie du site LES PORTES DE YESHA, pensé pour que le passage du site vitrine au Journal soit invisible. Les liens du menu pointent vers le site principal ; seule l'URL du site principal est à renseigner (voir functions.php).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yesha-journal
Tags: blog, one-column, right-sidebar, custom-logo, custom-menu, translation-ready
*/

/* ==========================================================================
   1. Variables — couleurs et polices relevées sur le site source
   ========================================================================== */

:root {
	/* Couleurs prélevées sur https://www.les-portes-de-yesha.com/ */
	--yesha-accent: #4caac9;        /* rgb(76,170,201) : titre du site, onglet actif, boutons */
	--yesha-accent-dark: #3490ae;   /* rgb(52,144,174) : titres de niveau 2 */
	--yesha-text: #737373;          /* rgb(115,115,115) : texte courant */
	--yesha-bg: #ffffff;            /* rgb(255,255,255) : fond des pages */
	--yesha-header-bg: #ffffff;     /* rgb(255,255,255) : fond du header */
	--yesha-footer-bg: #424242;     /* rgb(66,66,66)    : fond du footer */
	--yesha-footer-text: #737373;   /* rgb(115,115,115) : texte du footer */
	--yesha-footer-link: #73bdd5;   /* rgb(115,189,213) : liens du footer */
	--yesha-rule: #e6e6e6;

	/* Typographie relevée sur le site source */
	--yesha-font-title: Questrial, "Trebuchet MS", "Segoe UI", sans-serif;
	--yesha-font-body: Roboto, "Helvetica Neue", Arial, sans-serif;

	--yesha-container: 1070px;
}

/* ==========================================================================
   2. Réinitialisation légère
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--yesha-bg);
	color: var(--yesha-text);
	font-family: var(--yesha-font-body);
	font-size: 17px;
	font-weight: 400;
	line-height: 1.5;
	overflow-wrap: break-word;
}

img,
svg,
iframe,
video,
embed,
object {
	max-width: 100%;
}

img {
	height: auto;
}

a {
	color: var(--yesha-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--yesha-accent);
	outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--yesha-font-title);
	font-weight: 400;
	line-height: 1.25;
	margin: 0 0 0.6em;
	color: var(--yesha-accent-dark);
	overflow-wrap: break-word;
}

h1 {
	font-size: clamp(30px, 4.5vw, 54px);
	line-height: 1.05;
	color: var(--yesha-accent);
}

h2 {
	font-size: clamp(24px, 3vw, 36px);
}

h3 {
	font-size: clamp(21px, 2.4vw, 28px);
}

h4 {
	font-size: 22px;
}

p,
ul,
ol,
dl,
pre,
table,
blockquote,
figure {
	margin: 0 0 1.4em;
}

blockquote {
	border-left: 3px solid var(--yesha-accent);
	padding-left: 20px;
	margin-left: 0;
	font-style: italic;
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 0.92em;
}

pre {
	background: #f6f8f9;
	padding: 16px;
	overflow: auto;
}

table {
	border-collapse: collapse;
	width: 100%;
}

th,
td {
	border: 1px solid var(--yesha-rule);
	padding: 8px 12px;
	text-align: left;
}

hr {
	border: 0;
	border-top: 1px solid var(--yesha-rule);
	margin: 2.5em 0;
}

/* Accessibilité : lien d'évitement */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--yesha-accent);
	color: #fff;
	padding: 10px 18px;
	text-decoration: none;
}

.skip-link:focus {
	left: 8px;
	top: 8px;
}

/* ==========================================================================
   3. Structure
   ========================================================================== */

.container {
	width: 100%;
	max-width: var(--yesha-container);
	margin-inline: auto;
	padding-inline: 20px;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main-area {
	flex: 1 0 auto;
	padding-block: 40px 60px;
}

.layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
}

@media (min-width: 900px) {
	body:not(.no-sidebar) .layout {
		grid-template-columns: minmax(0, 1fr) 300px;
	}
}

/* ==========================================================================
   4. Header — reproduit la disposition du site source
      (logo + titre centrés, puis le menu centré en dessous, sur fond blanc)
      Il est conçu pour ne jamais casser : le titre passe à la ligne, sa
      largeur est bornée, et le menu passe sur plusieurs lignes.
   ========================================================================== */

.site-header {
	background-color: var(--yesha-header-bg);
	padding-block: 40px 24px;
}

.site-header-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	min-width: 0;
}

.site-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px 20px;
	max-width: 100%;
	min-width: 0;
	text-align: center;
}

.site-logo-link {
	display: block;
	flex: 0 0 auto;
	line-height: 0;
}

.site-logo {
	display: block;
	width: 99px;
	height: auto;
	max-width: 30vw;
}

.site-title-wrap {
	min-width: 0;
	max-width: 100%;
	flex: 0 1 auto;
}

.site-title {
	font-family: var(--yesha-font-title);
	font-size: clamp(26px, 4.2vw, 54px);
	font-weight: 400;
	line-height: 1.06;
	color: var(--yesha-accent);
	margin: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-title a:hover,
.site-title a:focus {
	text-decoration: none;
}

/* ==========================================================================
   5. Menu de navigation
      Onglet actif : pastille pleine à la couleur d'accent, texte blanc,
      rayon 4px, comme sur le site source.
   ========================================================================== */

.main-navigation {
	width: 100%;
	min-width: 0;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 4px;
}

.main-navigation a {
	display: block;
	font-family: var(--yesha-font-body);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--yesha-text);
	text-decoration: none;
	padding: 4px 16px;
	border-radius: 4px;
}

.main-navigation a:hover,
.main-navigation a:focus {
	color: var(--yesha-accent);
}

.main-navigation .is-active > a,
.main-navigation .current-menu-item > a {
	background-color: var(--yesha-accent);
	color: #fff;
}

.main-navigation .is-active > a:hover,
.main-navigation .is-active > a:focus {
	color: #fff;
}

/* Bouton du menu sur petit écran */
.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var(--yesha-rule);
	border-radius: 4px;
	color: var(--yesha-text);
	font-family: var(--yesha-font-body);
	font-size: 15px;
	padding: 8px 14px;
	cursor: pointer;
}

@media (max-width: 767px) {
	.site-header {
		padding-block: 24px 18px;
	}

	.menu-toggle {
		display: inline-block;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		align-items: stretch;
		margin-top: 14px;
		border-top: 1px solid var(--yesha-rule);
		padding-top: 10px;
	}

	.main-navigation.is-open ul {
		display: flex;
	}

	.main-navigation a {
		text-align: center;
		padding: 10px 16px;
	}
}

/* ==========================================================================
   6. Recherche
   ========================================================================== */

.search-form {
	display: flex;
	gap: 8px;
	max-width: 100%;
	margin: 0 0 1.4em;
}

.search-form .search-field {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--yesha-font-body);
	font-size: 16px;
	color: var(--yesha-text);
	background: #fff;
	border: 1px solid var(--yesha-rule);
	border-radius: 0;
	padding: 9px 12px;
}

.search-form .search-submit,
.button,
button,
input[type="submit"] {
	font-family: var(--yesha-font-body);
	font-size: 17px;
	font-weight: 400;
	background-color: var(--yesha-accent);
	color: #fff;
	border: 0;
	border-radius: 0;
	padding: 8.5px 17px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.search-form .search-submit:hover,
.button:hover,
button:hover,
input[type="submit"]:hover {
	background-color: var(--yesha-accent-dark);
}

/* ==========================================================================
   7. Articles
   ========================================================================== */

.page-header {
	margin-bottom: 36px;
}

.page-title {
	margin-bottom: 0.2em;
}

.archive-description {
	margin: 0;
}

.post-list {
	display: grid;
	gap: 48px;
}

.entry {
	min-width: 0;
}

.entry + .entry {
	border-top: 1px solid var(--yesha-rule);
	padding-top: 48px;
}

.entry-thumbnail {
	margin: 0 0 18px;
}

.entry-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
}

.entry-title {
	font-size: clamp(24px, 2.8vw, 34px);
	margin-bottom: 0.35em;
}

.entry-title a {
	color: inherit;
	text-decoration: none;
}

.entry-title a:hover,
.entry-title a:focus {
	color: var(--yesha-accent);
}

.entry-meta {
	font-size: 15px;
	color: var(--yesha-text);
	margin: 0 0 1.1em;
}

.entry-meta a {
	color: var(--yesha-accent);
	text-decoration: none;
}

.entry-meta a:hover {
	text-decoration: underline;
}

.entry-meta .sep {
	opacity: 0.5;
}

.entry-content > *:last-child,
.entry-summary > *:last-child {
	margin-bottom: 0;
}

.more-link {
	display: inline-block;
	margin-top: 4px;
	color: var(--yesha-accent);
	text-decoration: none;
	font-weight: 500;
}

.more-link:hover {
	text-decoration: underline;
}

.entry-footer {
	margin-top: 22px;
	font-size: 15px;
}

.entry-footer a {
	color: var(--yesha-accent);
}

/* Pagination */
.navigation.pagination,
.navigation.post-navigation {
	margin-top: 56px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.pagination .page-numbers {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 4px;
	color: var(--yesha-text);
	text-decoration: none;
}

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

.pagination a.page-numbers:hover {
	color: var(--yesha-accent);
}

.page-links {
	margin: 1.6em 0;
	font-size: 16px;
}

.page-links a {
	display: inline-block;
	padding: 2px 10px;
	color: var(--yesha-accent);
	text-decoration: none;
}

.nav-subtitle {
	display: block;
	font-size: 14px;
	color: var(--yesha-text);
}

.nav-title {
	font-family: var(--yesha-font-title);
	font-size: 18px;
}

.post-navigation .nav-links {
	justify-content: space-between;
	gap: 24px;
}

.post-navigation a {
	color: var(--yesha-accent);
	text-decoration: none;
}

.post-navigation a:hover {
	text-decoration: underline;
}

/* ==========================================================================
   8. Colonne latérale et widgets
   ========================================================================== */

.sidebar {
	min-width: 0;
}

.widget {
	margin-bottom: 40px;
	font-size: 16px;
}

.widget-title {
	font-size: 21px;
	color: var(--yesha-accent-dark);
	margin-bottom: 0.6em;
}

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

.widget li {
	padding: 5px 0;
	border-bottom: 1px solid var(--yesha-rule);
}

.widget a {
	color: var(--yesha-text);
	text-decoration: none;
}

.widget a:hover {
	color: var(--yesha-accent);
}

/* ==========================================================================
   9. Commentaires
   ========================================================================== */

.comments-area {
	margin-top: 64px;
	padding-top: 40px;
	border-top: 1px solid var(--yesha-rule);
}

.comments-title,
.comment-reply-title {
	font-size: 26px;
}

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

.comment-list ol.children {
	list-style: none;
	margin: 0;
	padding-left: 28px;
}

.comment-item {
	margin-bottom: 28px;
}

.comment-body {
	border: 1px solid var(--yesha-rule);
	padding: 20px;
}

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

.comment-author img {
	border-radius: 50%;
	flex: 0 0 auto;
}

.comment-author-name {
	display: block;
	font-family: var(--yesha-font-title);
	font-size: 18px;
	color: var(--yesha-accent-dark);
}

.comment-date {
	font-size: 14px;
}

.comment-content > *:last-child {
	margin-bottom: 0;
}

.comment-reply a {
	font-size: 15px;
	color: var(--yesha-accent);
	text-decoration: none;
}

.comment-awaiting-moderation {
	font-size: 15px;
	font-style: italic;
}

.comment-form p {
	margin-bottom: 1em;
}

.comment-form label {
	display: block;
	font-size: 15px;
	margin-bottom: 4px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	max-width: 100%;
	font-family: var(--yesha-font-body);
	font-size: 16px;
	color: var(--yesha-text);
	border: 1px solid var(--yesha-rule);
	padding: 9px 12px;
	background: #fff;
}

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

.no-comments {
	font-style: italic;
}

/* ==========================================================================
   10. Page 404 et absence de résultats
   ========================================================================== */

.no-results,
.error-404 {
	max-width: 640px;
}

/* ==========================================================================
   11. Footer — même fond et mêmes couleurs que le site source
   ========================================================================== */

.site-footer {
	flex: 0 0 auto;
	background-color: var(--yesha-footer-bg);
	color: var(--yesha-footer-text);
	padding-block: 40px;
	font-size: 16px;
}

.site-footer-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.footer-logo {
	display: block;
	width: 64px;
	height: auto;
}

.footer-brand {
	font-family: var(--yesha-font-title);
	font-size: 20px;
	line-height: 1.2;
	color: var(--yesha-footer-link);
	margin: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.footer-contact {
	margin: 0;
	line-height: 1.7;
}

.footer-contact a,
.footer-social a,
.site-footer a {
	color: var(--yesha-footer-link);
	text-decoration: underline;
}

.footer-social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-legal {
	margin: 0;
	max-width: 780px;
	font-size: 14px;
	line-height: 1.6;
}

.footer-copyright {
	margin: 0;
	font-size: 15px;
}

/* ==========================================================================
   12. Blocs et alignements de l'éditeur
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0.3em 1.6em 1.2em 0;
}

.alignright {
	float: right;
	margin: 0.3em 0 1.2em 1.6em;
}

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

.wp-caption-text,
.wp-block-image figcaption {
	font-size: 14px;
	text-align: center;
}

.sticky .entry-title::after {
	content: " ★";
	color: var(--yesha-accent);
}
