@import url('https://fonts.bunny.net/css?family=arimo:400,500,600,700,800&display=swap');

:root {
	--bg-body: #f8fafc;
	--bg-card: #ffffff;
	--accent-yellow: #f3ff1d;
	--accent-yellow-dark: #d8e50b;
	--accent-yellow-glow: rgba(243, 255, 29, 0.4);
	--accent-yellow-subtle: rgba(243, 255, 29, 0.12);
	--text-primary: #0f172a;
	--text-secondary: #475569;
	--text-muted: #64748b;
	--border-light: #e2e8f0;
	--border-hover: #f3ff1d;
	--shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
	--shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
	--shadow-lg: 0 20px 30px -10px rgba(15, 23, 42, 0.08), 0 8px 12px -4px rgba(15, 23, 42, 0.03);
	--shadow-yellow: 0 8px 20px -3px rgba(243, 255, 29, 0.45);
	--radius-lg: 20px;
	--radius-md: 14px;
	--radius-full: 9999px;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: 'Arimo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background-color: var(--bg-body);
	background-image:
		radial-gradient(ellipse at 85% -10%, rgba(243, 255, 29, 0.35) 0%, transparent 55%),
		radial-gradient(ellipse at 15% 15%, rgba(243, 255, 29, 0.20) 0%, transparent 45%),
		radial-gradient(circle at 50% 100%, rgba(243, 255, 29, 0.12) 0%, transparent 40%);
	background-attachment: fixed;
	color: var(--text-primary);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* En-tête */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border-light);
	box-shadow: var(--shadow-sm);
	transition: all 0.3s ease;
}

.header-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.brand-wrapper {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--text-primary);
}

.brand-logo-img {
	height: 36px;
	width: auto;
	display: block;
	transition: transform 0.25s ease;
}

.brand-wrapper:hover .brand-logo-img {
	transform: scale(1.05);
}

.brand-divider {
	width: 1px;
	height: 28px;
	background: var(--border-light);
}

.brand-text {
	display: flex;
	flex-direction: column;
}

.brand-title {
	font-weight: 800;
	font-size: 14px;
	letter-spacing: -0.01em;
	color: var(--text-primary);
	line-height: 1.2;
}

.brand-subtitle {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.badge-counter {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #0f172a;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: var(--radius-full);
}

.badge-counter .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent-yellow);
	box-shadow: 0 0 8px var(--accent-yellow);
}

/* Hero Section */
.hero-section {
	max-width: 900px;
	margin: 45px auto 30px auto;
	padding: 0 24px;
	text-align: center;
}

.hero-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--accent-yellow);
	color: #0f172a;
	font-size: 13px;
	font-weight: 700;
	padding: 7px 18px;
	border-radius: var(--radius-full);
	box-shadow: 0 4px 12px rgba(243, 255, 29, 0.4);
	margin-bottom: 18px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: transform 0.2s ease;
}

.hero-pill:hover {
	transform: translateY(-2px);
}

.hero-title {
	font-size: clamp(32px, 5vw, 46px);
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--text-primary);
	line-height: 1.15;
	margin-bottom: 14px;
}

.hero-title .highlight {
	position: relative;
	display: inline-block;
	z-index: 1;
}

.hero-title .highlight::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 6px;
	width: 100%;
	height: 16px;
	background: var(--accent-yellow);
	z-index: -1;
	border-radius: 4px;
	opacity: 0.85;
	transform: rotate(-1deg);
}

.hero-description {
	font-size: 17px;
	color: var(--text-secondary);
	max-width: 660px;
	margin: 0 auto 24px auto;
	font-weight: 450;
}

/* Quick Nav Pills */
.quick-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: 30px;
}

.nav-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 16px;
	background: var(--bg-card);
	border: 1px solid var(--border-light);
	border-radius: var(--radius-full);
	color: var(--text-secondary);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	box-shadow: var(--shadow-sm);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
}

.nav-pill .pill-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--accent-yellow);
	color: #0f172a;
	font-size: 11px;
	font-weight: 800;
	border-radius: 50%;
}

.nav-pill:hover {
	border-color: var(--accent-yellow-dark);
	background: #ffffff;
	color: var(--text-primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-yellow);
}

