﻿/*
Theme Name: CDJE74
Theme URI: https://www.cdje74.fr/
Author: CDJE74
Author URI: https://www.cdje74.fr/
Description: ThÃ¨me autonome basÃ© sur Twenty Twenty-Four, conservant l'apparence actuelle du site CDJE74.
Requires at least: 6.4
Tested up to: 6.9
Requires PHP: 7.0
Version: 1.0.29
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cdje74
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/* Menu header sur une seule ligne */
header.wp-block-template-part .wp-block-navigation,
header.wp-block-template-part .wp-block-navigation .wp-block-navigation__container {
	flex-wrap: nowrap;
	gap: 14px;
}

/* Layout header : logo/titre/nav sur une ligne (desktop), empilÃ© sur mobile */
header.wp-block-template-part .wp-block-group.alignwide {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: nowrap;
}
header.wp-block-template-part .wp-block-group.alignwide > * {
	margin: 0;
}
header.wp-block-template-part .wp-block-site-logo {
	flex-shrink: 0;
}
header.wp-block-template-part .wp-block-site-title {
	margin: 0;
	text-align: left;
}

/* Sur mobile et tablette, on passe en affichage multi-lignes pour tout voir */
@media (max-width: 960px) {
	header.wp-block-template-part .wp-block-navigation {
		overflow-x: visible;
		padding-bottom: 0;
		gap: 10px;
        flex: 1;
        width: 100%;
	}

	header.wp-block-template-part .wp-block-navigation .wp-block-navigation__container {
		flex-wrap: wrap !important;
        justify-content: flex-start !important;
        width: 100%;
        padding-right: 0;
        row-gap: 10px;
	}
}

