/* ==========================================================================
   Capital Shorts — carrousel + lecteur vertical
   Toutes les couleurs/tailles passent par des variables CSS : le widget
   Elementor les surcharge, un thème enfant peut aussi le faire.
   ========================================================================== */

.cs-shorts {
	--cs-bg: #161616;
	--cs-fg: #ffffff;
	--cs-muted: #a3a3a3;
	--cs-line: #2e2e2e;
	--cs-accent: #2f8ce6;
	--cs-arrow-bg: #2b2b2b;
	--cs-radius: 0px;
	--cs-gap: 32px;
	--cs-per-view: 4;
	--cs-serif: "Playfair Display", Georgia, "Times New Roman", serif;
	--cs-sans: inherit;

	background: var(--cs-bg);
	color: var(--cs-fg);
	font-family: var(--cs-sans);
	position: relative;
	box-sizing: border-box;
}

.cs-shorts--light {
	--cs-bg: #ffffff;
	--cs-fg: #111111;
	--cs-muted: #6b6b6b;
	--cs-line: #e3e3e3;
	--cs-arrow-bg: #f0f0f0;
}

.cs-shorts *,
.cs-shorts *::before,
.cs-shorts *::after { box-sizing: border-box; }

.cs-shorts__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 44px clamp(16px, 4vw, 48px) 40px;
}

/* En-tête ---------------------------------------------------------------- */
.cs-shorts__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--cs-line);
}

.cs-shorts .cs-shorts__title {
	margin: 0;
	font-family: var(--cs-serif);
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--cs-fg);
	letter-spacing: -0.01em;
}

.cs-shorts .cs-shorts__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 600;
	color: var(--cs-fg);
	text-decoration: none;
	white-space: nowrap;
}
.cs-shorts .cs-shorts__more svg { transition: transform .2s ease; }
.cs-shorts .cs-shorts__more:hover svg { transform: translateX(4px); }

/* Piste ------------------------------------------------------------------ */
.cs-shorts__viewport { position: relative; }

.cs-shorts .cs-shorts__track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: var(--cs-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}
.cs-shorts__track::-webkit-scrollbar { display: none; }

.cs-shorts .cs-card {
	position: relative;
	flex: 0 0 calc((100% - (var(--cs-per-view) - 1) * var(--cs-gap)) / var(--cs-per-view));
	min-width: 0;
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
	list-style: none;
}

/* séparateurs verticaux façon Forbes */
.cs-shorts--carousel .cs-card + .cs-card::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(var(--cs-gap) / -2);
	width: 1px;
	background: var(--cs-line);
}

/* Grille ----------------------------------------------------------------- */
.cs-shorts--grid .cs-shorts__track {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 36px var(--cs-gap);
	overflow: visible;
}
.cs-shorts--grid .cs-card { flex: none; }

/* Vignette --------------------------------------------------------------- */
.cs-shorts .cs-card__media {
	position: relative;
	display: block;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	border-radius: var(--cs-radius);
	background: #000;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
}

.cs-shorts .cs-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.cs-card__img--empty { background: linear-gradient(160deg, #2a2a2a, #0d0d0d); }

.cs-card__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 40%);
	pointer-events: none;
}

.cs-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 54px;
	height: 54px;
	margin: -27px 0 0 -27px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(20, 20, 20, .78);
	color: #fff;
	transition: transform .25s ease, background .25s ease;
}
.cs-card__play svg { margin-left: 3px; }

.cs-card__caption {
	position: absolute;
	left: 8%;
	right: 8%;
	bottom: 23%;
	text-align: center;
	font-size: 12px;
	line-height: 1.7;
	pointer-events: none;
}
.cs-card__caption span {
	display: inline;
	padding: 2px 6px;
	background: rgba(0, 0, 0, .72);
	color: #fff;
	font-size: inherit;
	font-weight: 600;
	line-height: inherit;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.cs-shorts .cs-card__media:hover .cs-card__img,
.cs-shorts .cs-card__media:focus-visible .cs-card__img { transform: scale(1.04); }
.cs-shorts .cs-card__media:hover .cs-card__play { transform: scale(1.08); background: var(--cs-accent); }

/* Texte ------------------------------------------------------------------ */
.cs-shorts .cs-card__title {
	margin: 16px 0 0;
	font-family: var(--cs-sans);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.42;
	color: var(--cs-fg);
}
.cs-shorts .cs-card__title a {
	color: var(--cs-fg);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.84em;
}
.cs-shorts .cs-card__title a:hover { text-decoration: underline; text-underline-offset: 3px; }

.cs-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	color: var(--cs-muted);
	font-size: 13px;
}
.cs-card__views { display: inline-flex; align-items: center; gap: 7px; }

.cs-shorts .cs-card__share {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin: -8px -8px -8px 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--cs-accent);
	cursor: pointer;
	transition: background .2s ease;
}
.cs-shorts .cs-card__share:hover { background: rgba(127, 127, 127, .15); }

