/* ==========================================================================
   Opéra Bastide – Bandeau billetterie
   ========================================================================== */

.opbastide-billet {
	--ob-accent: #e8542a;
	--ob-ink: #14110f;
	--ob-paper: #fbf7f0;
	position: fixed;
	bottom: 22px;
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.opbastide-billet--right { right: 22px; }
.opbastide-billet--left  { left: 22px; }

@media (max-width: 600px) {
	.opbastide-billet--right,
	.opbastide-billet--left {
		right: 12px;
		left: 12px;
		bottom: 12px;
	}
}

/* --- Carte dépliée ------------------------------------------------------ */
.opbastide-billet__card {
	position: relative;
	width: 320px;
	max-width: calc(100vw - 24px);
	background: var(--ob-ink);
	color: var(--ob-paper);
	border-radius: 16px;
	box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
	overflow: hidden;
	transform-origin: bottom right;
}

.opbastide-billet--left .opbastide-billet__card { transform-origin: bottom left; }

/* Liseré d'accent en haut de la carte */
.opbastide-billet__card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--ob-accent);
}

.opbastide-billet__link {
	display: block;
	padding: 26px 22px 22px;
	text-decoration: none;
	color: inherit;
}
.opbastide-billet__link:hover,
.opbastide-billet__link:focus { color: inherit; }

.opbastide-billet__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ob-accent);
}

.opbastide-billet__pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ob-accent);
	box-shadow: 0 0 0 0 var(--ob-accent);
	animation: ob-pulse 2s infinite;
}

@keyframes ob-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(232, 84, 42, 0.55); }
	70%  { box-shadow: 0 0 0 9px rgba(232, 84, 42, 0); }
	100% { box-shadow: 0 0 0 0 rgba(232, 84, 42, 0); }
}

.opbastide-billet__title {
	display: block;
	margin: 12px 0 4px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 23px;
	line-height: 1.15;
	font-weight: 400;
}

.opbastide-billet__message {
	display: block;
	font-size: 14px;
	line-height: 1.45;
	color: rgba(251, 247, 240, 0.78);
}

.opbastide-billet__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 18px;
	padding: 11px 18px;
	background: var(--ob-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 0;
	transition: transform 0.18s ease, filter 0.18s ease;
}

.opbastide-billet__link:hover .opbastide-billet__btn { filter: brightness(1.06); }
.opbastide-billet__link:hover .opbastide-billet__arrow { transform: translateX(3px); }
.opbastide-billet__arrow { transition: transform 0.18s ease; }

/* --- Bouton replier ----------------------------------------------------- */
.opbastide-billet__close {
	position: absolute;
	top: 9px;
	right: 9px;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 0;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(251, 247, 240, 0.7);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease;
}
.opbastide-billet__close:hover {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

/* --- Onglet replié ------------------------------------------------------ */
.opbastide-billet__tab {
	display: none;
	align-items: center;
	gap: 9px;
	padding: 11px 18px;
	border: 0;
	border-radius: 0;
	background: var(--ob-ink);
	color: var(--ob-paper);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
	transition: transform 0.18s ease;
}
.opbastide-billet__tab:hover { transform: translateY(-2px); }

.opbastide-billet__tab-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--ob-accent);
	box-shadow: 0 0 0 0 var(--ob-accent);
	animation: ob-pulse 2s infinite;
}

/* --- États -------------------------------------------------------------- */

/* Déplié (par défaut une fois visible) */
.opbastide-billet[data-state="open"]  .opbastide-billet__card { display: block; }
.opbastide-billet[data-state="open"]  .opbastide-billet__tab  { display: none; }

/* Replié */
.opbastide-billet[data-state="collapsed"] .opbastide-billet__card { display: none; }
.opbastide-billet[data-state="collapsed"] .opbastide-billet__tab  { display: inline-flex; }

/* Animations d'entrée */
.opbastide-billet[data-state="open"] .opbastide-billet__card {
	animation: ob-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.opbastide-billet[data-state="collapsed"] .opbastide-billet__tab {
	animation: ob-tab-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ob-card-in {
	from { opacity: 0; transform: translateY(18px) scale(0.96); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ob-tab-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.opbastide-billet *,
	.opbastide-billet__card,
	.opbastide-billet__tab,
	.opbastide-billet__pulse,
	.opbastide-billet__tab-dot { animation: none !important; transition: none !important; }
}
