/*
 * OETL — styles complémentaires à theme.json.
 * Parti pris « presse sportive » (inspiré de lequipe.fr) : fond blanc, rendu
 * plat, titres condensés en gras, hiérarchie portée par la typographie.
 */

:root {
	--oetl-aside: 320px;
	--oetl-titre: var(--wp--preset--font-family--roboto-condensed);
	--oetl-trait: 1px solid var(--wp--preset--color--bordure);
}

body {
	-webkit-font-smoothing: antialiased;
}

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

/* ---------- En-tête ---------- */

.oetl-header {
	position: relative;
	z-index: 50;
	border-bottom: var(--oetl-trait);
}

.oetl-logo {
	display: inline-block;
	line-height: 0;
}

.oetl-logo img {
	width: 160px;
	height: auto;
}

.oetl-header__ad {
	display: flex;
	justify-content: flex-end;
	max-width: 728px;
}

.oetl-header__aside {
	flex: 1 1 auto;
	align-items: flex-end !important;
	gap: 0.5rem !important;
	min-width: 0;
}

.oetl-nav-menu__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.oetl-account-menu a {
	font-family: var(--oetl-titre);
	font-size: 14px;
	font-weight: 700;
	color: var(--wp--preset--color--gris);
}

.oetl-account-menu a:hover,
.oetl-account-menu a:focus {
	color: var(--wp--preset--color--rouge);
}

/* Barre de rubriques : texte noir, rubrique active soulignée en rouge */
.oetl-header__nav {
	border-top: var(--oetl-trait);
}

.oetl-primary-nav .wp-block-navigation-item__content {
	display: block;
	padding: 0.8em 0.75em;
	font-size: 15px;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	white-space: nowrap;
	box-shadow: inset 0 -3px 0 transparent;
}

.oetl-primary-nav .wp-block-navigation-item__content:hover,
.oetl-primary-nav .wp-block-navigation-item__content:focus,
.oetl-primary-nav .current-menu-item > .wp-block-navigation-item__content,
.oetl-primary-nav .current-menu-ancestor > .wp-block-navigation-item__content {
	color: var(--wp--preset--color--rouge);
	box-shadow: inset 0 -3px 0 var(--wp--preset--color--rouge);
}

.oetl-primary-nav .wp-block-navigation__submenu-container {
	border: var(--oetl-trait) !important;
}

.oetl-header__search .wp-block-search__button {
	padding: 0.4em;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--encre);
}

.oetl-header__search .wp-block-search__button:hover {
	color: var(--wp--preset--color--rouge);
}

.oetl-header__search .wp-block-search__input {
	border: var(--oetl-trait);
	border-radius: 2px;
}

@media (max-width: 781px) {
	.oetl-header__top {
		padding-block: var(--wp--preset--spacing--20) !important;
	}

	.oetl-header__brand {
		flex-wrap: nowrap !important;
	}

	.oetl-logo img {
		width: 112px;
	}

	.oetl-header__ad {
		display: none;
	}

	/* Rubriques sur une ligne ; sous-menus déroulants conservés comme sur desktop */
	.oetl-header__nav > .alignwide {
		flex-wrap: nowrap !important;
		gap: 0;
	}

	.oetl-primary-nav {
		flex: 1 1 auto;
		min-width: 0;
	}

	.oetl-primary-nav .wp-block-navigation-item__content {
		padding: 0.75em 0.4em;
		font-size: 14px;
	}

	.oetl-primary-nav .wp-block-navigation__submenu-icon {
		width: auto;
		height: auto;
		margin: 0 !important;
		padding: 0.75em 0.4em 0.75em 0;
	}

	.oetl-primary-nav .wp-block-navigation__submenu-icon svg {
		width: 10px;
		height: 10px;
	}

	.oetl-primary-nav .wp-block-navigation__submenu-container {
		z-index: 50;
		max-width: calc(100vw - 2rem);
	}

	.oetl-primary-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
		white-space: normal;
	}
}

@media (max-width: 380px) {
	.oetl-primary-nav .wp-block-navigation-item__content {
		padding-inline: 0.2em;
		font-size: 13px;
		letter-spacing: 0;
	}
}

/* ---------- Mise en page ---------- */

.oetl-main {
	padding-block: var(--wp--preset--spacing--40);
}

.oetl-layout {
	gap: var(--wp--preset--spacing--50);
}

