/* Nautilia Events Calendar — rendu calqué sur Time.ly (zhbudl5p) */

.nec-calendar {
	--nec-ink: #322f2f;
	--nec-time: #223e49;
	--nec-muted: #686868;
	--nec-header: #2ab8ca;
	--nec-header-today: rgba(42, 184, 202, 0.81);
	--nec-orange: #f59c00;
	--nec-card: #f7f7f7;
	--nec-filters-bg: #f9f9f9;
	--nec-details-bg: #fbfbfb;
	--nec-line: #e5e5e5;
	--nec-close: #506688;
	--nec-badge: #8089a7;
	box-sizing: border-box;
	color: var(--nec-ink);
	font-family: Oswald, Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 20px;
	background: #fff;
	padding: 0 20px 20px;
	width: 100%;
	-webkit-font-smoothing: antialiased;
}

.nec-calendar *,
.nec-calendar *::before,
.nec-calendar *::after {
	box-sizing: border-box;
}

/* —— Toolbar dates (Time.ly) —— */
.nec-toolbar {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin: 5px 0 0;
	padding: 0;
	min-height: 44px;
	gap: 0;
}

.nec-nav {
	display: flex;
	align-items: center;
	gap: 0;
}

.nec-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: 0 14px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--nec-ink);
	text-decoration: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.nec-arrow:last-of-type {
	margin: 0 0 0 14px;
}

.nec-arrow:hover {
	color: var(--nec-header);
}

.nec-period {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--nec-ink);
	text-align: center;
	border: 0;
	background: #fff;
	padding: 0;
}

.nec-period-date {
	border-bottom: 1px dashed #ccc;
	padding-bottom: 1px;
	min-width: 4.5rem;
}

.nec-period-sep {
	color: #ccc;
	padding: 0 0.15rem;
}

.nec-views {
	display: none;
}

.nec-calendar[data-views="yes"] .nec-views {
	display: flex;
	margin-left: auto;
	gap: 6px;
}

.nec-view-btn {
	text-decoration: none;
	color: var(--nec-ink);
	border: 1px solid var(--nec-line);
	padding: 6px 12px;
	font-size: 13px;
	background: #fff;
	font-family: inherit;
	cursor: pointer;
}

.nec-view-btn.is-active,
.nec-view-btn:hover {
	background: var(--nec-header);
	border-color: var(--nec-header);
	color: #fff;
}

/* —— Filtres —— */
.nec-filters {
	background: var(--nec-filters-bg);
	margin: 26px 0;
	padding: 20px;
	border: 0;
}

.nec-filter-form {
	display: inline-block;
	margin: 0 11px;
}

.nec-filters > .nec-filter-select,
.nec-filter-form .nec-filter-select {
	margin: 0 5px 0 11px;
}

.nec-filter-select {
	appearance: none;
	-webkit-appearance: none;
	background: var(--nec-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23fff' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 14px center;
	color: #fff !important;
	border: 0;
	border-radius: 6px;
	padding: 10px 36px 10px 18px;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 24px;
	min-width: 140px;
	cursor: pointer;
	height: auto;
}

.nec-filter-select option {
	color: #322f2f;
	background: #fff;
}

/* —— Vue semaine (grille CSS, pas de tableau) —— */
.nec-week-view {
	margin-top: 10px;
	width: 100%;
}

.nec-week-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 13px;
	align-items: start;
	justify-items: stretch;
	width: 100%;
	max-width: 100%;
}