/* Navigation ------------------------------------------------------------- */
.cs-shorts__nav {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin-top: 36px;
}

.cs-shorts__dots { display: flex; gap: 8px; }
.cs-shorts .cs-shorts__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #5b5b5b;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.cs-shorts--light .cs-shorts__dot { background: #c9c9c9; }
.cs-shorts .cs-shorts__dot[aria-current="true"] { background: var(--cs-accent); transform: scale(1.15); }

.cs-shorts__arrows {
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	gap: 14px;
}
.cs-shorts .cs-shorts__arrow {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--cs-arrow-bg);
	color: var(--cs-fg);
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}
.cs-shorts .cs-shorts__arrow:hover:not(:disabled) { background: var(--cs-accent); color: #fff; }
.cs-shorts .cs-shorts__arrow:disabled { opacity: .35; cursor: default; }
.cs-shorts--no-scroll .cs-shorts__nav { display: none; }

.cs-shorts :focus-visible { outline: 2px solid var(--cs-accent); outline-offset: 3px; }

.cs-empty { padding: 16px; border: 1px dashed #999; font-size: 14px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
	.cs-shorts { --cs-per-view: 3; --cs-gap: 24px; }
}
@media (max-width: 767px) {
	.cs-shorts { --cs-per-view: 1.6; --cs-gap: 16px; }
	.cs-shorts__inner { padding: 28px 16px 28px; }
	.cs-shorts .cs-shorts__track { scroll-padding-left: 0; margin-right: -16px; padding-right: 16px; }
	.cs-shorts__head { align-items: center; }
	.cs-shorts .cs-shorts__title { font-size: 22px; }
	.cs-shorts .cs-shorts__more { font-size: 13px; gap: 4px; }
	.cs-shorts .cs-shorts__more svg { width: 16px; height: 16px; }
	.cs-shorts .cs-card__title { font-size: 15px; margin-top: 12px; }
	.cs-shorts__nav { justify-content: flex-start; margin-top: 24px; }
	.cs-shorts--carousel .cs-card + .cs-card::before { display: none; }
	.cs-shorts--grid .cs-shorts__track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
	.cs-shorts--grid .cs-card__caption { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cs-shorts .cs-shorts__track { scroll-behavior: auto; }
	.cs-shorts *, .cs-player * { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Lecteur plein écran
   ========================================================================== */
html.cs-player-open, html.cs-player-open body { overflow: hidden !important; }

.cs-player {
	--cs-accent: #2f8ce6;
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	color: #fff;
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}
.cs-player.is-open { display: block; }
.cs-player *, .cs-player *::before, .cs-player *::after { box-sizing: border-box; }

.cs-player__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 8, .94);
	backdrop-filter: blur(6px);
}

.cs-player__stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	padding: 24px 88px;
	touch-action: none;
}

.cs-player__frame {
	position: relative;
	height: min(92vh, 860px);
	height: min(92dvh, 860px);
	aspect-ratio: 9 / 16;
	max-width: 100%;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}

.cs-player__media { position: absolute; inset: 0; }
.cs-player__media video,
.cs-player__media iframe,
.cs-player__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
	background: #000;
}
.cs-player__media.is-in-up { animation: cs-in-up .35s cubic-bezier(.2, .7, .2, 1); }
.cs-player__media.is-in-down { animation: cs-in-down .35s cubic-bezier(.2, .7, .2, 1); }
@keyframes cs-in-up { from { transform: translateY(18%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cs-in-down { from { transform: translateY(-18%); opacity: 0; } to { transform: none; opacity: 1; } }

.cs-player__progress {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: rgba(255, 255, 255, .2);
	z-index: 3;
}
.cs-player__progress span {
	display: block;
	height: 100%;
	width: 0;
	background: #fff;
}
.cs-player__frame[data-type="youtube"] .cs-player__progress,
.cs-player__frame[data-type="vimeo"] .cs-player__progress { display: none; }

.cs-player__info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 72px 18px 18px;
	background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
	pointer-events: none;
}
.cs-player__frame[data-type="youtube"] .cs-player__info,
.cs-player__frame[data-type="vimeo"] .cs-player__info {
	position: static;
	display: none;
}
.cs-player__info > * { pointer-events: auto; }

.cs-player__count { margin: 0 0 6px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.cs-player__title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; color: #fff; }
.cs-player__views { margin: 6px 0 0; font-size: 13px; opacity: .75; }

.cs-player__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cs-player .cs-pbtn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 999px;
	background: rgba(255, 255, 255, .08);
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}
.cs-player .cs-pbtn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .5); color: #fff; }
.cs-player .cs-pbtn--accent { background: var(--cs-accent); border-color: var(--cs-accent); }

/* Panneau latéral (YouTube/Vimeo : infos à côté pour ne pas masquer le lecteur) */
.cs-player__side-info {
	display: none;
	width: 300px;
	align-self: flex-end;
	padding-bottom: 12px;
}
.cs-player.is-embed .cs-player__side-info { display: block; }

.cs-player__controls {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cs-player .cs-icon-btn {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	transition: background .2s ease, opacity .2s ease;
}
.cs-player .cs-icon-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .26); }
.cs-player .cs-icon-btn:disabled { opacity: .3; cursor: default; }