.oetl-content {
	min-width: 0;
}

.oetl-aside {
	flex-basis: var(--oetl-aside) !important;
	flex-grow: 0 !important;
	min-width: 0;
}

@media (max-width: 781px) {
	.oetl-main {
		padding-block: var(--wp--preset--spacing--30);
	}

	.oetl-aside {
		flex-basis: 100% !important;
		padding-top: var(--wp--preset--spacing--40);
		border-top: 4px solid var(--wp--preset--color--encre);
	}
}

/* ---------- Titres de rubrique ---------- */

.is-style-oetl-bandeau,
.oetl-sidebar .widget-title {
	margin: 0 0 var(--wp--preset--spacing--30);
	padding-bottom: 0.35em;
	border-bottom: 2px solid var(--wp--preset--color--encre);
	font-family: var(--oetl-titre);
	font-size: 22px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: 0;
	text-transform: uppercase;
	color: var(--wp--preset--color--encre);
}

h1.is-style-oetl-bandeau {
	font-size: clamp(26px, 3.2vw, 34px);
}

/* Page d'accueil statique : le titre « Accueil » n'apporte rien */
.home .oetl-article > .wp-block-post-title {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.home .oetl-article > .wp-block-post-content {
	margin-top: 0;
}

/* ---------- Rubrique (sur-titre rouge) ---------- */

.wp-block-post-terms.is-style-oetl-badge {
	font-family: var(--oetl-titre);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.wp-block-post-terms.is-style-oetl-badge a {
	color: var(--wp--preset--color--rouge);
}

.wp-block-post-terms.is-style-oetl-badge a:hover {
	color: var(--wp--preset--color--encre);
}

.wp-block-post-terms.is-style-oetl-badge .wp-block-post-terms__separator {
	color: var(--wp--preset--color--gris-clair);
}

.oetl-article > .is-style-oetl-badge {
	margin-bottom: var(--wp--preset--spacing--20);
}

/* Style « Carte » conservé pour les contenus existants, rendu plat */
.is-style-oetl-carte {
	background: var(--wp--preset--color--blanc);
}

/* ---------- Cartes et listes ---------- */

.oetl-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.oetl-card .oetl-featured-media {
	margin: 0;
}

.oetl-card__body {
	flex: 1;
	padding-inline: 0 !important;
}

.oetl-card .wp-block-post-title,
.oetl-list-item .wp-block-post-title {
	line-height: 1.2;
}

.oetl-card .wp-block-post-title a:hover,
.oetl-list-item .wp-block-post-title a:hover {
	color: var(--wp--preset--color--rouge);
}

.oetl-grille .wp-block-post-template {
	gap: var(--wp--preset--spacing--40);
}

.oetl-card img,
.oetl-list-item__media img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.oetl-list-item {
	padding-block: var(--wp--preset--spacing--30);
	border-bottom: var(--oetl-trait);
}

.oetl-fil-info .wp-block-post-template > li:first-child .oetl-list-item,
.oetl-resultats .wp-block-post-template > li:first-child .oetl-list-item {
	padding-top: 0;
}

.oetl-list-item__media {
	flex: 0 0 240px;
	max-width: 240px;
	margin: 0 !important;
}

.oetl-list-item__body {
	flex: 1;
	min-width: 0;
}

.oetl-list-item .wp-block-post-excerpt__excerpt {
	margin: 0;
}

@media (max-width: 600px) {
	.oetl-list-item {
		gap: 12px !important;
	}

	.oetl-list-item__media {
		flex-basis: 120px;
		max-width: 120px;
	}

	.oetl-list-item .wp-block-post-title {
		font-size: 17px !important;
	}

	.oetl-list-item .wp-block-post-excerpt {
		display: none;
	}

	.oetl-grille .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}
}

/* ---------- Image / vidéo à la une ---------- */

.oetl-featured-media {
	position: relative;
	margin: 0 0 var(--wp--preset--spacing--30);
}

.oetl-featured-media__image {
	position: relative;
	margin: 0;
}

.oetl-featured-media img {
	display: block;
	width: 100%;
	height: auto;
}

.oetl-featured-media__video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--noir);
}

.oetl-featured-media__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.oetl-featured-media__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 9;
	background: var(--wp--preset--color--fond);
}

.oetl-featured-media__placeholder img,
.oetl-related img.is-placeholder {
	width: 50% !important;
	object-fit: contain !important;
	opacity: 0.4;
}