.nec-week-col {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.nec-week-head {
	background: var(--nec-header);
	color: #fff;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	padding: 10px 8px;
	text-transform: lowercase;
	margin: 0 0 1px;
	width: 100%;
	box-sizing: border-box;
}

.nec-week-col.is-today .nec-week-head {
	background: var(--nec-header-today);
	color: #333;
}

.nec-week-events {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	min-width: 0;
}

.nec-week-event {
	display: block;
	width: 100%;
	background: var(--nec-card);
	color: var(--nec-ink);
	padding: 8px;
	margin: 0;
	text-decoration: none;
	border: 0;
	border-radius: 0;
	text-align: left;
	font: inherit;
	cursor: pointer;
	box-shadow: none;
	min-width: 0;
}

.nec-week-event:hover {
	background: #f0f0f0;
}

.nec-week-image {
	display: block;
	width: 100%;
	height: 50px;
	object-fit: cover;
	margin: 0 0 15px;
	border: 0;
}

.nec-title {
	display: block;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 400;
	line-height: 21px;
	color: var(--nec-ink);
	margin: -7px 0 0;
	word-break: break-word;
}

.nec-datetime {
	display: block;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: 400;
	line-height: 14px;
	color: var(--nec-time);
	margin: 0;
}

/* Time.ly n’affiche pas Réserver sur les cartes semaine (desktop) */
.nec-week-view .nec-resa {
	display: none;
}

.nec-resa {
	display: inline-block;
	margin-top: 6px;
	background: var(--nec-orange);
	color: #fff !important;
	padding: 5px 10px;
	font-size: 12px;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	text-decoration: none;
	line-height: 1.2;
	border-radius: 0;
}

.nec-week-event:hover .nec-resa {
	filter: brightness(0.95);
}

/* —— Mois / Liste —— */
.nec-month {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	margin-top: 10px;
}

.nec-month-dow {
	background: var(--nec-header);
	color: #fff;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	padding: 8px 4px;
	text-transform: lowercase;
}

.nec-month-cell {
	background: #fff;
	border: 1px solid var(--nec-line);
	min-height: 96px;
	padding: 6px;
}

.nec-month-cell.is-outside {
	opacity: 0.4;
}

.nec-month-cell.is-today {
	outline: 2px solid var(--nec-header);
}

.nec-month-date {
	font-size: 13px;
	font-weight: 700;
	margin-bottom: 4px;
}

.nec-pill {
	display: block;
	width: 100%;
	background: var(--nec-card);
	color: var(--nec-ink);
	text-decoration: none;
	font-size: 11px;
	padding: 4px 6px;
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border: 0;
	text-align: left;
	font-family: inherit;
	cursor: pointer;
}

.nec-list {
	margin-top: 10px;
}

.nec-list-day {
	background: var(--nec-header);
	color: #fff;
	font-size: 17px;
	font-weight: 700;
	margin: 16px 0 8px;
	padding: 10px 16px;
	text-transform: lowercase;
}

.nec-list .nec-week-event {
	max-width: 420px;
}

.nec-list .nec-title {
	margin-top: 0;
}

.nec-empty {
	margin: 0;
	color: #aaa;
	font-size: 13px;
	padding: 8px 0;
}

.nec-calendar.is-loading .nec-calendar-body {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* —— Modal type Time.ly —— */
body.nec-modal-open {
	overflow: hidden;
}

.nec-modal[hidden] {
	display: none !important;
}

.nec-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: block;
}

.nec-modal.is-open {
	display: block !important;
}

.nec-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.nec-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(960px, calc(100% - 32px));
	max-height: calc(100vh - 40px);
	margin: 20px auto;
	background: #fff;
	overflow: auto;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	color: #322f2f;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.nec-modal-close {
	position: absolute;
	top: 6px;
	right: 8px;
	z-index: 3;
	width: 28px;
	height: 32px;
	border: 0;
	background: transparent;
	color: var(--nec-close);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	text-shadow: none;
	padding: 1px 6px;
}

.nec-modal-hero {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	background: #f9f9f9;
	min-height: 0;
}

.nec-modal-image {
	flex: 1 1 62%;
	min-width: 0;
	min-height: 280px;
	max-width: 62%;
	background: #333;
}

.nec-modal-image img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 475px;
	object-fit: cover;
}

.nec-modal-heading {
	flex: 1 1 38%;
	gap: 14px;
	align-items: flex-start;
	padding: 12px 20px 12px 40px;
	background: #f9f9f9;
}