.cs-player__close { position: absolute; top: 20px; right: 20px; z-index: 5; }

.cs-player__mute {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 4;
	width: 40px !important;
	height: 40px !important;
	background: rgba(0, 0, 0, .45) !important;
}
.cs-player__frame[data-type="youtube"] .cs-player__mute,
.cs-player__frame[data-type="vimeo"] .cs-player__mute { display: none; }

.cs-player__tap {
	position: absolute;
	inset: 0;
	z-index: 1;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.cs-player__frame[data-type="youtube"] .cs-player__tap,
.cs-player__frame[data-type="vimeo"] .cs-player__tap { display: none; }

.cs-player__paused {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
	display: none;
	place-items: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	pointer-events: none;
}
.cs-player__frame.is-paused .cs-player__paused { display: grid; }
.cs-player__paused svg { width: 30px; height: 30px; margin-left: 4px; }

.cs-toast {
	position: fixed;
	left: 50%;
	bottom: 32px;
	z-index: 2147483001;
	transform: translate(-50%, 20px);
	padding: 10px 18px;
	border-radius: 999px;
	background: #111;
	color: #fff;
	font-size: 14px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.cs-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 767px) {
	.cs-player__stage { padding: 0; gap: 0; }
	.cs-player__frame { height: 100%; height: 100dvh; width: 100%; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
	.cs-player__controls { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 4; }
	.cs-player__controls .cs-icon-btn { width: 40px; height: 40px; background: rgba(0, 0, 0, .4); }
	.cs-player__close { top: 12px; right: auto; left: 12px; background: rgba(0, 0, 0, .45) !important; }
	.cs-player__info { padding: 80px 64px 28px 16px; }
	.cs-player.is-embed .cs-player__side-info { display: none; }
	.cs-player__frame[data-type="youtube"] .cs-player__info,
	.cs-player__frame[data-type="vimeo"] .cs-player__info { display: none; }
}

/* ==========================================================================
   Page d'un Short + archive
   ========================================================================== */
.capital-shorts-page .cs-single,
.capital-shorts-page .cs-archive { color: inherit; }

.cs-single__wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 40px 20px 56px;
	display: grid;
	grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.cs-inline-player {
	position: relative;
	aspect-ratio: 9 / 16;
	border-radius: 14px;
	overflow: hidden;
	background: #000;
}
.cs-inline-player video,
.cs-inline-player iframe,
.cs-inline-player img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

.cs-single__kicker { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.cs-single__kicker a { color: #2f8ce6; text-decoration: none; }
.cs-single__kicker span { margin: 0 6px; opacity: .5; }
.cs-single .cs-single__title { margin: 0 0 14px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
.cs-single__meta { margin: 0 0 22px; font-size: 14px; opacity: .65; }
.cs-single__meta span[aria-hidden] { margin: 0 6px; }
.cs-single__content { font-size: 17px; line-height: 1.65; }

.cs-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	padding: 12px 20px;
	background: #111;
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
}
.cs-btn:hover { background: #2f8ce6; }

.cs-single__share { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(127, 127, 127, .25); }
.cs-single__share a,
.cs-single__share button {
	padding: 8px 14px;
	border: 1px solid rgba(127, 127, 127, .35);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.cs-single__share a:hover,
.cs-single__share button:hover { border-color: #2f8ce6; color: #2f8ce6; }

.cs-archive__head { box-sizing: border-box; max-width: 1320px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 8px; }
.cs-archive .cs-archive__title { margin: 0 0 8px; font-family: "Playfair Display", Georgia, serif; font-size: clamp(30px, 4vw, 48px); line-height: 1.1; }
.cs-archive__desc { max-width: 640px; margin: 0; font-size: 17px; opacity: .7; }
.cs-archive__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.cs-archive__filters a { padding: 7px 14px; border: 1px solid rgba(127, 127, 127, .35); border-radius: 999px; color: inherit; font-size: 14px; font-weight: 600; text-decoration: none; }
.cs-archive__filters a.is-active,
.cs-archive__filters a:hover { background: #111; border-color: #111; color: #fff; }
.cs-archive .cs-shorts { background: transparent; }
.cs-archive .cs-shorts--dark { --cs-fg: inherit; --cs-muted: #777; }
.cs-archive .cs-pagination,
.cs-archive .navigation.pagination { box-sizing: border-box; max-width: 1320px; margin: 0 auto 56px; padding: 0 clamp(16px, 4vw, 48px); }

@media (max-width: 860px) {
	.cs-single__wrap { grid-template-columns: 1fr; gap: 28px; padding-top: 20px; }
	.cs-single__player { max-width: 420px; width: 100%; margin: 0 auto; }
}
