/*
Theme Name: Hello Elementor Child (VDL)
Theme URI: https://bmmc57.fr/
Description: Thème enfant du réseau. Reprend en PHP natif les gabarits que fournissait Elementor Pro (en-tête, pied de page, article unique) afin de supprimer la dépendance à la licence Pro. Elementor gratuit reste requis pour les pages construites dans l'éditeur.
Author: VDL
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* Valeurs reprises telles quelles du CSS généré par les gabarits Pro
   (post-8.css en-tête, post-9.css pied de page, post-11.css article),
   afin que le rendu reste identique après la bascule. */

:root {
	--vdl-accent: #0E7C86;
	--vdl-badge: #E4A16E;
	--vdl-logo-width: 140px;
	--vdl-width: 1140px;
	--vdl-width-header: 1312px;
	--vdl-text: #1D1D1D;
}

/* ------------------------------------------------------------------ base */

.vdl-main {
	display: block;
}

/* Les widgets Elementor héritaient de la typographie globale du kit (Roboto).
   Sans cette règle, tout ce que je n'ai pas typé explicitement retombe sur la
   pile système du reset — c'est ce qui faisait « changer les polices ».
   Les exceptions (Inter au menu, Anton dans le pied, Lora sur les titres de
   section) restent définies plus bas et gardent la main. */
.vdl-header,
.vdl-main,
.vdl-footer {
	font-family: "Roboto", sans-serif;
}

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

.skip-link:focus {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 16px;
	clip: auto;
	background: #fff;
	color: #000;
}

/* ---------------------------------------------------------------- header */

.vdl-header {
	background-color: #FFFFFF;
	border-bottom: 1px solid #D0D5DD;
}

.vdl-header__inner {
	max-width: var(--vdl-width-header);
	margin: 0 auto;
	min-height: 80px;
	padding: 0 5%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: nowrap;
	gap: 16px;
}

.vdl-header__logo img {
	/* Borne la largeur ET la hauteur : un logo carré (maison-sports le sera)
	   ferait sinon passer l'en-tête de 80 px à la largeur du logo. Un logo
	   large reste cadré par max-width et n'est pas affecté. */
	max-width: var(--vdl-logo-width);
	max-height: 60px;
	width: auto;
	height: auto;
	display: block;
}

.vdl-logo__text {
	font-family: "Inter", sans-serif;
	font-weight: 600;
	font-size: 20px;
	color: #344054;
	text-decoration: none;
}

.vdl-menu {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vdl-menu a {
	display: block;
	padding: 0 12px;
	font-family: "Inter", sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 150%;
	text-transform: capitalize;
	text-decoration: none;
	color: #667085;
	fill: #667085;
}

.vdl-menu a:hover,
.vdl-menu a:focus,
.vdl-menu .current-menu-item > a,
.vdl-menu .current_page_item > a {
	color: #475467;
}

/* sous-menus */
.vdl-menu li {
	position: relative;
}

.vdl-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 50;
	min-width: 200px;
	margin-top: 4px;
	padding: 0;
	list-style: none;
	background-color: #FFFFFF;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.vdl-menu li:hover > .sub-menu,
.vdl-menu li:focus-within > .sub-menu {
	display: block;
}

.vdl-menu .sub-menu a {
	padding: 12px;
	font-size: 15px;
}

/* bouton mobile */
.vdl-nav-toggle {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 8px;
	background: none;
	border: 0;
	cursor: pointer;
}

.vdl-nav-toggle__bar {
	display: block;
	width: 24px;
	height: 2px;
	background-color: #344054;
}

/* ---------------------------------------------------------------- footer */

.vdl-footer__cols {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: stretch;
	max-width: var(--vdl-width);
	margin: 0 auto;
	padding: 20px;
	gap: 24px;
}

.vdl-footer__col {
	flex: 1 1 220px;
}

.vdl-footer__col--logo {
	align-self: flex-start;
	text-align: center;
}

.vdl-footer__logo img {
	max-width: 50%;
	max-height: 120px;   /* même raison qu'en en-tête : logo carré */
	width: auto;
	height: auto;
	margin: 0 auto;
	display: block;
}

.vdl-footer__heading {
	margin: 0 0 8px;
	font-family: "Anton", sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 25px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: #000000;
}

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

.vdl-footer__menu li {
	margin-bottom: 3px;
}

.vdl-footer__menu a {
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.6em;
	letter-spacing: -0.45px;
	text-decoration: none;
	color: #000000;
}

.vdl-footer__menu a:hover,
.vdl-footer__menu a:focus {
	color: #626060;
}

.vdl-footer__bar {
	min-height: 50px;
	padding: 0 5%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--vdl-accent);
}

