/*
Theme Name: Halles Foreziennes – Le Journal
Theme URI: https://www.halles-foreziennes.com/
Author: Oscar-seo
Description: Thème de blog aux couleurs, à la typographie et à la navigation du site Halles Foreziennes, pour que le passage du site au blog soit invisible pour le visiteur. Header, footer, liste d'articles, article, page, archives, recherche, commentaires, 404 et colonne latérale. Interface en français.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hf-journal
Tags: blog, one-column, custom-logo, custom-menu, translation-ready
*/

/* =============================================================================
   1. Variables — couleurs prélevées sur www.halles-foreziennes.com
   ========================================================================== */

:root {
	--hf-green: #008244;        /* couleur d'accent : boutons, liens, footer */
	--hf-green-dark: #006c39;   /* survol des boutons verts */
	--hf-logo-green: #275b23;   /* vert du logo */
	--hf-red: #a22027;          /* bandeau de livraison en haut du site */
	--hf-text: #2d2d2d;         /* texte courant */
	--hf-white: #ffffff;
	--hf-bg: #ffffff;           /* fond de page */
	--hf-line: #e6e6e6;         /* filets discrets */
	--hf-muted: #6b6b6b;

	--hf-font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--hf-container: 1320px;
	--hf-radius: 20px;
}

/* =============================================================================
   2. Base
   ========================================================================== */

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

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

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

img,
svg,
iframe,
video {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--hf-green);
	text-decoration: underline;
	text-underline-offset: 2px;
}

a:hover,
a:focus {
	color: var(--hf-green-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 16px;
	color: var(--hf-text);
	font-weight: 800;
	line-height: 1.2;
}

h1 {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.2;
}

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

h3 {
	font-size: clamp(20px, 2.4vw, 24px);
}

h4 {
	font-size: 20px;
}

h5,
.h5 {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
}

h6 {
	font-size: 16px;
}

p {
	margin: 0 0 16px;
}

.p2 {
	font-size: 12.8px;
	font-weight: 400;
}

blockquote {
	margin: 24px 0;
	padding: 8px 0 8px 20px;
	border-left: 4px solid var(--hf-green);
	color: var(--hf-text);
	font-style: italic;
}

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

pre {
	overflow: auto;
	padding: 16px;
	border-radius: 8px;
	background: #f5f5f5;
}

table {
	width: 100%;
	margin: 0 0 24px;
	border-collapse: collapse;
}

th,
td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--hf-line);
	text-align: left;
}

hr {
	height: 1px;
	margin: 32px 0;
	border: 0;
	background: var(--hf-line);
}

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

/* Accessibilité */

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

.skip-link:focus {
	position: fixed !important;
	z-index: 100;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	clip: auto;
	clip-path: none;
	padding: 12px 20px;
	border-radius: 8px;
	background: var(--hf-white);
	color: var(--hf-green);
	font-weight: 700;
}

/* =============================================================================
   3. Conteneur
   ========================================================================== */

.container {
	width: 100%;
	max-width: var(--hf-container);
	margin: 0 auto;
	padding: 0 12px;
}

/* =============================================================================
   4. Boutons — repris du site
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	max-width: 100%;
	padding: 16px 24px;
	border: 0;
	border-radius: var(--hf-radius);
	font-family: var(--hf-font);
	font-size: 16px;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
	background: var(--hf-green);
	color: var(--hf-white);
	font-weight: 700;
}

.btn--primary:hover,
.btn--primary:focus {
	background: var(--hf-green-dark);
	color: var(--hf-white);
}

.btn--wide {
	padding: 16px 38.4px;
}

.btn--light {
	background: var(--hf-white);
	color: var(--hf-green);
	font-weight: 400;
}

.btn--light:hover,
.btn--light:focus {
	background: #f0f0f0;
	color: var(--hf-green-dark);
}

.btn__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
}

/* =============================================================================
   5. Header
   ========================================================================== */

.site-header {
	background: var(--hf-white);
}

.message-banner {
	padding: 6px 12px;
	background: var(--hf-red);
	color: var(--hf-white);
	font-size: clamp(15px, 2vw, 22px);
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 8px 0;
}

