/* Import de la police Poppins */
@font-face {
	font-family: 'Poppins';
	src: local('Poppins'), url('font/Poppins.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* Import de la police CartoonFun pour les titres */
@font-face {
	font-family: 'CartoonFun';
	src: local('CartoonFun'), url('font/CartoonFun.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/* ========== STRUCTURE PRINCIPALE ========== */

/* Reset de base */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, p, li, ul, ol, .member, article, footer, #socials a {
	font-family: 'Poppins', sans-serif;
}
body { background: #111; color: #f0f0f0; line-height: 1.6; }

/* Titres : utiliser CartoonFun en priorité, Poppins en fallback, forcer avec !important */
h1, h2, h3, .overlay h1 {
	color: #ff2e63;
	text-align: center;
	margin-bottom: 1rem;
	font-family: 'CartoonFun', 'Poppins', 'Arial', sans-serif !important;
	font-weight: normal !important;
	font-style: normal !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

p, li { color: #ddd; }

section { padding: 60px 20px; max-width: 1000px; margin: auto; }

/* Overlay improvements */
.overlay { background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); }
.overlay h1 { font-size: clamp(1.8rem, 4vw, 3.4rem); letter-spacing: 0.5px; }

/* Download badges */
.download-list { display:flex; gap:20px; justify-content:center; align-items:center; list-style:none; padding:0; margin-top:10px; }
.download-list li img { max-width:150px; height:auto; display:block; transition: transform 0.22s ease, filter 0.22s ease; border-radius:8px; }
.download-list li a:hover img, .download-list li a:focus img { transform: translateY(-6px) scale(1.02); filter: drop-shadow(0 10px 25px rgba(0,0,0,0.6)); }
.download-badge { display:inline-block; padding:6px; border-radius:8px; }
.download-badge:focus { outline: 3px solid rgba(255,46,99,0.18); }

/* Chapter toggle (switch between Chapter 1 / Chapter 2) */
.chapter-toggle { display:flex; gap:8px; justify-content:center; align-items:center; margin: 12px auto; }
.chapter-btn {
	background: transparent;
	color: #f0f0f0;
	border: 1px solid rgba(255,46,99,0.12);
	padding: 8px 12px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 700;
	transition: background 0.18s, color 0.18s, transform 0.12s;
}
.chapter-btn:hover, .chapter-btn:focus { background: rgba(255,46,99,0.06); outline: none; transform: translateY(-2px); }
.chapter-btn.active {
	background: linear-gradient(90deg,#ff2e63,#e0204e);
	color: #fff;
	box-shadow: 0 8px 20px rgba(224,32,78,0.12);
}

@media (max-width: 420px) {
	.chapter-toggle { gap:6px; }
	.chapter-btn { padding: 6px 10px; font-size: 0.95rem; }
}

/* Center the download text in the download section */
#download p {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 6px;
}

/* Small illustration next to chapter toggle */
.chapter-illustration {
	width: 48px;
	height: 48px;
	object-fit: contain;
	margin-left: 10px;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
@media (max-width: 420px) {
	.chapter-illustration { width: 40px; height: 40px; margin-left: 6px; }
}

/* Utility to hide content visually and remove from layout */
.hidden { display: none !important; }

/* FAQ chapter toggle */
.faq-toggle { display:flex; gap:8px; justify-content:center; margin-top:10px; }
.faq-toggle .faq-btn {
	background: transparent;
	color: #f0f0f0;
	border: 1px solid rgba(255,46,99,0.10);
	padding: 6px 10px;
	border-radius: 999px;
	cursor: pointer;
	font-weight: 600;
}
.faq-toggle .faq-btn.active { background: linear-gradient(90deg,#ff2e63,#e0204e); color:#fff; }
@media (max-width: 420px) {
	.faq-toggle { gap:6px; }
	.faq-toggle .faq-btn { padding:6px 8px; font-size:0.95rem; }
}

/* Visual separation for FAQ sections */
#faq-chapters {
	background: linear-gradient(180deg, rgba(255,46,99,0.02), rgba(255,46,99,0.01));
	border: 1px solid rgba(255,46,99,0.06);
	padding: 18px;
	border-radius: 12px;
	margin-bottom: 16px;
}
#faq-global {
	background: #0f0f0f;
	border: 1px solid rgba(255,46,99,0.04);
	padding: 18px;
	border-radius: 12px;
	margin-top: 18px;
}
#faq-chapters details,
#faq-global details {
	background: #141414;
	padding: 12px 14px;
	border-radius: 8px;
	margin-bottom: 10px;
	border: 1px solid rgba(255,46,99,0.03);
}
#faq-chapters details summary,
#faq-global details summary {
	cursor: pointer;
	font-weight: 700;
	color: #fff;
	list-style: none;
}
#faq-chapters details p,
#faq-global details p {
	color: #d6d6d6;
	margin-top: 8px;
	line-height: 1.5;
}
#faq-chapters .faq-toggle { margin-bottom: 12px; }

#faq-chapters details summary:focus,
#faq-global details summary:focus {
	outline: 3px solid rgba(255,46,99,0.12);
	outline-offset: 4px;
	border-radius: 6px;
}

#faq-chapters details[open] summary,
#faq-global details[open] summary {
	color: #ff2e63;
}

@media (max-width: 768px) {
	#faq-chapters, #faq-global { padding: 14px; }
	#faq-chapters details, #faq-global details { padding: 10px; }
}

/* Animation for chapter illustration when switching chapters */
.chapter-illustration.anim {
  animation: chapterSlide 380ms cubic-bezier(.2,.9,.2,1);
}

@keyframes chapterSlide {
  0% { transform: translateY(8px) scale(0.98); opacity: 0; }
  60% { transform: translateY(-6px) scale(1.03); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .chapter-illustration.anim {
    animation: none;
  }
}

/* Focus styles */
.btn:focus, a:focus { outline: 3px solid rgba(255,46,99,0.12); outline-offset: 3px; }

/* ========== HERO ========== */
.hero { position: relative; height: 100vh; background: url('background.jpg') center/cover no-repeat; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; max-width: none; width: 100%; }
.overlay { background: rgba(0,0,0,0.6); padding: 40px; text-align: center; border-radius: 20px; position: relative; z-index: 2; }
.overlay h1 { font-size: 3rem; }
.overlay p { margin: 20px 0; font-size: 1.2rem; }
.btn { display: inline-block; background: #ff2e63; color: #fff; padding: 12px 25px; border-radius: 30px; text-decoration: none; transition: background 0.3s ease; }
.btn:hover { background: #e0204e; }

/* hero background video */
.hero-video{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
	object-fit: cover;
}

/* Séparateur stylé inversé verticalement */
.separator {
	width: 100%;
	height: 50px;
	background: #ff2e63;
	border-radius: 0 0 25px 25px;
}

/* ========== TEAM (CRÉDITS) ========== */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.member { background: #1a1a1a; padding: 32px 28px; border-radius: 10px; text-align: center; }
.member ul { margin: 18px 0 0 0; padding-left: 24px; text-align: left; }
.member li { margin-bottom: 7px; }

/* Actus */
article { background: #1a1a1a; padding: 20px; border-radius: 10px; margin: 15px 0; }

/* Socials */
#socials ul { display: flex; justify-content: center; gap: 20px; list-style: none; margin-top: 20px; }
#socials a { color: #ff2e63; text-decoration: none; font-weight: bold; transition: color 0.3s ease; }
#socials a:hover { color: #fff; }

/* Footer */
footer { text-align: center; padding: 20px; background: #000; font-size: 0.9rem; margin-top: 40px; }

/* style temporaire pour mettre en évidence la zone ciblée */
.highlight-temp{ box-shadow: 0 10px 30px rgba(255,46,99,0.08) inset, 0 0 0 4px rgba(255,46,99,0.06); transition: box-shadow 0.6s ease; }

/* Custom scrollbar - WebKit browsers */
::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}
::-webkit-scrollbar-track {
	background: #0d0d0d;
	border-radius: 10px;
}
::-webkit-scrollbar-thumb {
	background: linear-gradient(180deg, #ff2e63 0%, #e0204e 100%);
	border-radius: 10px;
	box-shadow: inset 0 0 0 2px rgba(255,255,255,0.03);
}
::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(180deg, #e0204e 0%, #c81b3a 100%);
}
::-webkit-scrollbar-corner { background: transparent; }

/* Custom scrollbar - Firefox */
html {
	scrollbar-width: thin;
	scrollbar-color: #ff2e63 #0d0d0d;
}

/* Header / Navigation */
:root { --header-height: 68px; }
html { scroll-padding-top: calc(var(--header-height) + 8px); }
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: var(--header-height);
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0.5));
	backdrop-filter: blur(6px);
	z-index: 9999;
	border-bottom: 1px solid rgba(255,46,99,0.06);
	padding: 0 20px;
}
.site-header .nav { display:flex; gap:16px; align-items:center; }
.site-header .nav a {
	color: #f0f0f0;
	text-decoration: none;
	padding: 8px 12px;
	border-radius: 8px;
	font-weight: 600;
	transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
	font-family: 'Poppins', sans-serif;
	position: relative;
	transition: background 0.18s, color 0.18s, transform 0.12s, border-bottom 0.18s;
	padding-bottom: 5px; /* Reserve space for border for stability */
	border-bottom: 3px solid transparent;
}
.site-header .nav a:hover,
.site-header .nav a:focus { background: rgba(255,46,99,0.08); color: #fff; transform: translateY(-2px); }
.site-header .nav a.active {
	background: linear-gradient(90deg,#ff2e63,#e0204e);
	color:#fff;
	box-shadow: 0 6px 18px rgba(224,32,78,0.14);
	font-weight: bold;
	border-bottom: 3px solid #ff2e63;
}

/* header container and social links */
.site-header .header-container { width:100%; max-width:1100px; display:flex; align-items:center; gap:20px; }
.nav-social { margin-left:auto; display:flex; gap:12px; align-items:center; }
.nav-social a { color:#f0f0f0; text-decoration:none; padding:6px 10px; border-radius:6px; font-weight:600; transition: background 0.15s ease, transform 0.12s ease; }
.nav-social a:hover, .nav-social a:focus { background: rgba(255,46,99,0.08); transform: translateY(-2px); }

/* push content down to account for fixed header on small viewports */
body { padding-top: calc(var(--header-height) + 4px); }

/* Responsive: mobile / petits écrans */
@media (max-width: 768px) {
	:root { --header-height: 56px; }
	.site-header { height: var(--header-height); padding: 0 12px; }
	body { padding-top: calc(var(--header-height) + 4px); }

	/* Make nav horizontally scrollable to keep links accessible */
	.site-header .nav { gap:10px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom:4px; }
	.site-header .nav a { padding: 6px 10px; font-size: 14px; }
	.site-header .nav a.active { box-shadow: none; }

	/* Social links compact */
	.nav-social { gap:8px; }
	.nav-social a { padding: 6px 8px; font-size:13px; }

	/* Hero reduced height and overlay padding */
	.hero { height: 60vh; }
	.overlay { padding: 20px; border-radius: 14px; }
	.overlay h1 { font-size: clamp(1.2rem, 6vw, 2.2rem); }
	.overlay p { font-size: 1rem; }
	.btn { padding: 10px 18px; }

	/* Hide background video on mobile to save bandwidth */
	.hero-video { display: none; }

	/* Sections padding reduced */
	section { padding: 36px 16px; }

	/* Download badges smaller */
	.download-list li img { max-width:110px; }

	/* Team: single column */
	.team-grid { grid-template-columns: 1fr; }

	/* News and articles: tighter spacing */
	article { margin: 12px 0; padding: 14px; }

	/* Footer smaller */
	footer { padding: 14px; font-size: 0.85rem; }
}

/* Extra small screens */
@media (max-width: 420px) {
	.site-header .nav a { font-size: 13px; padding: 6px 8px; }
	.overlay { padding: 16px; }
	.download-list { gap:12px; }
	.download-list li img { max-width:90px; }
}

/* ========== GALERIE ========== */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	justify-items: center;
	align-items: stretch;
	margin-top: 18px;
}
.gallery-grid img {
	width: 100%;
	max-width: 320px;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.13);
	object-fit: cover;
	background: #181818;
	transition: transform 0.18s, box-shadow 0.18s;
	cursor: pointer;
}
.gallery-grid img:hover {
	transform: scale(1.04) translateY(-4px);
	box-shadow: 0 8px 24px rgba(255,46,99,0.13);
	z-index: 2;
}
.gallery-grid img.enlarged {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) scale(1.2) !important;
	z-index: 10001 !important;
	max-width: 90vw !important;
	max-height: 80vh !important;
	box-shadow: 0 8px 40px 8px #000a, 0 0 0 4px #ff2e63cc;
	border-radius: 16px;
	background: #181818;
	transition: transform 0.22s, box-shadow 0.22s;
}
.gallery-lightbox-bg {
	position: fixed;
	inset: 0;
	background: rgba(15, 6, 24, 0.93);
	z-index: 10000;
	animation: fadeIn 0.18s;
}
.gallery-close-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 32px;
	right: 38px;
	z-index: 10002;
	width: 48px;
	height: 48px;
	background: #1a0a1a;
	color: #ff2e63;
	border: none;
	border-radius: 50%;
	font-size: 2.2rem;
	font-family: Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 2px 12px #000a;
	opacity: 0;
	pointer-events: none;
	transition: background 0.18s, color 0.18s, transform 0.13s, opacity 0.18s;
}
.gallery-close-btn.visible {
	opacity: 1;
	pointer-events: auto;
}
.gallery-close-btn:hover, .gallery-close-btn:focus {
	background: #ff2e63;
	color: #fff;
	transform: scale(1.08) rotate(8deg);
	outline: none;
}
@media (max-width: 600px) {
	.gallery-close-btn {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 1.7rem;
	}
}
#gallery-lightbox-prev, #gallery-lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10002;
	width: 48px;
	height: 48px;
	background: #1a0a1a;
	color: #ff2e63;
	border: none;
	border-radius: 50%;
	font-size: 2.2rem;
	font-family: Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 2px 12px #000a;
	opacity: 1;
	pointer-events: auto;
	transition: background 0.18s, color 0.18s, transform 0.13s, opacity 0.18s;
	display: flex;
	align-items: center;
	justify-content: center;
}
#gallery-lightbox-prev { left: 32px; }
#gallery-lightbox-next { right: 32px; }
#gallery-lightbox-prev:hover, #gallery-lightbox-prev:focus,
#gallery-lightbox-next:hover, #gallery-lightbox-next:focus {
	background: #ff2e63;
	color: #fff;
	outline: none;
	/* plus de transform pour éviter l'animation de descente/scale */
}
@media (max-width: 600px) {
	#gallery-lightbox-prev, #gallery-lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 1.7rem;
	}
	#gallery-lightbox-prev { left: 8px; }
	#gallery-lightbox-next { right: 8px; }
}
#gallery-lightbox-bg {
	position: fixed;
	inset: 0;
	background: rgba(15, 6, 24, 0.93);
	z-index: 10000;
	animation: fadeIn 0.18s;
}
#gallery-lightbox-img {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(1.2);
	z-index: 10001;
	max-width: 90vw;
	max-height: 80vh;
	box-shadow: 0 8px 40px 8px #000a, 0 0 0 4px #ff2e63cc;
	border-radius: 16px;
	background: #181818;
	transition: transform 0.22s, box-shadow 0.22s;
	display: block;
	opacity: 1;
}
#gallery-lightbox-close {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 32px;
	right: 38px;
	z-index: 10002;
	width: 48px;
	height: 48px;
	background: #1a0a1a;
	color: #ff2e63;
	border: none;
	border-radius: 50%;
	font-size: 2.2rem;
	font-family: Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 2px 12px #000a;
	opacity: 1;
	pointer-events: auto;
	transition: background 0.18s, color 0.18s, transform 0.13s, opacity 0.18s;
}
#gallery-lightbox-close:hover, #gallery-lightbox-close:focus {
	background: #ff2e63;
	color: #fff;
	transform: scale(1.08) rotate(8deg);
	outline: none;
}
@media (max-width: 600px) {
	#gallery-lightbox-close {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 1.7rem;
	}
}
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
	justify-items: center;
	align-items: stretch;
	margin-top: 18px;
}
.gallery-grid img {
	width: 100%;
	max-width: 320px;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.13);
	object-fit: cover;
	background: #181818;
	transition: transform 0.18s, box-shadow 0.18s;
	cursor: pointer;
}
.gallery-grid img:hover {
	transform: scale(1.04) translateY(-4px);
	box-shadow: 0 8px 24px rgba(255,46,99,0.13);
	z-index: 2;
}
.gallery-grid img.enlarged {
	position: fixed !important;
	top: 50% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) scale(1.2) !important;
	z-index: 10001 !important;
	max-width: 90vw !important;
	max-height: 80vh !important;
	box-shadow: 0 8px 40px 8px #000a, 0 0 0 4px #ff2e63cc;
	border-radius: 16px;
	background: #181818;
	transition: transform 0.22s, box-shadow 0.22s;
}
.gallery-lightbox-bg {
	position: fixed;
	inset: 0;
	background: rgba(15, 6, 24, 0.93);
	z-index: 10000;
	animation: fadeIn 0.18s;
}
.gallery-close-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	position: fixed;
	top: 32px;
	right: 38px;
	z-index: 10002;
	width: 48px;
	height: 48px;
	background: #1a0a1a;
	color: #ff2e63;
	border: none;
	border-radius: 50%;
	font-size: 2.2rem;
	font-family: Arial, sans-serif;
	cursor: pointer;
	box-shadow: 0 2px 12px #000a;
	opacity: 0;
	pointer-events: none;
	transition: background 0.18s, color 0.18s, transform 0.13s, opacity 0.18s;
}
.gallery-close-btn.visible {
	opacity: 1;
	pointer-events: auto;
}
.gallery-close-btn:hover, .gallery-close-btn:focus {
	background: #ff2e63;
	color: #fff;
	transform: scale(1.08) rotate(8deg);
	outline: none;
}
@media (max-width: 600px) {
	.gallery-close-btn {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 1.7rem;
	}
}
#back-to-top:hover, #back-to-top:focus {
	background: #ff2e63;
	color: #fff;
	transform: scale(1.08) rotate(-4deg);
	outline: none;
}
#back-to-top svg {
	filter: drop-shadow(0 0 8px #ff2e63aa);
	transition: filter 0.18s;
}
#back-to-top:hover svg, #back-to-top:focus svg {
	filter: drop-shadow(0 0 16px #ff2e63ff);
}