.vdl-footer__copyright {
	margin: 0;
	text-align: center;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	font-weight: 300;
	line-height: 1.6em;
	letter-spacing: -0.45px;
	color: #FFFFFF;
}

/* ------------------------------------------------------- article : hero */

/* Les conteneurs Elementor portaient une gouttière latérale ; sans elle le texte
   colle aux bords de la fenêtre dès que celle-ci est plus étroite que 1140px. */
.vdl-hero,
.vdl-article,
.vdl-related {
	box-sizing: border-box;
	padding-inline: 20px;
}

.vdl-hero {
	position: relative;
	max-width: var(--vdl-width);
	margin: 32px auto;
	background-color: #FFFFFF;
}

.vdl-hero__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Callé sur l'image, pas sur le conteneur : celui-ci porte une gouttière. */
.vdl-hero__overlay {
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 0;
	padding: 16px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	border-radius: 8px;
	background-image: linear-gradient(180deg, #FFFFFF00 0%, #000000 90%);
}

.vdl-hero__badge {
	align-self: flex-start;
	padding: 2px 10px;
	border-radius: 4px;
	background-color: var(--vdl-badge);
	font-size: 12px;
	color: #FFFFFF;
	text-decoration: none;
}

.vdl-hero__title {
	margin: 0;
	max-width: 70%;
	font-family: "Roboto", sans-serif;   /* typographie « primary » du kit */
	font-size: 34px;
	font-weight: 600;
	line-height: 1.2;
	color: #FFFFFF;
}

.vdl-hero__meta {
	display: flex;
	gap: 16px;
	font-size: 14px;
	color: #FFFFFF;
}

/* ---------------------------------------------------- article : contenu */

.vdl-article {
	max-width: var(--vdl-width);
	margin: 0 auto;
	background-color: #FFFFFF;
}

.vdl-breadcrumb {
	margin-bottom: 16px;
	font-size: 14px;
}

.vdl-article__content {
	font-family: "Roboto", sans-serif;
	font-weight: 400;
	color: var(--vdl-text);
}

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

/* Les tableaux sont déjà entièrement stylés par le reset de Hello Elementor
   (bordures, padding 15px, zébrage, survol, width:100%). On ne les touche pas :
   les surcharger ici revenait à remplacer un style complet par un moins bon.
   Seule concession, en petit écran, pour éviter le débordement horizontal. */
@media (max-width: 600px) {
	.vdl-article__content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}

/* Rythme éditorial : le reset met les marges de liste à zéro, ce qui colle
   les listes au texte. On rend l'espacement que le contenu attend. */
.vdl-article__content > * + * {
	margin-block-start: 1rem;
}

.vdl-article__content h2 {
	margin-block-start: 2.5rem;
	margin-block-end: 1rem;
}

.vdl-article__content h3 {
	margin-block-start: 1.75rem;
	margin-block-end: .75rem;
}

.vdl-article__content ul,
.vdl-article__content ol {
	margin-block-end: 1rem;
	padding-inline-start: 1.5rem;
}

.vdl-article__content li {
	margin-block-end: .35rem;
}

.vdl-article__content li > ul,
.vdl-article__content li > ol {
	margin-block-start: .35rem;
}

/* -------------------------------------------------------- sommaire (TOC) */

.vdl-toc {
	margin: 0 0 24px;
	padding: 16px 20px;
	border: 1px solid #E4E7EC;
	border-radius: 15px;
	background-color: #FFFFFF;
}

.vdl-toc__header {
	display: flex;
	flex-direction: row;
	align-items: center;
	margin-bottom: 8px;
}

.vdl-toc__title {
	font-family: "Roboto", sans-serif;
	font-weight: 600;
	font-size: 18px;
	color: var(--vdl-text);
	text-align: start;
}

.vdl-toc__list {
	margin: 0;
	padding-left: 20px;
}

.vdl-toc__item a {
	color: var(--vdl-text);
	text-decoration: none;
}

.vdl-toc__item a:hover,
.vdl-toc__item a:focus {
	text-decoration: underline;
}

/* ------------------------------------------------ archives / catégories */

/* Reprend le gabarit d'archive du réseau (titre centré, champ de recherche,
   grille de cartes) que rendait Elementor Pro. */

.vdl-archive {
	max-width: var(--vdl-width);
	margin: 0 auto;
	padding: 40px 20px 60px;
	box-sizing: border-box;
}

.vdl-archive__title {
	margin: 0 0 12px;
	text-align: center;
	font-family: "Lora", sans-serif;
	font-size: 34px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--vdl-text);
}

