/**
 * Agenda des événements — styles public
 *
 * Volontairement sobre : les couleurs dérivent de variables surchargeables,
 * de façon à suivre la palette du Customizer OceanWP sans la contredire.
 */

.owpc-agenda {
	--owpc-accent: #9F1363;
	--owpc-border: #e4e7ea;
	--owpc-muted: #6c7378;
	--owpc-surface: #fff;

	margin: 0 0 2.5em;
}

/* ---------------------------------------------------------------------------
 * Barre d'outils : bascule de vue et filtres
 * ------------------------------------------------------------------------ */

.owpc-agenda__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 1.5em;
}

.owpc-agenda__views {
	display: flex;
	gap: 4px;
}

.owpc-agenda__views:empty {
	display: none;
}

.owpc-agenda__view,
.owpc-agenda__filter {
	padding: 7px 16px;
	border: 1px solid var(--owpc-border);
	border-radius: 999px;
	background: var(--owpc-surface);
	color: inherit;
	font-size: 0.9em;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.owpc-agenda__view:hover,
.owpc-agenda__filter:hover {
	border-color: var(--owpc-accent);
}

.owpc-agenda__view.is-active,
.owpc-agenda__filter.is-active {
	border-color: var(--owpc-accent);
	background: var(--owpc-accent);
	color: #fff;
}

.owpc-agenda__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* ---------------------------------------------------------------------------
 * Vue liste
 * ------------------------------------------------------------------------ */

.owpc-agenda__month {
	margin-bottom: 2em;
}

.owpc-agenda__month-title {
	margin: 0 0 0.6em;
	font-size: 1.05em;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--owpc-muted);
}

.owpc-agenda__entries {
	margin: 0;
	padding: 0;
	list-style: none;
}

.owpc-agenda-entry {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px 0;
	border-top: 1px solid var(--owpc-border);
}

.owpc-agenda-entry:last-child {
	border-bottom: 1px solid var(--owpc-border);
}

.owpc-agenda-entry__date {
	flex: none;
	width: 58px;
	padding: 8px 0;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
	text-align: center;
	line-height: 1.1;
}

.owpc-agenda-entry__day {
	display: block;
	font-size: 1.5em;
	font-weight: 700;
}

.owpc-agenda-entry__dow {
	display: block;
	font-size: 0.75em;
	text-transform: uppercase;
	color: var(--owpc-muted);
}

.owpc-agenda-entry__body {
	flex: 1 1 auto;
	min-width: 0;
}

.owpc-agenda-entry__title {
	margin: 0 0 4px;
	font-size: 1.05em;
	line-height: 1.35;
}

.owpc-agenda-entry__meta {
	margin: 0;
	font-size: 0.9em;
	color: var(--owpc-muted);
}

.owpc-agenda-entry__modules {
	margin-top: 8px;
	font-size: 0.9em;
}

.owpc-agenda-entry__modules summary {
	cursor: pointer;
	color: var(--owpc-accent);
}

.owpc-agenda-entry__modules ul {
	margin: 8px 0 0;
	padding-left: 1.2em;
}

.owpc-agenda-entry__action {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	text-align: right;
}

.owpc-agenda-entry__price {
	font-weight: 600;
	white-space: nowrap;
}

.owpc-agenda-entry__price del {
	opacity: 0.6;
	font-weight: 400;
}

.owpc-agenda-entry__button {
	display: inline-block;
	padding: 9px 18px;
	border-radius: 6px;
	background: var(--owpc-accent);
	color: #fff;
	font-size: 0.9em;
	text-decoration: none;
	white-space: nowrap;
}

.owpc-agenda-entry__button:hover,
.owpc-agenda-entry__button:focus {
	filter: brightness(0.92);
	color: #fff;
}

.owpc-agenda-entry__button.is-disabled {
	background: transparent;
	border: 1px solid var(--owpc-border);
	color: var(--owpc-muted);
	cursor: default;
}

.owpc-agenda-entry.is-full .owpc-agenda-entry__date {
	opacity: 0.55;
}

.owpc-agenda-entry.is-few .owpc-agenda-entry__meta {
	color: #b8541c;
}

.owpc-agenda__empty {
	padding: 1.5em 0;
	color: var(--owpc-muted);
}

