/* Onglet latéral (CPA) – annonce collée au bord droit de l'écran */
.cpa-ol {
	--cpa-ol-accent: #d4537e;
	--cpa-ol-bg: #210834;
	position: fixed;
	right: 0;
	top: 50%;
	z-index: 9990;
	display: flex;
	align-items: center;
	transform: translateY(-50%);
	pointer-events: none;
}

.cpa-ol,
.cpa-ol * {
	box-sizing: border-box;
}

.cpa-ol > * {
	pointer-events: auto;
}

/* L'onglet vertical */
.cpa-ol__tab {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	background: var(--cpa-ol-accent);
	color: #fff;
	border: 0;
	border-radius: 0 12px 12px 0;
	padding: 18px 11px;
	font-family: 'Outfit', sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(33, 8, 52, .25);
	transition: padding .2s ease, background-color .2s ease;
}

.cpa-ol__tab:hover,
.cpa-ol__tab:focus-visible {
	padding-right: 15px;
	outline: none;
}

.cpa-ol__tab:focus-visible {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--cpa-ol-accent);
}

/* Halo qui pulse doucement tant que le panneau est fermé */
.cpa-ol--pulse:not(.is-open) .cpa-ol__tab {
	animation: cpa-ol-pulse 2.4s ease-out infinite;
}

@keyframes cpa-ol-pulse {
	0%   { box-shadow: 0 4px 18px rgba(33, 8, 52, .25), 0 0 0 0 rgba(212, 83, 126, .55); }
	70%  { box-shadow: 0 4px 18px rgba(33, 8, 52, .25), 0 0 0 14px rgba(212, 83, 126, 0); }
	100% { box-shadow: 0 4px 18px rgba(33, 8, 52, .25), 0 0 0 0 rgba(212, 83, 126, 0); }
}

/* Le panneau */
.cpa-ol__panel {
	position: relative;
	width: min(320px, calc(100vw - 48px));
	background: var(--cpa-ol-bg);
	color: #fff;
	border-radius: 18px 0 0 18px;
	padding: 28px 26px 26px;
	box-shadow: 0 0 0 2px var(--cpa-ol-accent), 0 10px 40px rgba(212, 83, 126, .35);
	transform: translateX(110%);
	opacity: 0;
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
	margin-right: -320px; /* Fermé : ne prend pas de place, l'onglet reste au bord. */
}

.cpa-ol.is-open .cpa-ol__panel {
	transform: translateX(0);
	opacity: 1;
	margin-right: 0;
}

.cpa-ol__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.cpa-ol__close:hover,
.cpa-ol__close:focus-visible {
	background: rgba(255, 255, 255, .18);
	outline: none;
}

.cpa-ol__panel p {
	margin: 0;
}

.cpa-ol__eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #f2a9c3;
	padding-right: 30px;
	margin-bottom: 8px !important;
}

.cpa-ol__title {
	font-family: 'Outfit', sans-serif;
	font-size: 24px;
	font-weight: 800;
	line-height: 1.15;
	color: #fff;
	margin-bottom: 14px !important;
}

.cpa-ol__date {
	display: inline-block;
	font-family: 'Outfit', sans-serif;
	font-size: 17px;
	font-weight: 700;
	color: #fff;
	background: rgba(212, 83, 126, .25);
	border: 1px solid rgba(212, 83, 126, .6);
	border-radius: 12px;
	padding: 7px 14px;
	margin-bottom: 14px !important;
}

.cpa-ol__text {
	font-size: 14px;
	line-height: 1.5;
	color: #d9cde3;
	margin-bottom: 16px !important;
}

.cpa-ol__btn,
.cpa-ol__btn:visited {
	display: block;
	text-align: center;
	background: var(--cpa-ol-accent);
	color: #fff !important;
	font-weight: 700;
	font-size: 15px;
	border-radius: 999px;
	padding: 13px 20px;
	text-decoration: none !important;
	transition: filter .2s ease, transform .2s ease;
}

.cpa-ol__btn:hover,
.cpa-ol__btn:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	outline: none;
}

@media (max-width: 480px) {
	.cpa-ol__panel { padding: 24px 20px 22px; }
	.cpa-ol__title { font-size: 21px; }
	.cpa-ol__date { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
	.cpa-ol--pulse:not(.is-open) .cpa-ol__tab { animation: none; }
	.cpa-ol__panel { transition: none; }
}