.vdl-archive__description {
	max-width: 760px;
	margin: 0 auto 24px;
	text-align: center;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	color: #5A5A5A;
}

.vdl-archive__description p:last-child {
	margin-bottom: 0;
}

.vdl-archive__search {
	display: flex;
	justify-content: center;
	margin: 0 0 32px;
}

.vdl-archive__search form {
	display: flex;
	gap: 8px;
	width: 100%;
	max-width: 420px;
}

.vdl-archive__search input[type="search"],
.vdl-archive__search input[type="text"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	border: 1px solid #D0D5DD;
	border-radius: 8px;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
}

.vdl-archive__search button,
.vdl-archive__search input[type="submit"] {
	flex: 0 0 auto;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background-color: var(--vdl-accent);
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	color: #FFFFFF;
	cursor: pointer;
}

.vdl-archive__empty {
	text-align: center;
	font-family: "Roboto", sans-serif;
	color: #5A5A5A;
}

/* Pagination : sortie standard de the_posts_pagination(). Indispensable ici,
   une catégorie du réseau dépasse largement la première page. */

.vdl-archive .pagination {
	margin-top: 40px;
}

.vdl-archive .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.vdl-archive .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	box-sizing: border-box;
	border: 1px solid #D0D5DD;
	border-radius: 8px;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	color: var(--vdl-text);
	text-decoration: none;
}

.vdl-archive .page-numbers:hover {
	border-color: var(--vdl-accent);
}

.vdl-archive .page-numbers.current {
	border-color: var(--vdl-accent);
	background-color: var(--vdl-accent);
	color: #FFFFFF;
}

.vdl-archive .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ------------------------------------------- grille d'articles (cartes) */

.vdl-related {
	max-width: var(--vdl-width);
	margin: 20px auto 0;
	padding: 0 0 20px;
}

.vdl-related__title {
	margin: 0 0 18px;
	text-align: center;
	font-family: "Lora", sans-serif;
	font-size: 30px;
	font-weight: 600;
}

.vdl-grid {
	display: grid;
	gap: 25px;
	align-items: stretch;
}

.vdl-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.vdl-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.vdl-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.vdl-grid--cols-1 { grid-template-columns: 1fr; }

.vdl-card {
	display: flex;
	flex-direction: column;
	height: 100%;          /* cartes de hauteur égale sur une même ligne */
	overflow: hidden;
	border-radius: 12px;
	background-color: #FFFFFF;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .1);
}

.vdl-card__thumb {
	position: relative;
	display: block;
	width: 100%;
	padding-bottom: 60%; /* ratio 0.6, comme le skin cards */
	overflow: hidden;
}