/* Bloc compact de la page d'accueil. */

.owpc-agenda--compact .owpc-agenda-entry {
	padding: 12px 0;
}

.owpc-agenda__heading {
	margin: 0 0 0.8em;
}

.owpc-agenda__more {
	margin: 1em 0 0;
}

/* ---------------------------------------------------------------------------
 * Vue calendrier
 * ------------------------------------------------------------------------ */

.owpc-calendar__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-bottom: 12px;
}

.owpc-calendar__title {
	margin: 0;
	font-size: 1.1em;
	text-transform: capitalize;
}

.owpc-calendar__nav {
	width: 34px;
	height: 34px;
	border: 1px solid var(--owpc-border);
	border-radius: 50%;
	background: var(--owpc-surface);
	color: inherit;
	font-size: 1.2em;
	line-height: 1;
	cursor: pointer;
}

.owpc-calendar__nav:hover {
	border-color: var(--owpc-accent);
}

.owpc-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 1px;
	background: var(--owpc-border);
	border: 1px solid var(--owpc-border);
}

.owpc-calendar__dayname {
	padding: 8px 4px;
	background: rgba(0, 0, 0, 0.03);
	font-size: 0.75em;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--owpc-muted);
}

.owpc-calendar__cell {
	min-height: 86px;
	padding: 6px;
	background: var(--owpc-surface);
}

.owpc-calendar__cell.is-empty {
	background: rgba(0, 0, 0, 0.015);
}

.owpc-calendar__cell.is-today .owpc-calendar__number {
	display: inline-block;
	min-width: 1.6em;
	padding: 2px;
	border-radius: 50%;
	background: var(--owpc-accent);
	color: #fff;
	text-align: center;
}

.owpc-calendar__number {
	font-size: 0.85em;
	color: var(--owpc-muted);
}