.oetl-play,
.post-video {
	position: absolute;
	left: 8px;
	bottom: 8px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wp--preset--color--rouge);
}

.oetl-play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 55%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 7px 0 7px 11px;
	border-color: transparent transparent transparent #fff;
}

.imgCopyrightwp {
	margin-top: 4px;
	font-size: 12px;
	color: var(--wp--preset--color--gris);
	text-align: right;
}

/* ---------- Article ---------- */

.titrearticle {
	margin-block: var(--wp--preset--spacing--20);
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 800;
	line-height: 1.1;
}

.oetl-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em 0.8em;
	margin: 0 0 var(--wp--preset--spacing--30);
	padding: 0 0 var(--wp--preset--spacing--20);
	list-style: none;
	border-bottom: var(--oetl-trait);
	font-size: 13px;
	color: var(--wp--preset--color--gris);
}

.oetl-post-meta li + li::before {
	content: "·";
	margin-right: 0.8em;
}

.oetl-post-meta a {
	color: inherit;
	text-decoration: underline;
}

.contenu-post > p:first-child {
	font-weight: 700;
}

.contenu-post h2,
.contenu-post h3 {
	margin-top: 1.6em;
}

.contenu-post a {
	color: var(--wp--preset--color--rouge);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.contenu-post blockquote {
	margin-left: 0;
	padding-left: 1em;
	border-left: 3px solid var(--wp--preset--color--rouge);
}

.contenu-post iframe {
	max-width: 100%;
}

.oetl-google-news a {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: 14px;
	color: var(--wp--preset--color--gris);
}

.oetl-google-news a:hover {
	color: var(--wp--preset--color--encre);
}

.oetl-google-news img {
	width: 18px;
	height: auto;
}

.oetl-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-family: var(--oetl-titre);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
}

.oetl-tags a {
	display: inline-block;
	padding: 4px 10px;
	background: var(--wp--preset--color--fond);
	color: var(--wp--preset--color--encre);
}

.oetl-tags a:hover {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
}

.oetl-tags .wp-block-post-terms__separator {
	display: none;
}

.oetl-post-nav {
	padding-block: var(--wp--preset--spacing--30);
	border-block: var(--oetl-trait);
	font-family: var(--oetl-titre);
	font-weight: 700;
}

.oetl-post-nav a:hover {
	color: var(--wp--preset--color--rouge);
}

.oetl_pub_tkydg {
	margin-bottom: var(--wp--preset--spacing--30);
	text-align: center;
}

/* ---------- Articles liés ---------- */

.oetl-related {
	margin-block: var(--wp--preset--spacing--40);
}

.oetl-related__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: 0;
	list-style: none;
}

.oetl-related__item {
	display: flex;
	gap: 10px;
	align-items: flex-start;
}

.oetl-related__thumb {
	flex: 0 0 110px;
	line-height: 0;
}

.oetl-related__thumb img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.oetl-related__title {
	font-family: var(--oetl-titre);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
}

.oetl-related__item.is-first {
	grid-column: 1 / -1;
	flex-direction: column;
}

.oetl-related__item.is-first .oetl-related__thumb {
	flex-basis: auto;
	width: 100%;
}

.oetl-related__item.is-first .oetl-related__title {
	font-size: 22px;
}

@media (max-width: 600px) {
	.oetl-related__list {
		grid-template-columns: 1fr;
	}
}

/* ---------- Commentaires ---------- */

.oetl-comments {
	margin-top: var(--wp--preset--spacing--40);
}

.oetl-comment {
	padding-block: var(--wp--preset--spacing--20);
	border-bottom: var(--oetl-trait);
}

.oetl-comment__body {
	flex: 1;
	min-width: 0;
}

.oetl-comment .wp-block-comment-author-name {
	font-family: var(--oetl-titre);
}

.wp-block-post-comments-form textarea,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]) {
	width: 100%;
	padding: 0.6em;
	border: 1px solid var(--wp--preset--color--gris-clair);
	border-radius: 2px;
	font: inherit;
}

.wp-block-post-comments-form textarea:focus,
.wp-block-post-comments-form input:focus {
	outline: 2px solid var(--wp--preset--color--encre);
	outline-offset: 1px;
}

/* ---------- Barre latérale ---------- */