/* Barre de changement de Mode d'Affichage */
.view-control-panel {
	max-width: 1120px;
	margin: 0 auto 36px auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.view-control-title {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 700;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.view-control-title .yellow-bar {
	width: 4px;
	height: 18px;
	background: var(--accent-yellow);
	border-radius: 2px;
	display: inline-block;
}

.view-switcher-group {
	display: inline-flex;
	align-items: center;
	background: #ffffff;
	padding: 5px;
	border-radius: var(--radius-full);
	border: 1px solid var(--border-light);
	box-shadow: var(--shadow-sm);
	gap: 4px;
	margin: 0 auto;
}

.view-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 1px solid transparent;
	background: transparent;
	color: var(--text-secondary);
	font-size: 13px;
	font-weight: 600;
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: inherit;
}

.view-btn svg {
	width: 17px;
	height: 17px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform 0.2s ease;
}

.view-btn:hover {
	color: var(--text-primary);
	background: #f8fafc;
}

.view-btn.active {
	background: var(--accent-yellow);
	color: #0f172a;
	font-weight: 800;
	box-shadow: var(--shadow-yellow);
	border-color: var(--accent-yellow-dark);
}

.view-btn.active svg {
	transform: scale(1.1);
}

/* Conteneur Principal */
.content-container {
	max-width: 1120px;
	margin: 0 auto 40px auto;
	padding: 0 24px;
	flex: 1 0 auto;
	width: 100%;
}

/* ========================================================
   MODE LISTE (Détaillé vertical)
   ======================================================== */
.cards-wrapper {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.video-card {
	background: var(--bg-card);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-light);
	box-shadow: var(--shadow-md);
	padding: 32px;
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
	position: relative;
	overflow: hidden;
}

.video-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 6px;
	height: 100%;
	background: var(--accent-yellow);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.video-card:hover {
	border-color: rgba(243, 255, 29, 0.9);
	box-shadow: var(--shadow-lg), 0 0 0 1px var(--accent-yellow);
	transform: translateY(-3px);
}

.video-card:hover::before {
	opacity: 1;
}

.card-header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 22px;
}

.card-meta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.card-module-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--accent-yellow);
	color: #0f172a;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: 0.05em;
	padding: 6px 14px;
	border-radius: var(--radius-full);
	box-shadow: 0 2px 8px rgba(243, 255, 29, 0.4);
	text-transform: uppercase;
}

.card-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	background: #f1f5f9;
	padding: 5px 12px;
	border-radius: var(--radius-full);
	border: 1px solid var(--border-light);
}

.card-title {
	font-size: clamp(20px, 3vw, 25px);
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.02em;
	line-height: 1.3;
}

.card-desc {
	font-size: 15px;
	color: var(--text-secondary);
	max-width: 820px;
	line-height: 1.55;
}

/* Player Frame */
.video-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #0f172a;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 2px solid var(--border-light);
	box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.08);
	transition: all 0.3s ease;
}

.video-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

.video-card:hover .video-wrapper {
	border-color: var(--accent-yellow);
	box-shadow: 0 12px 28px -4px rgba(243, 255, 29, 0.4);
}

.card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #f1f5f9;
}

.hint-text {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--text-muted);
}

.action-buttons {
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border-radius: var(--radius-full);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	font-family: inherit;
}

.btn-yt {
	background: #0f172a;
	color: #ffffff;
}

.btn-yt:hover {
	background: var(--accent-yellow);
	color: #0f172a;
	border-color: var(--accent-yellow-dark);
	box-shadow: 0 4px 14px rgba(243, 255, 29, 0.5);
	transform: translateY(-2px);
}

.btn-yt svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	transition: fill 0.2s;
}

.btn-secondary {
	background: #ffffff;
	color: var(--text-secondary);
	border: 1px solid var(--border-light);
}

.btn-secondary:hover {
	background: #f8fafc;
	color: var(--text-primary);
	border-color: #cbd5e1;
	transform: translateY(-1px);
}

/* ========================================================
   MODE GRILLE (2 colonnes)
   ======================================================== */
.content-container.mode-grid .cards-wrapper {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 28px;
}

.content-container.mode-grid .video-card {
	padding: 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	height: 100%;
}

.content-container.mode-grid .card-title {
	font-size: 19px;
	line-height: 1.35;
}

.content-container.mode-grid .card-desc {
	font-size: 14px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.content-container.mode-grid .card-footer {
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}

.content-container.mode-grid .action-buttons {
	width: 100%;
	justify-content: space-between;
}

.content-container.mode-grid .action-buttons .btn {
	flex: 1;
	justify-content: center;
	padding: 8px 12px;
	font-size: 12px;
}

/* ========================================================
   MODE FOCUS & PLAYLIST (Cinéma avec playlist interactive)
   ======================================================== */
.cinema-view {
	display: none;
}

.content-container.mode-focus .cards-wrapper {
	display: none;
}

.content-container.mode-focus .cinema-view {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 28px;
	align-items: start;
}

/* Scène principale du mode Focus */
.cinema-main {
	background: #ffffff;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: 26px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cinema-player-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #0f172a;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 3px solid var(--accent-yellow);
	box-shadow: var(--shadow-yellow), var(--shadow-lg);
}

.cinema-player-wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

.cinema-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cinema-title {
	font-size: 24px;
	font-weight: 800;
	color: var(--text-primary);
	letter-spacing: -0.02em;
}

.cinema-desc {
	font-size: 15px;
	color: var(--text-secondary);
	line-height: 1.6;
}

.cinema-nav-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 18px;
	border-top: 1px solid var(--border-light);
	flex-wrap: wrap;
	gap: 12px;
}