.owpc-calendar__event {
	display: block;
	margin-top: 4px;
	padding: 3px 6px;
	border-radius: 4px;
	background: var(--owpc-accent);
	color: #fff;
	font-size: 0.72em;
	line-height: 1.25;
	text-decoration: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.owpc-calendar__event:hover,
.owpc-calendar__event:focus {
	color: #fff;
	filter: brightness(0.92);
}

/* ---------------------------------------------------------------------------
 * Fiche produit
 * ------------------------------------------------------------------------ */

.owpc-agenda-sessions {
	margin: 0 0 1.6em;
	padding: 16px 18px;
	border: 1px solid #e4e7ea;
	border-radius: 8px;
	--owpc-accent: #9F1363;
}

.owpc-agenda-sessions__title {
	margin: 0 0 10px;
	font-size: 1em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #6c7378;
}

.owpc-agenda-sessions__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.owpc-agenda-session {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	padding: 8px 0;
	border-top: 1px solid #eef0f2;
}

.owpc-agenda-session:first-child {
	border-top: 0;
}

.owpc-agenda-session__date {
	flex: 1 1 auto;
}

.owpc-agenda-session__date strong {
	margin-right: 6px;
}

.owpc-agenda-session__meta {
	font-size: 0.88em;
	color: #6c7378;
}

.owpc-agenda-session.is-past,
.owpc-agenda-session.is-full {
	opacity: 0.5;
}

.owpc-agenda-session__pick {
	flex: none;
	padding: 5px 12px;
	border: 1px solid #5815a0;
	border-radius: 5px;
	background: transparent;
	color: var(--owpc-accent);
	font-size: 0.85em;
	font-family: inherit;
	cursor: pointer;
}

.owpc-agenda-session__pick:hover,
.owpc-agenda-session__pick:focus {
	background: var(--owpc-accent);
	color: #fff;
}

/* ---------------------------------------------------------------------------
 * Badge de la boutique
 * ------------------------------------------------------------------------ */

.owpc-agenda-badge {
	display: block;
	margin: 4px 0 6px;
	font-size: 0.82em;
	color: #6c7378;
}

/* ---------------------------------------------------------------------------
 * Mobile : la grille devient illisible en dessous de 600 px, on la replie
 * en colonne unique où seuls les jours occupés subsistent.
 * ------------------------------------------------------------------------ */

@media (max-width: 600px) {

	/* Page agenda : l'entrée se replie, le prix et le bouton passent sous le
	   titre en s'alignant sur la pastille de date, qui reste. */
	.owpc-agenda:not(.owpc-agenda--compact) .owpc-agenda-entry {
		flex-wrap: wrap;
	}

	.owpc-agenda:not(.owpc-agenda--compact) .owpc-agenda-entry__action {
		flex-basis: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		gap: 12px;
		padding-left: 74px;
		text-align: left;
	}

	/* Bloc d'accueil : la pastille de date disparaît, et l'entrée tient sur une
	   ligne — titre à gauche, prix et bouton à droite.

	   La pastille porte « aria-hidden » : c'est un décor, et la date complète est
	   déjà écrite en clair dans la ligne de méta juste en dessous. La masquer ne
	   retire donc rien à personne — elle ne faisait que prendre 74 px de large sur
	   un écran qui n'en a pas à donner, et repousser le bouton sur sa propre
	   ligne. */
	.owpc-agenda--compact .owpc-agenda-entry__date {
		display: none;
	}

	.owpc-agenda--compact .owpc-agenda-entry {
		flex-wrap: nowrap;
		align-items: center;
		gap: 12px;
	}

	.owpc-agenda--compact .owpc-agenda-entry__action {
		flex: none;
		flex-direction: column;
		align-items: flex-end;
		justify-content: center;
		gap: 4px;
		padding-left: 0;
		text-align: right;
	}

	.owpc-calendar__grid {
		display: block;
		border: 0;
		background: transparent;
	}

	.owpc-calendar__dayname,
	.owpc-calendar__cell.is-empty,
	.owpc-calendar__cell:not(.has-events) {
		display: none;
	}

	.owpc-calendar__cell {
		min-height: 0;
		margin-bottom: 6px;
		padding: 10px 12px;
		border: 1px solid var(--owpc-border);
		border-radius: 6px;
	}

	.owpc-calendar__event {
		white-space: normal;
	}
}

/* Fiche produit sans date à venir : le message qui remplace le formulaire. */
.owpc-agenda-nodate {
	margin: 1em 0;
	padding: 12px 16px;
	border-left: 3px solid currentColor;
	background: rgba(0, 0, 0, 0.03);
	font-style: italic;
}

/* ---------------------------------------------------------------------------
 * Tableau de réservation (fiche produit pilotée)
 *
 * Il remplace le formulaire d'ajout au panier : chaque bouton met au panier une
 * variation précise. Les rôles sont empilés dans la dernière cellule plutôt
 * qu'étalés en colonnes — une matrice de rôles ne se replie pas sur un
 * téléphone, une pile si.
 * ------------------------------------------------------------------------ */

.owpc-agenda-book {
	--owpc-accent: #9F1363;
	/* Le vert du thème parent (#77a464) manque de contraste sur blanc pour du
	   petit texte : voici son cousin lisible, de la même famille. */
	--owpc-book-ok: #4a7a35;
	--owpc-book-off: #6c7378;
	width: 100%;
	margin: 0 0 1em;
	border-collapse: collapse;
	font-size: 0.95em;
}

.owpc-agenda-book th,
.owpc-agenda-book td {
	padding: 9px 14px 9px 0;
	border-bottom: 1px solid #eef0f2;
	text-align: left;
	/* Les lignes tiennent désormais sur une hauteur de bouton : la date se cale
	   en face de lui plutôt que de flotter en haut d'une cellule vide. */
	vertical-align: middle;
}

.owpc-agenda-book thead th {
	padding-bottom: 8px;
	border-bottom: 1px solid #e4e7ea;
	font-size: 0.82em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #6c7378;
}

.owpc-agenda-book__date {
	font-weight: 400;
	/* Le thème parent met les en-têtes de ligne en majuscules : « MAR 15 SEP
	   2026 » se lit moins bien, et prend plus de large, que « mar. 15 sep. 2026 ». */
	text-transform: none;
}

.owpc-agenda-book__date strong {
	display: block;
}

.owpc-agenda-book__location,
.owpc-agenda-book__time {
	color: #6c7378;
	white-space: nowrap;
}

.owpc-agenda-book__actions {
	width: 1%;
	padding-right: 0;
	/* « width: 1% » demande la cellule la plus étroite possible ; ce plancher lui
	   garde de quoi poser un bouton lisible. Surtout, pas de « nowrap » ici : le
	   formulaire doit pouvoir replier son champ sous le bouton quand la colonne
	   se resserre. */
	min-width: 17em;
}

/* Une seule ligne par rôle : le bouton, puis le nombre de places à sa droite.
   À sa droite, et non à sa gauche : un champ posé devant décalerait les boutons
   sans décaler les pastilles « Complet », et les rôles d'une même date
   formeraient un escalier. */
.owpc-agenda-book__form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px;
}