/* Uniquement sur petits écrans (mobile portrait et paysage) on empile verticalement */
@media (max-width: 960px) {
	header.wp-block-template-part .wp-block-group.alignwide {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	header.wp-block-template-part .wp-block-site-title {
		text-align: left;
	}
    header.wp-block-template-part .wp-block-navigation {
        width: 100%;
    }
}

/* SÃ©paration header / contenu : fine bordure + espace bas */
header.wp-block-template-part {
	border-bottom: 1px solid rgba(0,0,0,0.08);
	padding-bottom: 12px;
	margin-bottom: 18px;
	padding-left: env(safe-area-inset-left);
	padding-right: env(safe-area-inset-right);
}

/* Hover effect sur les éléments du header (titre, menu) */
header.wp-block-template-part .wp-block-site-title a:hover {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

header.wp-block-template-part .wp-block-navigation a:hover {
    opacity: 0.8;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

/* Palette et base */
:root {
	--bg: #f7f8fb;
	--text: #0f1b2d;
	--muted: #4a5568;
	--line: #e3e7ed;
	--card: #ffffff;
	--accent: #0d1b2a;
	--accent-2: #c89b3c;
	--shadow: 0 8px 20px rgba(0,0,0,0.08);
	--radius: 10px;
}

body {
	background: var(--bg);
	color: var(--text);
	font-size: 17px;
	line-height: 1.6;
	font-family: "Inter", "Work Sans", system-ui, -apple-system, sans-serif;
}

h1, h2, h3, h4 {
	font-family: "Cardo", "Source Serif 4", "Times New Roman", serif;
	color: var(--accent);
	letter-spacing: 0.15px;
	margin-bottom: 12px;
}

/* Conteneur global */
.wp-site-blocks {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 32px;
}
@media (max-width: 768px) {
	.wp-site-blocks { padding: 0 18px; }
}

/* Header / Hero */
.wp-block-group.alignfull {
	border-radius: 0;
	box-shadow: none;
}
header.wp-block-template-part,
.wp-block-template-part header {
	background: linear-gradient(135deg, #0d1b2a, #152b43);
	color: #fff;
}
header.wp-block-template-part a {
	color: #e8ecf1;
}
header.wp-block-template-part a:hover {
	color: #fff;
}

/* Navigation */
.wp-block-navigation .wp-block-navigation-item__content {
	padding: 10px 12px;
	border-radius: 6px;
	transition: background 0.2s ease, color 0.2s ease;
	white-space: nowrap;
}
header .wp-block-navigation .wp-block-navigation-item__content:hover,
header .wp-block-navigation .current-menu-item > a {
	background: rgba(255,255,255,0.12);
	color: #fff;
}

/* Sous-menus : fond clair, texte sombre, hover accentuÃ© */
.wp-block-navigation__submenu-container {
	background: #ffffff;
	color: #1c2733;
	box-shadow: 0 10px 24px rgba(0,0,0,0.12);
	border-radius: 8px;
}
.wp-block-navigation__submenu-container a {
	color: #1c2733 !important;
}
.wp-block-navigation__submenu-container a:hover {
	background: #f1f3f7;
	color: var(--accent-2) !important;
}

/* Boutons */
.wp-block-button__link,
button,
input[type=submit] {
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 10px 14px;
	border: none;
	transition: transform 0.15s ease, background 0.2s ease;
}
.wp-block-button__link:hover,
button:hover,
input[type=submit]:hover {
	background: #16365f;
	transform: translateY(-1px);
}

/* Cartes (articles, Ã©vÃ©nements, pages) */
.wp-block-post,
.wp-block-query .wp-block-post,
.single-post .wp-block-group:not(.alignfull):not(.alignwide),
.page .wp-block-group:not(.alignfull):not(.alignwide),
.single-tribe_events .wp-block-group:not(.alignfull):not(.alignwide) {
	background: var(--card);
	box-shadow: var(--shadow);
	border-radius: var(--radius);
	padding: 22px;
	margin: 16px 0;
}
@media (min-width: 900px) {
	.blog .wp-block-query .wp-block-post,
	.home .wp-block-query .wp-block-post,
	.archive .wp-block-query .wp-block-post {
		margin: 0;
	}
}

/* Force Single/Page Title Styling (match Handicap page style) */
.single-post .wp-block-post-title,
.page .wp-block-post-title,
.single-tribe_events .tribe-events-single-event-title,
.tribe-events-single-event-title {
    font-family: 'Segoe UI', system-ui, sans-serif !important; /* Force System Font override */
    font-size: 2.5rem !important;
    color: #d8613c !important;
    font-weight: 400 !important; /* REGULAR (400) comme sur la page Handicap */
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    line-height: 1.3 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    text-align: center;
    clear: both;
}

/* Metadata styling on single posts */
.single-post .wp-block-template-part .wp-block-group {
    margin-bottom: 2rem !important; /* Espace après les méta (date/auteur) */
}
.single-post .wp-block-post-date, 
.single-post .wp-block-post-author {
    color: #cca48e !important; /* Accent-2 ou similaire, discret */
    font-style: italic;
    font-size: 0.95rem;
}

/* Content spacing */
.single-post .wp-block-post-content,
.page .wp-block-post-content {
    margin-top: 2rem !important;
}

/* Force Home Post Styling (pour passer outre caching ou template specifique) */
.home .wp-block-post-title {
    margin-bottom: 0.8rem !important;
    margin-top: 0.5rem !important;
}

.home .wp-block-post-title,
.home .wp-block-post-title a {
    font-family: 'Segoe UI', system-ui, sans-serif !important; /* Force System Font override */
    font-size: 1.4rem !important;
    color: #d8613c !important; 
    font-weight: 400 !important;
    text-decoration: none;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
}

.home .wp-block-post-title a:hover {
    text-decoration: underline !important;
}

.home .wp-block-post-date {
    font-style: italic !important;
    color: #636363 !important; /* Contrast-2 */
    font-size: 0.9rem !important;
    margin-bottom: 12px;
}

.home .wp-block-post-excerpt {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    display: flex; /* Flexbox pour gérer l'alignement */
    flex-direction: column; /* Texte en haut, bouton en bas */
    align-items: flex-start; /* Aligner à gauche */
    flex-grow: 1; /* Occuper l'espace restant */
    justify-content: space-between; /* Assurer que le contenu est espacé */
}

/* Force le dernier élément (le bouton) à aller en bas */
.home .wp-block-post-excerpt > :last-child {
    margin-top: auto;
}

/* Style "Lire la suite" sur la page d'accueil */
.home .wp-block-post-excerpt .wp-block-post-excerpt__more-link {
    display: inline-block;
    background-color: var(--wp--preset--color--contrast, #111111);
    color: var(--wp--preset--color--base, #ffffff);
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.15s ease, background 0.2s ease;
    margin-top: auto; /* Pousser le bouton tout en bas */
    margin-bottom: 0.5rem; /* Espace en bas */
}

.home .wp-block-post-excerpt .wp-block-post-excerpt__more-link:hover {
    background-color: #16365f;
    transform: translateY(-1px);
}

.home .wp-block-post {
    border-bottom: 1px solid #b1c5a4; /* Accent-4 Sauge */
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home .wp-block-post > .wp-block-group {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Vignettes */
.wp-block-post-featured-image img {
	border-radius: var(--radius);
	width: 100%;
	height: auto;
}

/* Meta (dates, auteur) */
.wp-block-post-date,
.wp-block-post-author,
.wp-block-post-terms {
	color: var(--muted);
	font-size: 0.95em;
}

/* Tag Styling - Clean Pill Design */
.wp-block-post-terms a,
.wp-block-tag-cloud a {
	display: inline-block;
	background: #ffffff;
	color: var(--accent);
	padding: 4px 12px;
	border-radius: 20px;
	text-decoration: none;
	font-size: 0.85em;
	border: 1px solid var(--line);
	transition: all 0.2s ease;
	margin: 2px 4px 2px 0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.wp-block-post-terms a:hover,
.wp-block-tag-cloud a:hover {
	background: var(--accent);
	color: #ffffff;
	border-color: var(--accent);
	text-decoration: none;
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Grille listes articles */
.blog .wp-block-query > .wp-block-post-template,
.home .wp-block-query > .wp-block-post-template,
.archive .wp-block-query > .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
}

/* Correction espacement vertical spécifique Home (suite à l'alignement des boutons) */
.home .wp-block-query > .wp-block-post-template {
    row-gap: 4rem; /* Espace prononcé entre les lignes d'articles */
}

/* Ã‰vÃ©nements (widgets/lists) */
.events-list,
.tribe-events-shortcode,
.wp-block-group.events-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.events-list li,
.tribe-events-shortcode li {
	display: grid;
	grid-template-columns: 76px 1fr;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--line);
}
.event-date-badge {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 8px;
	box-shadow: var(--shadow);
	text-align: center;
	padding: 10px 8px;
	color: var(--accent);
	font-weight: 700;
	line-height: 1.1;
}
.event-date-badge .month { display: block; font-size: 0.8em; color: var(--accent-2); }

/* TEC liste / catÃ©gories d'Ã©vÃ©nements (mise en cartes) */
.tribe-events-view--list .tribe-events-l-container,
.tribe-events-view--list .tribe-common--breakpoint-medium .tribe-common-l-container {
	max-width: 750px !important;
	margin: 0 auto !important;
	padding-left: 10px !important;
	padding-right: 10px !important;
}

.tribe-events-calendar-list__event-row {
	display: grid;
	grid-template-columns: 70px 1fr;
	column-gap: 16px;
	row-gap: 12px;
	align-items: flex-start;
}

.tribe-events-view--list .tribe-events-calendar-list__event {
	background: var(--card);
	box-shadow: var(--shadow);
	border-radius: var(--radius);
	padding: 20px;
	margin: 0 0 24px 0;
	display: flex !important;
	flex-direction: row !important;
	gap: 24px !important;
	align-items: flex-start !important;
	border: 1px solid var(--line);
}

.tribe-events-calendar-list__event-featured-image-wrapper {
	flex: 0 0 220px !important;
	width: 220px !important;
	margin: 0 !important;
}
.tribe-events-calendar-list__event-featured-image-wrapper img {
	width: 100% !important;
	height: auto !important;
	border-radius: 6px;
	object-fit: cover;
}

.tribe-events-calendar-list__event-details {
	flex: 1 !important;
	width: auto !important;
	min-width: 0; /* Fix flex overflow */
}

@media (max-width: 768px) {
	.tribe-events-view--list .tribe-events-calendar-list__event {
		flex-direction: column !important;
	}
	.tribe-events-calendar-list__event-featured-image-wrapper {
		width: 100% !important;
		flex: none !important;
	}
}

/* List View Date Tag Styling */
/* List View Date Tag Styling (Main Events Page) */
.tribe-events-calendar-list__event-date-tag,
.tribe-events-calendar-list__event-date-tag.tribe-common-g-col {
	background-color: #0d1b2a !important; /* Force Blue Background */
	border: 1px solid #e3e7ed;
	border-radius: 6px;
	box-shadow: 0 6px 16px rgba(0,0,0,0.08);
	padding: 0 !important;
	overflow: hidden;
	min-width: 60px !important;
	min-height: 70px !important;
	width: auto !important;
	height: auto !important;
	display: flex;
	flex-direction: column;
}

/* Wrapper Internal Time Element */
.tribe-events-calendar-list__event-date-tag time,
.tribe-events-calendar-list__event-date-tag .tribe-events-calendar-list__event-date-tag-datetime {
	background-color: transparent !important;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: 70px;
	padding: 0;
	flex: 1;
}

/* Weekday (Top): White Text on Blue (Transparent) Background */
.tribe-events-calendar-list__event-date-tag-weekday {
	color: #ffffff !important;
	background-color: transparent !important;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 1px;
	display: block;
	font-weight: 600;
	padding: 6px 0 !important;
	margin: 0 0 1px 0 !important; /* Minimal margin just for separation */
	width: 100%;
	order: 1;
	line-height: 1;
}

/* Day Number (Bottom): Blue Text on White Background */
.tribe-events-calendar-list__event-date-tag-daynum { 
	background-color: #ffffff !important;
	color: #0d1b2a !important;
	font-size: 1.6em !important; 
	line-height: 1.2 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	margin: 0;
	padding: 10px 0;
	width: 100%;
	flex-grow: 1;
	order: 2;
}
.tribe-events-calendar-list__event-content,
.tribe-events-calendar-list__event-details {
	align-self: flex-start;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.tribe-events-calendar-list__event-header {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.tribe-events-calendar-list__event-description.tribe-common-a11y-hidden {
	display: block !important;
	position: static !important;
	clip: auto !important;
	width: auto !important;
	height: auto !important;
	margin-top: 8px;
	color: var(--muted);
	font-size: 0.95em;
	line-height: 1.5;
}

.tribe-events-calendar-list__event-cost {
	font-weight: 700;
	font-size: 1.1em;
	color: var(--accent);
	margin-top: 4px;
}

@media (max-width: 768px) {
	.tribe-events-calendar-list__event-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.tribe-events-view--list .tribe-events-calendar-list__event {
		grid-template-columns: 1fr;
	}
	.tribe-events-calendar-list__event-date-tag {
		justify-self: start;
		margin-bottom: 10px;
	}
}

.tribe-events-calendar-list__event-title {
	margin: 0;
	line-height: 1.3;
}
.tribe-events-calendar-list__event-date-tag-daynum {
	/* Removed duplicate rule to respect new styling */
}

.tribe-events-calendar-list__event-title a {
	color: var(--accent);
	font-weight: 700;
	text-decoration: none;
}
.tribe-events-calendar-list__event-title a:hover {
	color: var(--accent-2);
}

.tribe-events-calendar-list__event-datetime,
.tribe-events-calendar-list__event-venue,
.tribe-events-calendar-list__event-venue .tribe-events-calendar-list__event-venue-title,
.tribe-events-calendar-list__event-venue .tribe-events-calendar-list__event-venue-address {
	color: var(--muted);
	font-size: 0.95em;
}

@media (max-width: 900px) {
	.tribe-events-calendar-list__event-row {
		grid-template-columns: 1fr;
	}

	.tribe-events-view--list .tribe-events-calendar-list__event {
		grid-template-columns: 1fr;
	}
	.tribe-events-view--list .tribe-events-l-container {
		padding-left: 18px;
		padding-right: 18px;
	}
}

/* Calendrier (FullCalendar ou plugin) */
.fc .fc-toolbar-title {
	color: var(--accent);
	font-family: "Cardo", serif;
}
.fc .fc-button {
	background: var(--accent);
	border: none;
	border-radius: 6px;
	color: #fff;
}
.fc .fc-button:hover { background: #16365f; }
.fc .fc-daygrid-day-number { color: var(--text); }

/* Liens */
a { color: var(--accent); }
a:hover { color: var(--accent-2); }

/* Tableaux simples */
table {
	border-collapse: collapse;
	width: 100%;
}
td, th {
	border: 1px solid var(--line);
	padding: 10px 12px;
}

/* Footer */
.site-footer,
.wp-block-template-part.footer {
	background: #0d1b2a;
	color: #e8ecf1;
	padding: 32px 32px 40px;
}

/* Espacement et style renforcÃ© pour les boutons (ex: inscription) */
.wp-block-button {
	margin-top: 18px;
	margin-bottom: 18px;
}
.wp-block-button__link,
button,
input[type=submit] {
	padding: 12px 18px;
	font-weight: 700;
	letter-spacing: 0.2px;
	box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--accent-2);
	border: 2px solid var(--accent-2);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--accent-2);
	color: #fff;
}

/* Bouton Site Web (Event Single) */
.tribe-block__event-website {
	margin-top: 24px;
	margin-bottom: 24px;
}
.tribe-block__event-website a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1.2;
	background: linear-gradient(135deg, #0d1b2a, #152b43);
	color: #fff;
	padding: 12px 24px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 700;
	box-shadow: 0 4px 6px rgba(0,0,0,0.1);
	transition: background 0.3s ease, transform 0.2s ease;
}
.tribe-block__event-website a:hover {
	background: var(--accent-2);
	color: #fff;
	transform: translateY(-2px);
}
.site-footer a,
.wp-block-template-part.footer a { color: var(--accent-2); }
.site-footer a:hover,
.wp-block-template-part.footer a:hover { color: #e6b861; }

/* BanniÃ¨re cookies (ex. CookieYes / CLI) */
#cookie-law-info-bar,
.cli-bar-container {
	max-width: 340px;
	right: 16px;
	left: auto !important;
	bottom: 16px;
	border-radius: 10px;
	box-shadow: var(--shadow);
	background: rgba(15,27,45,0.96) !important;
}
#cookie-law-info-bar *,
.cli-bar-container * {
	color: #e8ecf1 !important;
}
.cli-plugin-button,
.cli-plugin-button:visited {
	background: var(--accent);
	color: #fff !important;
	border-radius: 6px;
	border: none;
}
.cli-plugin-button:hover { background: #16365f; }

/* Espacement Recherche / Widget */
.wp-block-search {
	margin-bottom: 30px;
}

/* Badges dates pour le widget Ã‰vÃ¨nements Ã  venir (The Events Calendar) */
:root {
	--ev-bg: #ffffff;
	--ev-line: #e3e7ed;
	--ev-accent: #0d1b2a;
	--ev-accent-2: #c89b3c;
	--ev-shadow: 0 6px 16px rgba(0,0,0,0.08);
	--ev-radius: 10px;
}

.tribe-events-widget-events-list,
.tribe-events-view--widget-events-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.tribe-events-widget-events-list .tribe-events-widget-events-list__event-row {
	display: grid;
	grid-template-columns: 74px 1fr;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--ev-line);
	align-items: center;
}

/* Force specific widget classes */
.tribe-events-widget-events-list__event-date-tag,
.tribe-events-widget-events-list__event-date-tag.tribe-common-g-col {
	background-color: #0d1b2a !important; /* Force Blue Background */
	border: 1px solid #e3e7ed;
	border-radius: 6px;
	box-shadow: 0 6px 16px rgba(0,0,0,0.08);
	padding: 0 !important;
	overflow: hidden; /* Essential for the split color effect */
	min-height: 70px;
	display: flex;
	flex-direction: column;
}

/* Ensure the time wrapper is transparent and fills space */
.tribe-events-widget-events-list__event-date-tag time,
.tribe-events-widget-events-list__event-date-tag .tribe-events-widget-events-list__event-date-tag-datetime {
	background-color: transparent !important;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	flex: 1;
}

/* Month (Top): White Text on Blue (Transparent) Background */
.tribe-events-widget-events-list__event-date-tag .tribe-events-widget-events-list__event-date-tag-month,
.tribe-events-widget-events-list__event-date .month,
.tribe-events-widget-events-list__date .month {
	color: #ffffff !important;
	background-color: transparent !important;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0;
	padding: 6px 0;
	width: 100%;
	order: 1;
	display: block !important;
}

/* Day Number (Bottom): Blue Text on White Background */
.tribe-events-widget-events-list__event-date-tag .tribe-events-widget-events-list__event-date-tag-daynum,
.tribe-events-widget-events-list__event-date-tag .tribe-events-widget-events-list__event-date-tag-day,
.tribe-events-widget-events-list__event-date .day,
.tribe-events-widget-events-list__date .day {
	background-color: #ffffff !important;
	color: #0d1b2a !important;
	font-size: 1.6em;
	font-weight: 800;
	padding: 10px 0;
	margin: 0;
	width: 100%;
	flex-grow: 1;
	display: flex !important;
	align-items: center;
	justify-content: center;
	order: 2;
}

/* Fallback/Legacy Selectors */
.tribe-events-widget-events-list__event-date,
.tribe-events-widget-events-list__date {
	display: none; 
}
	background-color: transparent !important;
	order: 1;
}

/* Corps de lâ€™item */
.tribe-events-widget-events-list__event-title a {
	color: var(--ev-accent);
	font-weight: 700;
	text-decoration: none;
}
.tribe-events-widget-events-list__event-title a:hover {
	color: var(--ev-accent-2);
}

.tribe-events-widget-events-list__event-datetime,
.tribe-events-widget-events-list__event-venue,
.tribe-events-widget-events-list__event-venue .tribe-events-widget-events-list__venue {
	color: #4a5568;
	font-size: 0.95em;
	margin-top: 2px;
}

/* Nettoyage marges/paddings du widget */
.tribe-events-widget {
	margin-bottom: 1.5rem;
}
.tribe-compatibility-container,
.tribe-events-widget-events-list {
	padding: 0;
	margin: 0;
}

/* Fallback si le markup est plus simple (date en premier child) */
.tribe-events-widget-events-list .tribe-events-widget-events-list__event-row > *:first-child {
	justify-self: stretch;
}

/* Single Event Styling - Matching Site Design */
.single-tribe_events .tribe-events-single,
.tribe-events-single,
#tribe-events-content {
	background: transparent; /* Was card var */
	box-shadow: none; /* Was shadow var */
	border-radius: 0;
	padding: 0 0 20px 0; /* Align with top 0 */
	margin: 0 auto 20px;
	max-width: 100% !important; /* Let theme constrain */
	width: 100%;
    /* border: 1px solid var(--line); -- Removed */
    overflow: visible;
}

/* Force remove top spacing on Single Event Title - DISABLED to match pages which have margin-top:2rem */
/*
.single-tribe_events .tribe-events-single-event-title,
.tribe-events-single-event-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
*/

/* Hide potentially empty headers or notices taking space */
.single-tribe_events .tribe-events-header {
    display: none;
}

/* Ensure container is not constrained */
.tribe-block.tec-block__single-event {
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Reset TEC container width if present */
.single-tribe_events .tribe-common-l-container {
	max-width: 100% !important;
	padding: 0 !important;
}

/* Remove extra spacing from TEC template wrapper */
#tribe-events-pg-template {
	padding: 0 !important;
	margin: 0 !important;
	max-width: 100% !important;
}


.single-tribe_events .tribe-events-back {
	margin: 0 0 20px 0;
	padding: 0;
    display: none; /* Cacher le lien retour pour aligner le haut de page */
}
.single-tribe_events .tribe-events-back a {
	color: var(--text-light);
	text-decoration: none;
	font-weight: 500;
}
.single-tribe_events .tribe-events-back a:hover {
	color: var(--accent);
}

.single-tribe_events .tribe-events-single-event-title,
.tribe-events-single-event-title {
    font-family: 'Segoe UI', system-ui, sans-serif !important; /* GLOBAL FONT FIX */
    color: var(--wp--preset--color--accent-3, #d8613c) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    /* Fluid typography matching posts */
    font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
    line-height: 1.2 !important;
	margin-bottom: 20px;
	clear: both;
}

.single-tribe_events .tribe-events-schedule {
	background: var(--bg);
	padding: 16px 24px;
	border-radius: 8px;
	margin-bottom: 32px;
	border: 1px solid var(--line);
	display: flex;
	align-items: center;
	gap: 16px;
	clear: both;
}
.single-tribe_events .tribe-events-schedule h2 {
	margin: 0;
	font-size: 1.2em;
	color: var(--accent);
}

/* Image Handling - Centered & Controlled */
.single-tribe_events .tribe-events-event-image {
	float: none !important;
	margin: 0 auto 40px auto !important;
	width: 100% !important;
	text-align: center;
	display: block;
}

.single-tribe_events .tribe-events-event-image img {
	width: auto;
	max-width: 100%;
	max-height: 700px; /* Prevent massive vertical images */
	display: inline-block;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

/* Content */
.single-tribe_events .tribe-events-content {
	font-size: 1.15em;
	line-height: 1.8;
	color: var(--text);
	width: 100% !important;
	float: none !important;
}

/* Meta section */
.single-tribe_events .tribe-events-event-meta {
	background: #f8f9fa;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 32px;
	margin-top: 40px;
	clear: both;
}

.single-tribe_events .tribe-events-meta-group .tribe-events-single-section-title {
	color: var(--accent);
	font-size: 1.4em;
	border-bottom: 2px solid var(--accent-2);
	padding-bottom: 8px;
	margin-bottom: 20px;
	display: inline-block;
}

.single-tribe_events .tribe-events-cal-links {
	margin-top: 32px;
	border-top: 1px solid var(--line);
	padding-top: 20px;
}
.single-tribe_events .tribe-events-cal-links .tribe-events-button {
	background: var(--accent);
	color: #fff;
	border-radius: 6px;
	padding: 10px 20px;
	text-decoration: none;
	font-weight: 600;
}
.single-tribe_events .tribe-events-cal-links .tribe-events-button:hover {
	background: var(--accent-2);
}

/* Adaptation spÃ©cifique pour la page Calendrier (ID 1144) */
.page-id-1144 .wp-site-blocks {
	max-width: 100% !important;
	padding-left: 10px;
	padding-right: 10px;
}

.page-id-1144 iframe {
	width: 100% !important;
	height: 85vh !important;
	min-height: 600px;
	display: block;
}

/* Si c'est The Events Calendar */
.page-id-1144 .tribe-common-l-container,
.page-id-1144 .tribe-events-l-container {
	max-width: 100% !important;
	padding-top: 20px;
}

/* EBEC Events List Date Badge Styling */
.ebec-list-wrapper .ebec-event-date-tag {
    background-color: #0d1b2a !important; /* Blue Background */
    border: 1px solid #e3e7ed;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    min-width: 60px;
    width: 60px;
    height: auto;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

/* Inner Wrapper */
.ebec-list-wrapper .ebec-event-datetimes {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    height: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important; /* Reset potential plugin margins */
    border: none !important;
}

/* Month (Top) - mimics widget style */
.ebec-list-wrapper .ev-mo {
    color: #ffffff !important;
    background-color: transparent !important;
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 6px 0 !important;
    margin: 0 0 1px 0 !important; /* 1px gap line */
    width: 100% !important;
    display: block;
    text-align: center;
    line-height: 1;
    border: none !important;
}

/* Day Number (Bottom) - mimics widget style */
.ebec-list-wrapper .ebec-ev-day {
    background-color: #ffffff !important;
    color: #0d1b2a !important;
    font-size: 1.6em !important;
    font-weight: 800;
    padding: 10px 0;
    margin: 0 !important;
    width: 100% !important;
    flex-grow: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 0 !important; 
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    clip-path: none !important; /* Reset any clipping */
}

/* Ensure no shadows/borders on the intermediate wrapper */
.ebec-list-wrapper .ebec-event-datetimes {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

/* Fix specific plugin conflict that might add a left border to the date container */
.ebec-minimal-list-wrapper .ebec-list-posts.style-1.ebec-simple-event .ebec-event-date-tag,
.ebec-list-wrapper .ebec-list-posts.style-1 .ebec-event-date-tag {
    background-image: none !important; /* Remove gradients if any */
    border-left: 0 !important; /* Explicitly remove left border */
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important; /* Handle border via general rule */
}

/* --- Complet Redesign EBEC List --- */

/* Event Card Container */
.ebec-list-wrapper .ebec-list-posts.style-1 {
    display: flex !important;
    background: var(--card) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow) !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
    align-items: flex-start !important;
    gap: 24px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ebec-list-wrapper .ebec-list-posts.style-1:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12) !important;
}

/* Fix Flex Layout Structure */
.ebec-list-wrapper .ebec-event-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding-left: 0 !important; /* Reset inherited padding */
}

/* Typography Title */
.ebec-list-wrapper a.ebec-events-title {
    font-family: inherit !important; /* Use system/theme font */
    font-size: 1.25em !important;
    font-weight: 700 !important;
    color: var(--accent) !important;
    text-decoration: none !important;
    line-height: 1.3 !important;
    margin-bottom: 4px;
    display: block;
}

.ebec-list-wrapper a.ebec-events-title:hover {
    color: var(--accent-2) !important;
}

/* Hide Redundant Date (Already in Badge) */
.ebec-list-wrapper .ebec-event-datetime {
    display: none !important;
}

/* Venue Data */
.ebec-list-wrapper .ebec-list-venue {
    color: var(--muted) !important;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px; /* Slight spacing since date is gone */
}
.ebec-list-wrapper .ebec-list-venue i {
    color: var(--accent-2); /* Gold icon */
}

/* Button "En savoir plus" */
.ebec-list-wrapper .ebec-style-1-more {
    margin-top: 12px !important;
}

.ebec-list-wrapper a.ebec-events-read-more {
    display: inline-block;
    background: var(--accent);
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.ebec-list-wrapper a.ebec-events-read-more:hover {
    background: #16365f; /* Lighter blue */
}

/* Image Wrapper (Right side) */
.ebec-list-wrapper .ebec-right-wrapper {
    flex: 0 0 180px; /* Fixed width for image */
    width: 180px;
    height: auto;
    margin-left: auto;
}

.ebec-list-wrapper .ebec-static-small-list-ev-img img {
    border-radius: 6px;
    width: 100%;
    height: 120px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .ebec-list-wrapper .ebec-list-posts.style-1 {
        flex-direction: column;
    }
    .ebec-list-wrapper .ebec-right-wrapper {
        width: 100%;
        margin-top: 12px;
        flex: none;
    }
    .ebec-list-wrapper .ebec-static-small-list-ev-img img {
        height: auto;
        max-height: 200px;
    }
}

/* =========================================
   INTEGRATION DESIGN (Force & Robustesse)
   ========================================= */

/* TITRES H1 : Ciblage large pour FSE et Thèmes Classiques */
.wp-block-post-title,
.entry-title,
h1.wp-block-heading,
.wp-block-post-content h1 {
    font-family: 'Segoe UI', system-ui, sans-serif !important; /* GLOBAL FONT FIX */
    color: var(--wp--preset--color--accent-3, #d8613c) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    /* Fluid typography: 1.75rem min (mobile) -> 2.5rem max (desktop) */
    font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
    line-height: 1.2 !important;
    word-wrap: break-word; /* Evite le debordement sur mobile */
}

/* TITRES H2 : Style Badge Vert Sauge */
.wp-block-post-content h2,
.entry-content h2,
h2.wp-block-heading,
.tribe-events-content h2,
.tribe-events-single-event-description h2,
.tribe-block__event-website h2, 
.tribe-block__venue h2, 
.tribe-block__organizer h2 {
    background-color: var(--wp--preset--color--base-2, #ffffff);
    padding: 0.5em 0.8em;
    border-left: 5px solid var(--wp--preset--color--accent-4, #b1c5a4) !important;
    border-radius: 0 4px 4px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-top: 1.5em; /* Spacer raisonnable */
    /* Fluid typography: 1.35rem min -> 1.8rem max */
    font-size: clamp(1.35rem, 4vw, 1.8rem) !important;
    line-height: 1.3 !important;
    /* Force font to match theme default for headers if Tribe overrides it */
    font-family: "Cardo", serif !important;
    color: var(--accent) !important;
}

/* TITRES H3 : Style simple souligné */
.wp-block-post-content h3,
.entry-content h3,
h3.wp-block-heading,
.tribe-events-content h3,
.tribe-events-single-event-description h3, 
.tribe-events-single-section-title {
    margin-top: 1.2em;
    font-family: "Cardo", serif !important;
    color: var(--accent) !important;
    border-bottom: 2px solid var(--wp--preset--color--accent-4, #b1c5a4);
    display: inline-block;
    padding-bottom: 4px;
}

/* LIENS : Contenu principal uniquement */
/* On exclut explicitement les boutons et les images */
.wp-block-post-content a:where(:not(.wp-block-button__link):not(.button):not(.wp-element-button)),
.entry-content a:where(:not(.wp-block-button__link):not(.button):not(.wp-element-button)),
.tribe-events-content a:where(:not(.wp-block-button__link):not(.button):not(.tribe-events-button)) {
    color: var(--wp--preset--color--accent-3, #d8613c) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.wp-block-post-content a:where(:not(.wp-block-button__link):not(.button):not(.wp-element-button)):hover,
.entry-content a:where(:not(.wp-block-button__link):not(.button):not(.wp-element-button)):hover,
.tribe-events-content a:where(:not(.wp-block-button__link):not(.button):not(.tribe-events-button)):hover {
    text-decoration: underline !important;
}

/* LISTES : Chevron de style */
/* On cible les listes standards du contenu en excluant tous les blocs techniques */
.wp-block-post-content ul:not(.wp-block-gallery):not(.wp-block-social-links):not(.wp-block-post-template):not(.wp-block-latest-posts):not(.wp-block-categories):not(.wp-block-archives):not(.tribe-common-l-container),
.entry-content ul:not(.wp-block-gallery):not(.wp-block-social-links):not(.wp-block-post-template):not(.wp-block-latest-posts):not(.wp-block-categories):not(.wp-block-archives):not(.tribe-common-l-container),
.tribe-events-content ul,
.tribe-events-single-event-description ul,
/* Ciblage spécifique fort pour écraser les styles du plugin */
body.single-tribe_events .tribe-events-content ul, 
body.single-tribe_events .tribe-events-single-event-description ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

/* Force List Style to NONE for TEC */
/* On cible la wrapper global de TEC pour être sûr de tout prendre sans toucher le header global */
.tribe-events-content ul,
.tribe-events-single-event-description ul,
body.single-tribe_events .tribe-events ul,
body.single-tribe_events .tribe-common ul,
body.single-tribe_events .tribe-events-single ul {
    list-style-type: none !important; 
    list-style: none !important;
}

.wp-block-post-content ul:not(.wp-block-gallery):not(.wp-block-social-links):not(.wp-block-post-template):not(.wp-block-latest-posts):not(.wp-block-categories):not(.wp-block-archives):not(.tribe-common-l-container) li,
.entry-content ul:not(.wp-block-gallery):not(.wp-block-social-links):not(.wp-block-post-template):not(.wp-block-latest-posts):not(.wp-block-categories):not(.wp-block-archives):not(.tribe-common-l-container) li,
.tribe-events-content ul li,
.tribe-events-single-event-description ul li,
body.single-tribe_events .tribe-events ul li,
body.single-tribe_events .tribe-common ul li,
body.single-tribe_events .tribe-events-single ul li {
    padding-left: 1.5em !important;
    position: relative;
    margin-bottom: 0.5em;
    list-style-type: none !important;
}

.wp-block-post-content ul:not(.wp-block-gallery):not(.wp-block-social-links):not(.wp-block-post-template):not(.wp-block-latest-posts):not(.wp-block-categories):not(.wp-block-archives):not(.tribe-common-l-container) li::before,
.entry-content ul:not(.wp-block-gallery):not(.wp-block-social-links):not(.wp-block-post-template):not(.wp-block-latest-posts):not(.wp-block-categories):not(.wp-block-archives):not(.tribe-common-l-container) li::before,
.tribe-events-content ul li::before,
.tribe-events-single-event-description ul li::before,
body.single-tribe_events .tribe-events ul li::before,
body.single-tribe_events .tribe-common ul li::before,
body.single-tribe_events .tribe-events-single ul li::before {
    content: '\276F';
    position: absolute;
    left: 0;
    color: var(--wp--preset--color--accent-3, #d8613c) !important;
    font-weight: bold;
}


/* EMAIL LIENS : Ajout automatique de l'icône enveloppe */
/* Uniquement pour les liens mailto: dans le contenu */
.wp-block-post-content a[href^='mailto:']:not(.wp-block-button__link):not(.button):not(.wp-element-button),
.entry-content a[href^='mailto:']:not(.wp-block-button__link):not(.button):not(.wp-element-button),
.tribe-events-content a[href^='mailto:']:not(.wp-block-button__link):not(.button):not(.tribe-events-button) {
    display: inline-flex;
    align-items: center;
    gap: 0.5em; /* Espace entre icone et texte */
}

.wp-block-post-content a[href^='mailto:']:not(.wp-block-button__link):not(.button):not(.wp-element-button)::before,
.entry-content a[href^='mailto:']:not(.wp-block-button__link):not(.button):not(.wp-element-button)::before,
.tribe-events-content a[href^='mailto:']:not(.wp-block-button__link):not(.button):not(.tribe-events-button)::before {
    content: '\f0e0'; /* Code FontAwesome Enveloppe */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1em;
    color: var(--wp--preset--color--accent-3, #d8613c); /* Rouille (comme sur la page Handicap) */
}