.oetl-sidebar .widget {
	margin-bottom: var(--wp--preset--spacing--40);
}

.oetl-sidebar .widget-title {
	font-size: 18px;
}

/* ---------- Pied de page ---------- */

.oetl-footer a:hover {
	text-decoration: underline;
}

.oetl-footer__brand {
	align-items: center !important;
	text-align: center;
}

.oetl-logo--footer img {
	width: 140px;
}

.oetl-footer .wp-block-social-links {
	justify-content: center;
}

.oetl-footer .wp-social-link a:hover {
	color: var(--wp--preset--color--rouge);
}

/* ---------- Pagination ---------- */

.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--40);
	font-weight: 700;
}

.wp-block-query-pagination-numbers .page-numbers {
	display: inline-block;
	min-width: 2em;
	padding: 0.25em 0.5em;
	text-align: center;
}

.wp-block-query-pagination-numbers .page-numbers.current {
	background: var(--wp--preset--color--encre);
	color: var(--wp--preset--color--blanc);
}

/* ---------- Publicités (Refinery89, AdSense) : réserve l'espace, évite le CLS ---------- */

.oetl-ad {
	text-align: center;
}

@media (min-width: 992px) {
	.r89-desktop-billboard-atf,
	.r89-desktop-billboard-btf,
	.r89-desktop-video-outstream,
	.r89-desktop-InContent,
	.r89-desktop-rectangle-atf,
	.r89-desktop-rectangle-btf {
		min-height: 250px;
		margin-block: 20px;
	}

	.r89-desktop-leaderboard-atf,
	.r89-desktop-leaderboard-btf {
		min-height: 90px;
		margin-block: 20px;
	}

	.r89-desktop-hpa-atf,
	.r89-desktop-hpa-btf {
		min-height: 600px;
		margin-block: 20px;
	}

	.r89-desktop-header-pushup {
		position: sticky;
		top: 3px;
		z-index: 999;
		min-height: 90px;
		padding: 5px 0;
		background: #fff;
		border-bottom: 1px solid #ccc;
		box-sizing: content-box;
	}
}

@media (max-width: 991px) {
	.r89-mobile-billboard-top,
	.r89-mobile-video-outstream,
	.r89-mobile-rectangle-infinite,
	.r89-mobile-rectangle-low,
	.r89-mobile-rectangle-mid {
		min-height: 250px;
		margin-block: 20px;
	}

	.r89-Mobile-Rectangle-Mid-300x600 {
		min-height: 600px;
		margin-block: 20px;
	}

	.r89-mobile-header-pushup {
		position: fixed;
		inset: 0 0 auto;
		z-index: 9999 !important;
		margin: 0;
		padding: 5px 0;
		text-align: center;
		background: #fff;
		border-bottom: 1px solid #ccc;
		box-sizing: content-box;
	}
}

ins.adsbygoogle[data-ad-status="unfilled"] {
	display: none !important;
}

.bandeaupub:has(ins.adsbygoogle[data-ad-status="unfilled"]),
.panel-grid:has(> .panel-grid-cell > .bandeaupub ins.adsbygoogle[data-ad-status="unfilled"]) {
	display: none;
}

/* ---------- Bouton retour en haut ---------- */
.oetl-scroll-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: var(--wp--preset--color--encre);
	color: #fff;
	cursor: pointer;
	transition: background-color .15s;
}
.oetl-scroll-top[hidden] { display: none; }
.oetl-scroll-top:hover,
.oetl-scroll-top:focus-visible { background: var(--wp--preset--color--rouge); }
.oetl-scroll-top:focus-visible { outline: 2px solid var(--wp--preset--color--encre); outline-offset: 2px; }

/* ---------- Vues mobiles (application Flutter) ---------- */

.oetl-mobile {
	margin: 10px;
}

.oetl-mobile-view--single .addtoany_content,
.oetl-mobile-view--comments .comment-reply-login,
.oetl-mobile-view--comments .zeno-comments-report-link,
.oetl-mobile-view--comments .comment-respond,
.oetl-mobile-view--comments .wp-block-post-comments-form {
	display: none;
}

/* ---------- Éditeur ---------- */

.oetl-editor-placeholder {
	padding: 1em;
	border: 2px dashed var(--wp--preset--color--gris-clair);
	background: var(--wp--preset--color--fond);
	font-size: 14px;
	text-align: center;
}