/* --- Marque : logo + infos pratiques. Largeur bornée, jamais de débordement. */

.site-branding {
	flex: 0 1 auto;
	min-width: 0;
	max-width: 260px;
}

.site-logo__link {
	display: inline-block;
	max-width: 100%;
	color: var(--hf-logo-green);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.25;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.site-logo__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: 48px;
	object-fit: contain;
	object-position: left center;
}

/* Repli texte si aucun logo n'est disponible : le titre passe à la ligne. */

.site-title {
	display: block;
	max-width: 100%;
	margin: 0;
	color: var(--hf-logo-green);
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 800;
	line-height: 1.2;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.site-contact-infos {
	margin: 8px 0 0;
	color: var(--hf-text);
	font-size: 12px;
	line-height: 18px;
}

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

.site-contact-infos a:hover,
.site-contact-infos a:focus {
	color: var(--hf-green);
	text-decoration: underline;
}

/* --- Navigation : mêmes intitulés, même ordre, actif en vert.
       Le bouton « Être rappelé » est le dernier enfant de <nav>, comme sur le site. */

.site-navigation {
	display: flex;
	flex: 0 1 auto;
	align-items: center;
	gap: 32px;
	min-width: 0;
}

.site-navigation .menu-wrapper {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 32px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-navigation .menu-item {
	min-width: 0;
	text-align: center;
}

.site-navigation .menu-item > a {
	color: var(--hf-text);
	font-size: 20px;
	font-weight: 700;
	line-height: 30px;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.site-navigation > .btn {
	flex: 0 0 auto;
}

.site-navigation .menu-item > a:hover,
.site-navigation .menu-item > a:focus {
	color: var(--hf-green);
}

/* Mise en valeur de l'onglet actif, comme sur le site : texte en vert. */

.site-navigation .current-menu-item > a,
.site-navigation .current_page_item > a,
.site-navigation .current-menu-parent > a,
.site-navigation .current-menu-ancestor > a,
.site-navigation .current-post-ancestor > a {
	color: var(--hf-green);
}

/* --- Bouton burger (mobile uniquement) */

.site-header__burger {
	display: none;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--hf-green);
	cursor: pointer;
}

.site-header__burger-bars,
.site-header__burger-bars::before,
.site-header__burger-bars::after {
	display: block;
	width: 24px;
	height: 2px;
	margin: 0 auto;
	background: currentColor;
	content: "";
}

.site-header__burger-bars::before {
	transform: translateY(-7px);
}

.site-header__burger-bars::after {
	transform: translateY(5px);
}

/* =============================================================================
   6. Header — adaptations écrans intermédiaires et mobiles
   ========================================================================== */

/* Un onglet de plus que le site (celui du blog) : on resserre progressivement
   au lieu de laisser le menu déborder ou chevaucher le bouton. */

@media (max-width: 1319px) {

	.site-navigation,
	.site-navigation .menu-wrapper {
		gap: 24px;
	}

	.site-navigation .menu-item > a {
		font-size: 18px;
		line-height: 26px;
	}
}

@media (max-width: 1150px) {

	.site-navigation,
	.site-navigation .menu-wrapper {
		gap: 16px;
	}

	.site-navigation .menu-item > a {
		font-size: 16px;
		line-height: 24px;
	}

	.btn--wide {
		padding: 14px 20px;
	}
}

@media (max-width: 991px) {

	.site-header__inner {
		flex-wrap: wrap;
	}

	.site-branding {
		max-width: calc(100% - 72px);
	}

	.site-header__burger {
		display: block;
	}

	.site-navigation {
		display: none;
		flex: 1 0 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding-top: 8px;
		border-top: 1px solid var(--hf-line);
	}

	.site-navigation.is-open {
		display: flex;
	}

	.site-navigation .menu-wrapper {
		flex-direction: column;
		flex-wrap: wrap;
		align-items: flex-start;
		gap: 4px;
	}

	.site-navigation .menu-item {
		width: 100%;
		text-align: left;
	}

	.site-navigation .menu-item > a {
		display: block;
		padding: 10px 0;
		font-size: 18px;
	}

	.site-navigation > .btn {
		width: 100%;
	}
}

/* =============================================================================
   7. Contenu
   ========================================================================== */

.site-content {
	padding: 40px 0 56px;
}

.content-area {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

body:not(.no-sidebar) .content-area {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 992px) {

	body:not(.no-sidebar) .content-area {
		grid-template-columns: minmax(0, 1fr) 300px;
	}
}

.page-header {
	margin-bottom: 32px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--hf-line);
}

.page-header__title {
	margin: 0;
}

.page-header__subtitle {
	margin: 8px 0 0;
	color: var(--hf-muted);
	font-size: 16px;
}

/* --- Liste d'articles */

.post-list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
}

@media (min-width: 700px) {

	.post-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

body.no-sidebar .post-list {
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 700px) {

	body.no-sidebar .post-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {

	body.no-sidebar .post-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.entry-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--hf-line);
	border-radius: var(--hf-radius);
	background: var(--hf-white);
}

.entry-card__thumb {
	display: block;
	margin: 0;
	line-height: 0;
}

.entry-card__thumb img {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.entry-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 20px;
}

.entry-card__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.3;
}

.entry-card__title a {
	color: var(--hf-text);
	text-decoration: none;
}

.entry-card__title a:hover,
.entry-card__title a:focus {
	color: var(--hf-green);
}

.entry__meta {
	margin: 0 0 12px;
	color: var(--hf-muted);
	font-size: 14px;
}

.entry-card__excerpt {
	margin: 0 0 16px;
	color: var(--hf-text);
}

.entry-card__more {
	margin-top: auto;
	color: var(--hf-green);
	font-weight: 700;
	text-decoration: none;
}

.entry-card__more:hover,
.entry-card__more:focus {
	text-decoration: underline;
}

/* --- Article seul / page */

.entry {
	min-width: 0;
	max-width: 800px;
}

.entry__header {
	margin-bottom: 24px;
}

.entry__title {
	margin: 0 0 8px;
}

.entry__thumb {
	margin: 0 0 24px;
	line-height: 0;
}

.entry__thumb img {
	width: 100%;
	border-radius: var(--hf-radius);
}

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

.entry__content ul,
.entry__content ol {
	margin: 0 0 16px;
	padding-left: 24px;
}

.entry__content li {
	margin-bottom: 6px;
}

.entry__content figure {
	margin: 24px 0;
}

.entry__content figcaption {
	color: var(--hf-muted);
	font-size: 14px;
}

.entry__footer {
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid var(--hf-line);
	color: var(--hf-muted);
	font-size: 14px;
}

.entry__footer a {
	color: var(--hf-green);
}

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

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

.alignleft {
	float: left;
	margin: 0 24px 16px 0;
}

.alignright {
	float: right;
	margin: 0 0 16px 24px;
}

.sticky .entry-card {
	border-color: var(--hf-green);
}

/* --- Navigation entre articles */

.post-navigation {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--hf-line);
}