.owpc-agenda-book__form:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Le nombre de places, et le choix du règlement
 *
 * Deux champs posés DANS le formulaire de chaque date : c'est la seule façon
 * de les faire voyager avec le bon bouton sans JavaScript. Ils restent donc
 * discrets — c'est le bouton qui appelle, pas eux.
 * ------------------------------------------------------------------------ */

.owpc-agenda-book__seats {
	order: 2;
	flex: none;
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-size: 0.84em;
	color: var(--owpc-book-off);
}

.owpc-agenda-book__seats input {
	width: 3.6em;
	min-height: 0;
	margin: 0;
	padding: 4px 6px;
	font-size: 1em;
	line-height: 1.3;
}

/* Le bloc rendu par l'extension d'acompte. On ne le redessine pas — on le
   range : il a été conçu pour une fiche produit où il était seul, et se
   retrouve ici répété sous chaque date. */
.owpc-agenda-book__form .awcdp-deposits-wrapper {
	order: 3;
	flex-basis: 100%;
	margin: 2px 0 0;
	font-size: 0.84em;
	line-height: 1.35;
}

.owpc-agenda-book__form .awcdp-deposits-option {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.owpc-agenda-book__form .awcdp-radio label {
	display: inline;
	margin: 0 0 0 4px;
	font-weight: normal;
	white-space: normal;
}

.owpc-agenda-book__form .awcdp-deposits-description {
	margin-left: 20px;
	color: var(--owpc-book-off);
}

.owpc-agenda-book__button {
	order: 1;
	flex: 1 1 auto;
	min-width: 11em;
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 9px 16px;
	border: 1px solid #5815a0;
	border-radius: 5px;
	background: transparent;
	color: var(--owpc-accent);
	font-size: 0.92em;
	font-family: inherit;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
}

.owpc-agenda-book__button:hover,
.owpc-agenda-book__button:focus {
	background: var(--owpc-accent);
	border-color: var(--owpc-accent);
	color: #fff;
}

.owpc-agenda-book__button .owpc-agenda-book__role {
	font-weight: 600;
}

.owpc-agenda-book__button .owpc-agenda-book__price {
	margin-left: auto;
	white-space: nowrap;
}

/* Le prix arrive de WooCommerce enveloppé : il ne doit pas hériter d'un style
   de lien ni d'une couleur qui contredirait le survol du bouton. */
.owpc-agenda-book__button .amount,
.owpc-agenda-book__button del,
.owpc-agenda-book__button ins {
	color: inherit;
	background: none;
	text-decoration: inherit;
}

/* ---------------------------------------------------------------------------
 * La mention de places restantes
 *
 * Le tableau n'écrit plus la phrase de disponibilité sous chaque bouton : elle
 * répétait « Places disponibles » là où le bouton le promettait déjà. Ne reste
 * que le cas où elle informe — « Plus que 2 places » —, rendu par
 * owpc_agenda_seats_notice() dans sa propre classe.
 *
 * Elle n'emprunte donc plus « p.stock » à WooCommerce, et n'a plus à batailler
 * de spécificité contre le thème parent, qui colorait cette classe en vert dans
 * le résumé du produit et en rouge en dehors — la même phrase changeait de
 * couleur d'un tableau à l'autre.
 *
 * L'ambre ne sert nulle part ailleurs dans cette feuille : il ne peut se
 * confondre ni avec l'accent, ni avec le gris des places fermées.
 * ------------------------------------------------------------------------ */

.owpc-agenda-book__urgent {
	margin: 0 0 6px;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.3;
	color: #a05a00;
}

/* ---------------------------------------------------------------------------
 * Un rôle fermé
 *
 * Il tient exactement la place qu'aurait tenue son bouton : même hauteur, même
 * bord gauche, et la mention « Complet » là où se lit le prix des rôles
 * ouverts. Le trait pointillé et le fond plat disent la porte fermée sans
 * qu'un mot de plus soit nécessaire.
 * ------------------------------------------------------------------------ */

.owpc-agenda-book__state {
	display: flex;
	align-items: baseline;
	gap: 10px;
	min-width: 11em;
	margin: 0 0 6px;
	padding: 9px 16px;
	border: 1px dashed #d6dade;
	border-radius: 5px;
	background: #f7f8f9;
	font-size: 0.92em;
	line-height: 1.3;
	color: var(--owpc-book-off);
}

.owpc-agenda-book__state:last-child {
	margin-bottom: 0;
}

.owpc-agenda-book__state .owpc-agenda-book__role {
	font-weight: 600;
	text-decoration: line-through;
}

/* Même place que le prix sur un bouton ouvert : l'œil compare deux colonnes,
   pas deux phrases. */
.owpc-agenda-book__closed {
	margin-left: auto;
	font-size: 0.88em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

/* Seul dans sa pastille — offre sans rôle nommé —, le mot n'a personne à
   repousser : il se lit à gauche, comme le ferait le libellé d'un bouton. */
.owpc-agenda-book__closed:only-child {
	margin-left: 0;
}

/* Plus aucun rôle à prendre sur cette date : c'est la ligne entière qui
   s'éteint, et non la seule date. L'opacité rendait le texte flou ; une
   couleur franche et un fond très pâle se lisent mieux. */
.owpc-agenda-book__row.is-full {
	background: #fafbfc;
}

.owpc-agenda-book__row.is-full .owpc-agenda-book__date {
	color: var(--owpc-book-off);
}

/* ---------------------------------------------------------------------------
 * Bloc de bas de fiche : hésiter, ou s'inscrire
 * ------------------------------------------------------------------------ */

.owpc-agenda-closing {
	margin: 2.5em 0 1.5em;
	padding: 20px 22px;
	border: 1px solid #e4e7ea;
	border-radius: 8px;
}

.owpc-agenda-closing__title {
	margin: 0 0 12px;
	font-size: 1.15em;
}

.owpc-agenda-closing__title + * {
	margin-top: 0;
}

.owpc-agenda-closing .owpc-agenda-book {
	margin-bottom: 0;
}

/* Un bouton WhatsApp pleine largeur est juste dans une colonne d'achat étroite ;
   en pied de fiche, il tirerait sur toute la page. */
.owpc-agenda-closing__contact {
	margin: 0 0 2em;
}

.owpc-agenda-closing__contact .owpc-whatsapp-btn {
	max-width: 420px;
	margin-top: 0;
}

@media (max-width: 600px) {

	/* Le tableau se replie en cartes : chaque ligne devient un bloc, et les
	   cellules secondaires reprennent leur en-tête de colonne en préfixe. */
	.owpc-agenda-book,
	.owpc-agenda-book tbody,
	.owpc-agenda-book__row,
	.owpc-agenda-book__row > * {
		display: block;
		width: auto;
	}

	.owpc-agenda-book thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.owpc-agenda-book__row {
		margin-bottom: 14px;
		padding-bottom: 14px;
		border-bottom: 1px solid #eef0f2;
	}

	.owpc-agenda-book__row > * {
		padding: 2px 0;
		border-bottom: 0;
	}

	.owpc-agenda-book__date {
		margin-bottom: 4px;
		font-size: 1.05em;
	}

	.owpc-agenda-book__location::before,
	.owpc-agenda-book__time::before {
		content: attr(data-colonne) " : ";
	}

	.owpc-agenda-book__actions {
		margin-top: 8px;
		/* En carte, la cellule fait la largeur de l'écran : le plancher posé pour
		   la vue en tableau ferait déborder les petits écrans. */
		min-width: 0;
	}
}

/* Dans le cadre du haut, le titre porte déjà la marge basse. */
.owpc-agenda-sessions .owpc-agenda-book {
	margin-bottom: 0;
}