.nav-step-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: var(--radius-full);
	background: #f1f5f9;
	color: var(--text-primary);
	border: 1px solid var(--border-light);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.nav-step-btn:hover:not(:disabled) {
	background: var(--accent-yellow);
	border-color: var(--accent-yellow-dark);
	transform: translateY(-1px);
}

.nav-step-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Sidebar Playlist */
.cinema-playlist {
	background: #ffffff;
	border: 1px solid var(--border-light);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.playlist-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-light);
}

.playlist-title {
	font-size: 14px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.playlist-count {
	background: var(--accent-yellow);
	color: #0f172a;
	font-size: 11px;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: var(--radius-full);
}

.playlist-items {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.playlist-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border-light);
	background: #fafafa;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
	font-family: inherit;
	width: 100%;
}

.playlist-card:hover {
	background: #ffffff;
	border-color: var(--accent-yellow-dark);
	transform: translateX(3px);
	box-shadow: var(--shadow-sm);
}

.playlist-card.active {
	background: #ffffff;
	border: 2px solid var(--accent-yellow);
	box-shadow: 0 4px 14px rgba(243, 255, 29, 0.45);
}

.playlist-card-num {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #e2e8f0;
	color: var(--text-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 13px;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

.playlist-card.active .playlist-card-num {
	background: var(--accent-yellow);
	color: #0f172a;
}

.playlist-card-content {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	flex: 1;
}

.playlist-card-title {
	font-size: 13px;
	font-weight: 700;
	color: var(--text-primary);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.playlist-card-tag {
	font-size: 11px;
	color: var(--text-muted);
}

.playlist-playing-indicator {
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	color: #0f172a;
	background: var(--accent-yellow);
	padding: 2px 6px;
	border-radius: var(--radius-full);
	display: none;
	flex-shrink: 0;
}

.playlist-card.active .playlist-playing-indicator {
	display: inline-block;
}

/* Pied de page */
.site-footer {
	margin-top: auto;
	position: sticky;
	bottom: 0;
	z-index: 45;
	border-top: 1px solid var(--border-light);
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	padding: 16px 24px;
	text-align: center;
	box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.04);
}

.footer-content {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
}

.footer-brand {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	font-size: 15px;
	color: var(--text-primary);
}

.footer-copy {
	font-size: 13px;
	color: var(--text-muted);
}

.footer-copy a {
	color: var(--text-primary);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 2px solid var(--accent-yellow);
	padding: 1px 5px;
	border-radius: 4px;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	display: inline-block;
}

.footer-copy a:hover {
	background: var(--accent-yellow);
	color: #0f172a;
	border-bottom-color: var(--accent-yellow-dark);
	box-shadow: 0 2px 8px rgba(243, 255, 29, 0.4);
	transform: translateY(-1px);
}

/* Floating Back-To-Top */
.back-to-top {
	position: fixed;
	bottom: 74px;
	right: 28px;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #0f172a;
	color: var(--accent-yellow);
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
	opacity: 0;
	visibility: hidden;
	transition: all 0.25s ease;
	z-index: 40;
	border: 2px solid transparent;
}

.back-to-top.visible {
	opacity: 1;
	visibility: visible;
}

.back-to-top:hover {
	background: var(--accent-yellow);
	color: #0f172a;
	border-color: #0f172a;
	transform: translateY(-4px);
	box-shadow: var(--shadow-yellow);
}

/* Responsive adjustments */
@media (max-width: 992px) {
	.content-container.mode-grid .cards-wrapper {
		grid-template-columns: 1fr;
	}
	.content-container.mode-focus .cinema-view {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.video-card {
		padding: 20px;
	}
	.header-container {
		padding: 12px 18px;
	}
	.hero-section {
		margin: 32px auto 20px auto;
	}
	.view-control-panel {
		flex-direction: column;
		align-items: stretch;
	}
	.view-switcher-group {
		width: 100%;
		justify-content: space-between;
	}
	.view-btn {
		flex: 1;
		justify-content: center;
		padding: 8px 10px;
		font-size: 12px;
	}
	.view-btn span {
		display: none;
	}
	.view-btn.active span {
		display: inline;
	}
	.card-footer {
		flex-direction: column;
		align-items: flex-start;
	}
	.action-buttons {
		width: 100%;
		justify-content: flex-start;
	}
}