.nec-modal-hero:not(:has(.nec-modal-image)) .nec-modal-heading {
	flex: 1 1 100%;
	padding: 28px 40px;
}

.nec-modal-datebadge {
	min-width: 28px;
	text-transform: uppercase;
	color: var(--nec-badge);
	line-height: 1;
	margin: 20px 0;
}

.nec-modal-month {
	font-size: 12px;
	font-weight: 500;
	line-height: 12px;
	text-transform: uppercase;
}

.nec-modal-day {
	font-size: 24px;
	font-weight: 500;
	line-height: 24px;
	margin-top: 0;
}

.nec-modal-title {
	margin: 2px 0 10px;
	font-size: 28px;
	font-weight: 500;
	line-height: 1.1;
	color: #322f2f;
}

.nec-modal-body {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	gap: 0;
	padding: 0;
	min-height: 200px;
}

.nec-modal-description {
	flex: 1 1 58%;
	font-size: 14px;
	line-height: 20px;
	color: #322f2f;
	padding: 30px 20px 30px 50px;
}

.nec-modal-description p {
	margin: 0 0 0.85em;
}

.nec-modal-details {
	flex: 0 0 39%;
	background: var(--nec-details-bg);
	border-left: 0;
	padding: 10px 20px 24px;
}

.nec-modal-row {
	margin-bottom: 18px;
}

.nec-modal-row h3 {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	color: #322f2f;
	text-transform: uppercase;
	line-height: 1.1;
}

.nec-modal-row > div {
	font-size: 14px;
	color: #322f2f;
	line-height: 20px;
}