.post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
}

.post-navigation a {
	color: var(--hf-green);
	font-weight: 700;
	text-decoration: none;
}

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

/* --- Pagination */

.pagination {
	margin-top: 48px;
}

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

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--hf-line);
	border-radius: 12px;
	color: var(--hf-text);
	text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers:focus {
	border-color: var(--hf-green);
	color: var(--hf-green);
}

.pagination .page-numbers.current {
	border-color: var(--hf-green);
	background: var(--hf-green);
	color: var(--hf-white);
	font-weight: 700;
}

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

.sidebar {
	min-width: 0;
}

.widget {
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--hf-line);
}

.widget:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.widget__title {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 800;
}

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

.widget li {
	margin-bottom: 8px;
}

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

.widget a:hover,
.widget a:focus {
	color: var(--hf-green);
	text-decoration: underline;
}

/* =============================================================================
   9. Formulaire de recherche
   ========================================================================== */

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: 520px;
}

.search-form__field {
	flex: 1 1 200px;
	min-width: 0;
	padding: 13px 16px;
	border: 1px solid var(--hf-line);
	border-radius: var(--hf-radius);
	color: var(--hf-text);
	font-family: var(--hf-font);
	font-size: 16px;
}

.search-form__field:focus {
	border-color: var(--hf-green);
	outline: none;
}