.vdl-card__thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vdl-card__badge {
	position: absolute;
	top: 0;
	right: 0;
	margin: 20px;
	padding: 4px 8px;
	border-radius: 8px;
	background-color: var(--vdl-accent);
	font-size: 10px;
	color: #FFFFFF;
}

/* Colonne souple : la méta est poussée en bas par `margin-top:auto`, ce qui
   aligne les dates entre cartes voisines quel que soit le nombre de lignes
   du titre. Un espacement fixe sous le titre les décalait. */
.vdl-card__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	margin-top: 8px;
	padding: 12px 16px 16px;
}

.vdl-card__title {
	margin: 0 0 16px;
	font-family: "Roboto", sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

.vdl-card__title a {
	color: inherit;
	text-decoration: none;
}

.vdl-card__meta {
	margin-top: auto;      /* épingle la date en bas de carte */
	font-size: 14px;
	color: #667085;
}

.vdl-card__meta span + span::before {
	content: "•";
	margin: 0 6px;
}

/* --- Variante liste (1 colonne) : « Les articles tendances » ---------------
   Le widget d'origine était une liste compacte — vignette à gauche (~48% de
   large), titre à droite, ni date ni badge. En grandes cartes empilées, le
   bloc devenait beaucoup trop haut. */

.vdl-grid--cols-1 {
	gap: 14px;
}

.vdl-grid--cols-1 .vdl-card {
	flex-direction: row;
	align-items: center;
	gap: 12px;
	height: auto;
	border-radius: 8px;
	box-shadow: none;
	background-color: transparent;
}

.vdl-grid--cols-1 .vdl-card__thumb {
	flex: 0 0 42%;
	width: 42%;
	padding-bottom: 0;          /* le ratio ne passe plus par un padding */
	aspect-ratio: 3 / 2;
	border-radius: 6px;
}

.vdl-grid--cols-1 .vdl-card__badge {
	display: none;              /* illisible à cette taille, et absent du modèle */
}

.vdl-grid--cols-1 .vdl-card__body {
	margin-top: 0;
	padding: 0;
	justify-content: center;
}

.vdl-grid--cols-1 .vdl-card__title {
	margin: 0;
	font-size: 15px;
	line-height: 1.35;
}

.vdl-grid--cols-1 .vdl-card__meta {
	display: none;              /* la liste d'origine ne portait pas de date */
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 767px) {
	.vdl-nav-toggle {
		display: flex;
	}

	.vdl-header__nav {
		display: none;
		position: absolute;
		left: 0;
		right: 0;
		z-index: 60;
		background-color: #FFFFFF;
		box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
	}

	.vdl-header__nav.is-open {
		display: block;
	}

	.vdl-header__inner {
		position: relative;
		flex-wrap: wrap;
	}

	.vdl-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.vdl-menu a {
		padding: 12px 16px;
		font-size: 16px;
	}

	.vdl-menu .sub-menu {
		position: static;
		box-shadow: none;
	}

	.vdl-footer__cols {
		padding: 15% 5% 5%;
	}

	.vdl-footer__menu a,
	.vdl-footer__copyright {
		font-size: 14px;
	}

	.vdl-hero {
		margin: 0 auto;
	}

	.vdl-hero__overlay {
		padding: 10px;
	}

	.vdl-hero__title {
		max-width: 100%;
		font-size: 20px;
	}

	.vdl-article {
		padding: 16px;
	}

	.vdl-card__thumb {
		padding-bottom: 50%; /* ratio 0.5 en mobile */
	}

	.vdl-grid--cols-4,
	.vdl-grid--cols-3,
	.vdl-grid--cols-2 {
		grid-template-columns: 1fr;
	}
}

/* Palier intermédiaire : à 4 colonnes les cartes deviennent illisibles bien
   avant 767px (vignette ~240px et titres sur 4 lignes). On passe à 2 dès la
   tablette, ce dont les grilles à 3 colonnes n'ont pas besoin. */
@media (min-width: 768px) and (max-width: 1100px) {
	.vdl-grid--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}