.nec-modal-chip {
	display: inline-block;
	margin: 0 6px 6px 0;
	color: #322f2f;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.nec-resa-lg,
.nec-modal-book .nec-resa {
	display: inline-block;
	margin: 0 0 14px;
	background: #f59c00;
	color: #fff !important;
	padding: 5px 10px;
	font-size: 14px;
	font-family: Oswald, Arial, Helvetica, sans-serif;
	text-decoration: none;
	border-radius: 0;
	line-height: 20px;
}

.nec-modal-book {
	margin: 0 0 16px;
}

.nec-resa-lg:hover,
.nec-modal-book .nec-resa:hover {
	filter: brightness(0.95);
	color: #fff !important;
}

.nec-modal-loading,
.nec-modal-error {
	padding: 40px 24px;
	text-align: center;
	color: #686868;
}

/* —— Responsive —— */
@media (max-width: 1100px) {
	.nec-week-grid {
		gap: 8px;
	}

	.nec-week-head {
		padding: 10px 4px;
		font-size: 13px;
	}
}

@media (max-width: 900px) {
	.nec-calendar {
		padding: 0 12px 16px;
	}

	.nec-toolbar {
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px 0;
		min-height: 0;
		margin-top: 8px;
	}

	.nec-nav {
		width: 100%;
		justify-content: space-between;
		align-items: center;
	}

	.nec-arrow {
		width: 44px;
		height: 44px;
		margin: 0;
		font-size: 28px;
		flex-shrink: 0;
	}

	.nec-period {
		flex: 1;
		justify-content: center;
		font-size: 16px;
		min-width: 0;
	}

	.nec-period-date {
		min-width: 0;
	}

	.nec-calendar[data-views="yes"] .nec-views {
		width: 100%;
		margin-left: 0;
		justify-content: center;
		flex-wrap: wrap;
	}

	.nec-filters {
		margin: 16px 0;
		padding: 12px;
	}

	.nec-filters > .nec-filter-select,
	.nec-filter-form .nec-filter-select {
		margin: 0;
		width: 100%;
		min-width: 0;
		font-size: 16px;
		padding: 12px 40px 12px 16px;
	}

	/* Semaine : jours empilés, 2 cours par ligne */
	.nec-week-grid {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		width: 100%;
	}

	.nec-week-col {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
		align-self: stretch;
		flex: 0 0 auto;
	}

	.nec-week-col.is-empty {
		display: none;
	}

	.nec-week-head {
		font-size: 14px;
		padding: 10px 12px;
		margin-bottom: 8px;
		width: 100%;
	}

	.nec-week-events {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		width: 100%;
	}

	.nec-week-event {
		padding: 8px;
		width: 100%;
		max-width: 100%;
	}

	.nec-week-image {
		height: 72px;
		margin-bottom: 10px;
	}

	.nec-title {
		font-size: 14px;
		line-height: 18px;
		margin-top: -4px;
	}

	.nec-datetime {
		font-size: 10px;
	}

	.nec-week-view .nec-resa {
		display: none;
	}

	.nec-month {
		display: flex;
		flex-direction: column;
		gap: 10px;
	}

	.nec-month-dow {
		display: none;
	}

	.nec-month-cell {
		min-height: 0;
		padding: 0;
		border: 0;
	}

	.nec-month-cell.is-empty,
	.nec-month-cell.is-outside {
		display: none;
	}

	.nec-month-cell .nec-month-date {
		display: none;
	}

	.nec-month-cell::before {
		content: attr(data-day-label);
		display: block;
		background: var(--nec-header);
		color: #fff;
		font-size: 14px;
		font-weight: 700;
		text-align: center;
		padding: 10px 12px;
		margin-bottom: 6px;
		text-transform: lowercase;
	}

	.nec-month-cell.is-today::before {
		background: var(--nec-header-today);
		color: #333;
	}

	.nec-pill {
		white-space: normal;
		font-size: 14px;
		padding: 10px 12px;
		margin-bottom: 6px;
		line-height: 1.3;
	}

	.nec-list .nec-week-event {
		max-width: none;
	}

	.nec-modal-dialog {
		width: 100%;
		max-width: 100%;
		height: 100%;
		max-height: 100%;
		margin: 0;
		border-radius: 0;
		box-shadow: none;
		overflow: auto;
		-webkit-overflow-scrolling: touch;
	}

	.nec-modal-hero,
	.nec-modal-body {
		flex-direction: column;
	}

	.nec-modal-image {
		max-width: 100%;
		flex: none;
		min-height: 180px;
		max-height: 42vh;
	}

	.nec-modal-image img {
		max-height: 42vh;
	}

	.nec-modal-heading {
		padding: 20px 16px 12px;
	}

	.nec-modal-title {
		font-size: 24px;
	}

	.nec-modal-description {
		padding: 16px;
	}

	.nec-modal-details {
		flex: none;
		width: 100%;
		padding: 16px;
		border-top: 1px solid #ececec;
	}

	.nec-modal-close {
		position: sticky;
		top: 8px;
		float: right;
		margin: 8px 8px -36px 0;
		background: rgba(255, 255, 255, 0.92);
		border-radius: 50%;
		box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
		width: 36px;
		height: 36px;
		font-size: 22px;
	}

	.nec-resa-lg,
	.nec-modal-book .nec-resa {
		width: 100%;
		text-align: center;
		padding: 12px 16px;
		font-size: 15px;
		box-sizing: border-box;
	}
}

@media (max-width: 480px) {
	.nec-calendar {
		padding: 0 8px 12px;
	}

	.nec-period {
		font-size: 14px;
		flex-direction: column;
		gap: 2px;
	}

	.nec-period-sep {
		display: none;
	}

	.nec-modal-title {
		font-size: 22px;
	}

	.nec-week-events {
		gap: 6px;
	}

	.nec-week-image {
		height: 56px;
		margin-bottom: 8px;
	}

	.nec-title {
		font-size: 13px;
		line-height: 16px;
	}
}

@supports (padding: max(0px)) {
	@media (max-width: 900px) {
		.nec-modal-dialog {
			padding-bottom: max(12px, env(safe-area-inset-bottom));
		}
	}
}