/* =============================================================================
   10. Commentaires
   ========================================================================== */

.comments-area {
	max-width: 800px;
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--hf-line);
}

.comments-area__title {
	font-size: 24px;
}

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

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

.comment-body {
	margin-bottom: 24px;
	padding: 20px;
	border: 1px solid var(--hf-line);
	border-radius: var(--hf-radius);
}

.comment-meta {
	margin-bottom: 8px;
	font-size: 14px;
}

.comment-author .fn {
	font-weight: 700;
	font-style: normal;
}

.comment-author img {
	border-radius: 50%;
	vertical-align: middle;
}

.comment-metadata,
.comment-metadata a {
	color: var(--hf-muted);
	text-decoration: none;
}

.comment-reply-link {
	color: var(--hf-green);
	font-weight: 700;
	text-decoration: none;
}

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

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	max-width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--hf-line);
	border-radius: 12px;
	color: var(--hf-text);
	font-family: var(--hf-font);
	font-size: 16px;
}

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

.comment-form p {
	margin-bottom: 16px;
}

.comment-form .form-submit input[type="submit"] {
	display: inline-flex;
	padding: 16px 38.4px;
	border: 0;
	border-radius: var(--hf-radius);
	background: var(--hf-green);
	color: var(--hf-white);
	font-family: var(--hf-font);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}

.comment-form .form-submit input[type="submit"]:hover {
	background: var(--hf-green-dark);
}

.comment-notes,
.comment-form-cookies-consent label {
	color: var(--hf-muted);
	font-size: 14px;
	font-weight: 400;
}

.no-comments {
	color: var(--hf-muted);
}

/* =============================================================================
   11. Page 404 / aucun résultat
   ========================================================================== */

.empty-state {
	max-width: 800px;
}

.empty-state__title {
	margin-bottom: 8px;
}

.empty-state__text {
	margin-bottom: 24px;
}

.empty-state__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

/* =============================================================================
   12. Footer — repris du site
   ========================================================================== */

.site-footer {
	margin-top: 48px;
	padding: 32px 0 0;
	background: var(--hf-green);
	color: var(--hf-white);
	font-size: 16px;
}

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

.site-footer a:hover,
.site-footer a:focus {
	color: var(--hf-white);
	text-decoration: underline;
}

.footer__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 32px;
	padding-bottom: 32px;
}

@media (min-width: 1100px) {

	.footer__inner {
		gap: 48px 32px;
	}
}

@media (min-width: 700px) {

	.footer__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {

	.footer__inner {
		grid-template-columns: 1.7fr 1fr 1fr 1.3fr 1fr;
	}
}

.footer__info {
	min-width: 0;
}

.footer__logo {
	margin-bottom: 24px;
}

.footer__logo .site-logo__link {
	color: var(--hf-white);
}

.footer__logo .site-logo__img {
	width: 267px;
	max-width: 100%;
	height: auto;
}

.footer__top-right .h5 {
	color: var(--hf-white);
}

.footer__top-right .p2 {
	margin: 0;
}

.footer__column {
	min-width: 0;
}

.footer__column .h5 {
	color: var(--hf-white);
}

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

.footer__column li {
	margin-bottom: 2px;
	line-height: 1.5;
}

.site-footer .btn--light {
	margin-top: 16px;
	color: var(--hf-green);
	text-decoration: none;
}

.site-footer .btn--light:hover,
.site-footer .btn--light:focus {
	background: #f0f0f0;
	color: var(--hf-green-dark);
	text-decoration: none;
}

.footer__bottom {
	padding: 16px 0;
	border-top: 1.33px solid var(--hf-white);
	text-align: center;
}

/* =============================================================================
   13. Impression
   ========================================================================== */

@media print {

	.message-banner,
	.site-navigation,
	.site-header__burger,
	.site-footer,
	.comments-area,
	.pagination {
		display: none !important;
	}
}
