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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>CineStream - Streaming Gratuit</title>
|
| 7 |
+
|
| 8 |
+
<!-- Importation d'une police moderne -->
|
| 9 |
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap" rel="stylesheet">
|
| 10 |
+
|
| 11 |
+
<!-- Importation des icônes (Phosphor Icons via CDN) -->
|
| 12 |
+
<script src="https://unpkg.com/@phosphor-icons/web"></script>
|
| 13 |
+
|
| 14 |
+
<style>
|
| 15 |
+
/* --- VARIABLES CSS & RESET --- */
|
| 16 |
+
:root {
|
| 17 |
+
--primary-color: #e50914; /* Rouge style Netflix */
|
| 18 |
+
--background-dark: #141414;
|
| 19 |
+
--background-light: #1f1f1f;
|
| 20 |
+
--text-white: #ffffff;
|
| 21 |
+
--text-gray: #b3b3b3;
|
| 22 |
+
--transition-speed: 0.3s;
|
| 23 |
+
--header-height: 70px;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
* {
|
| 27 |
+
margin: 0;
|
| 28 |
+
padding: 0;
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
body {
|
| 33 |
+
font-family: 'Inter', sans-serif;
|
| 34 |
+
background-color: var(--background-dark);
|
| 35 |
+
color: var(--text-white);
|
| 36 |
+
overflow-x: hidden;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
a { text-decoration: none; color: inherit; }
|
| 40 |
+
ul { list-style: none; }
|
| 41 |
+
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
|
| 42 |
+
|
| 43 |
+
/* --- HEADER --- */
|
| 44 |
+
header {
|
| 45 |
+
position: fixed;
|
| 46 |
+
top: 0;
|
| 47 |
+
width: 100%;
|
| 48 |
+
height: var(--header-height);
|
| 49 |
+
display: flex;
|
| 50 |
+
justify-content: space-between;
|
| 51 |
+
align-items: center;
|
| 52 |
+
padding: 0 4%;
|
| 53 |
+
background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
|
| 54 |
+
z-index: 1000;
|
| 55 |
+
transition: background-color var(--transition-speed);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
header.scrolled {
|
| 59 |
+
background-color: var(--background-dark);
|
| 60 |
+
box-shadow: 0 2px 10px rgba(0,0,0,0.5);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.logo {
|
| 64 |
+
font-size: 1.8rem;
|
| 65 |
+
font-weight: 800;
|
| 66 |
+
color: var(--primary-color);
|
| 67 |
+
text-transform: uppercase;
|
| 68 |
+
letter-spacing: 1px;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.nav-links {
|
| 72 |
+
display: flex;
|
| 73 |
+
gap: 20px;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.nav-links li a {
|
| 77 |
+
color: var(--text-white);
|
| 78 |
+
font-size: 0.9rem;
|
| 79 |
+
transition: color var(--transition-speed);
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.nav-links li a:hover {
|
| 83 |
+
color: var(--text-gray);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.right-section {
|
| 87 |
+
display: flex;
|
| 88 |
+
align-items: center;
|
| 89 |
+
gap: 15px;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
/* Barre de recherche */
|
| 93 |
+
.search-box {
|
| 94 |
+
background: rgba(0,0,0,0.75);
|
| 95 |
+
border: 1px solid var(--text-white);
|
| 96 |
+
display: flex;
|
| 97 |
+
align-items: center;
|
| 98 |
+
padding: 5px 10px;
|
| 99 |
+
border-radius: 4px;
|
| 100 |
+
transition: width 0.3s;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.search-box input {
|
| 104 |
+
background: transparent;
|
| 105 |
+
border: none;
|
| 106 |
+
color: white;
|
| 107 |
+
padding: 5px;
|
| 108 |
+
width: 0; /* Caché par défaut */
|
| 109 |
+
opacity: 0;
|
| 110 |
+
transition: all 0.3s ease;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
.search-box.active input {
|
| 114 |
+
width: 200px;
|
| 115 |
+
opacity: 1;
|
| 116 |
+
padding-left: 10px;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.search-box i {
|
| 120 |
+
font-size: 1.2rem;
|
| 121 |
+
cursor: pointer;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.user-avatar {
|
| 125 |
+
width: 32px;
|
| 126 |
+
height: 32px;
|
| 127 |
+
border-radius: 4px;
|
| 128 |
+
background-color: #333;
|
| 129 |
+
background-image: url('https://picsum.photos/seed/user/200/200');
|
| 130 |
+
background-size: cover;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
/* --- HERO SECTION --- */
|
| 134 |
+
.hero {
|
| 135 |
+
position: relative;
|
| 136 |
+
height: 80vh;
|
| 137 |
+
width: 100%;
|
| 138 |
+
background-size: cover;
|
| 139 |
+
background-position: center;
|
| 140 |
+
display: flex;
|
| 141 |
+
align-items: center;
|
| 142 |
+
padding-left: 4%;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.hero::after {
|
| 146 |
+
content: '';
|
| 147 |
+
position: absolute;
|
| 148 |
+
top: 0; left: 0; width: 100%; height: 100%;
|
| 149 |
+
background: linear-gradient(to top, var(--background-dark) 0%, transparent 60%, rgba(0,0,0,0.4) 100%);
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
.hero-content {
|
| 153 |
+
position: relative;
|
| 154 |
+
z-index: 10;
|
| 155 |
+
max-width: 500px;
|
| 156 |
+
margin-top: 50px;
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
.hero-title {
|
| 160 |
+
font-size: 3.5rem;
|
| 161 |
+
font-weight: 800;
|
| 162 |
+
margin-bottom: 15px;
|
| 163 |
+
line-height: 1.1;
|
| 164 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.hero-desc {
|
| 168 |
+
font-size: 1.1rem;
|
| 169 |
+
margin-bottom: 25px;
|
| 170 |
+
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.hero-buttons {
|
| 174 |
+
display: flex;
|
| 175 |
+
gap: 15px;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.btn {
|
| 179 |
+
padding: 10px 24px;
|
| 180 |
+
border-radius: 4px;
|
| 181 |
+
font-weight: 600;
|
| 182 |
+
font-size: 1rem;
|
| 183 |
+
display: flex;
|
| 184 |
+
align-items: center;
|
| 185 |
+
gap: 8px;
|
| 186 |
+
transition: transform 0.2s, background-color 0.2s;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.btn:hover {
|
| 190 |
+
transform: scale(1.05);
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.btn-play {
|
| 194 |
+
background-color: var(--text-white);
|
| 195 |
+
color: black;
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
.btn-info {
|
| 199 |
+
background-color: rgba(109, 109, 110, 0.7);
|
| 200 |
+
color: var(--text-white);
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
/* --- MAIN CONTENT --- */
|
| 204 |
+
main {
|
| 205 |
+
padding: 20px 4%;
|
| 206 |
+
position: relative;
|
| 207 |
+
z-index: 20;
|
| 208 |
+
margin-top: -50px; /* Chevauchement sur le hero */
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
.category-section {
|
| 212 |
+
margin-bottom: 40px;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
.category-title {
|
| 216 |
+
font-size: 1.2rem;
|
| 217 |
+
font-weight: 600;
|
| 218 |
+
margin-bottom: 15px;
|
| 219 |
+
color: #e5e5e5;
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
/* Carrousel horizontal */
|
| 223 |
+
.movies-row {
|
| 224 |
+
display: flex;
|
| 225 |
+
gap: 10px;
|
| 226 |
+
overflow-x: auto;
|
| 227 |
+
padding-bottom: 20px;
|
| 228 |
+
scroll-behavior: smooth;
|
| 229 |
+
}
|
| 230 |
+
|
| 231 |
+
.movies-row::-webkit-scrollbar {
|
| 232 |
+
height: 8px;
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
.movies-row::-webkit-scrollbar-track {
|
| 236 |
+
background: transparent;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
.movies-row::-webkit-scrollbar-thumb {
|
| 240 |
+
background: #333;
|
| 241 |
+
border-radius: 4px;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
.movies-row::-webkit-scrollbar-thumb:hover {
|
| 245 |
+
background: #555;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
.movie-card {
|
| 249 |
+
min-width: 200px;
|
| 250 |
+
height: 300px;
|
| 251 |
+
border-radius: 4px;
|
| 252 |
+
overflow: hidden;
|
| 253 |
+
position: relative;
|
| 254 |
+
cursor: pointer;
|
| 255 |
+
transition: transform 0.3s ease, z-index 0.3s;
|
| 256 |
+
background-color: #222;
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
.movie-card:hover {
|
| 260 |
+
transform: scale(1.1);
|
| 261 |
+
z-index: 100;
|
| 262 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.5);
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
.movie-card img {
|
| 266 |
+
width: 100%;
|
| 267 |
+
height: 100%;
|
| 268 |
+
object-fit: cover;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
.card-info {
|
| 272 |
+
position: absolute;
|
| 273 |
+
bottom: 0;
|
| 274 |
+
left: 0;
|
| 275 |
+
width: 100%;
|
| 276 |
+
padding: 10px;
|
| 277 |
+
background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
|
| 278 |
+
opacity: 0;
|
| 279 |
+
transition: opacity 0.3s;
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
.movie-card:hover .card-info {
|
| 283 |
+
opacity: 1;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.card-title {
|
| 287 |
+
font-size: 0.9rem;
|
| 288 |
+
font-weight: 600;
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
.card-meta {
|
| 292 |
+
font-size: 0.7rem;
|
| 293 |
+
color: #46d369; /* Vert pour le score */
|
| 294 |
+
margin-top: 5px;
|
| 295 |
+
display: flex;
|
| 296 |
+
align-items: center;
|
| 297 |
+
gap: 5px;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
/* --- FOOTER --- */
|
| 301 |
+
footer {
|
| 302 |
+
margin-top: 50px;
|
| 303 |
+
padding: 50px 4%;
|
| 304 |
+
color: var(--text-gray);
|
| 305 |
+
font-size: 0.8rem;
|
| 306 |
+
text-align: center;
|
| 307 |
+
border-top: 1px solid #333;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.anycoder-link {
|
| 311 |
+
color: var(--primary-color);
|
| 312 |
+
font-weight: bold;
|
| 313 |
+
margin-top: 10px;
|
| 314 |
+
display: inline-block;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
/* --- MODAL (PLAYER & DETAILS) --- */
|
| 318 |
+
.modal-overlay {
|
| 319 |
+
position: fixed;
|
| 320 |
+
top: 0; left: 0; width: 100%; height: 100%;
|
| 321 |
+
background: rgba(0,0,0,0.8);
|
| 322 |
+
display: flex;
|
| 323 |
+
justify-content: center;
|
| 324 |
+
align-items: center;
|
| 325 |
+
z-index: 2000;
|
| 326 |
+
opacity: 0;
|
| 327 |
+
pointer-events: none;
|
| 328 |
+
transition: opacity 0.3s;
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
.modal-overlay.active {
|
| 332 |
+
opacity: 1;
|
| 333 |
+
pointer-events: all;
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
.modal-content {
|
| 337 |
+
background: #181818;
|
| 338 |
+
width: 90%;
|
| 339 |
+
max-width: 800px;
|
| 340 |
+
border-radius: 8px;
|
| 341 |
+
overflow: hidden;
|
| 342 |
+
position: relative;
|
| 343 |
+
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
|
| 344 |
+
transform: translateY(50px);
|
| 345 |
+
transition: transform 0.3s;
|
| 346 |
+
}
|
| 347 |
+
|
| 348 |
+
.modal-overlay.active .modal-content {
|
| 349 |
+
transform: translateY(0);
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
.close-modal {
|
| 353 |
+
position: absolute;
|
| 354 |
+
top: 15px;
|
| 355 |
+
right: 15px;
|
| 356 |
+
background: rgba(0,0,0,0.5);
|
| 357 |
+
color: white;
|
| 358 |
+
border-radius: 50%;
|
| 359 |
+
width: 35px;
|
| 360 |
+
height: 35px;
|
| 361 |
+
display: flex;
|
| 362 |
+
justify-content: center;
|
| 363 |
+
align-items: center;
|
| 364 |
+
cursor: pointer;
|
| 365 |
+
z-index: 10;
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
.video-placeholder {
|
| 369 |
+
width: 100%;
|
| 370 |
+
aspect-ratio: 16/9;
|
| 371 |
+
background: black;
|
| 372 |
+
display: flex;
|
| 373 |
+
justify-content: center;
|
| 374 |
+
align-items: center;
|
| 375 |
+
position: relative;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
.play-btn-large {
|
| 379 |
+
font-size: 4rem;
|
| 380 |
+
color: var(--primary-color);
|
| 381 |
+
opacity: 0.8;
|
| 382 |
+
cursor: pointer;
|
| 383 |
+
transition: transform 0.2s;
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
.play-btn-large:hover {
|
| 387 |
+
transform: scale(1.1);
|
| 388 |
+
opacity: 1;
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
.modal-details {
|
| 392 |
+
padding: 20px;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
.modal-title {
|
| 396 |
+
font-size: 1.5rem;
|
| 397 |
+
margin-bottom: 10px;
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
.modal-meta {
|
| 401 |
+
display: flex;
|
| 402 |
+
gap: 15px;
|
| 403 |
+
color: var(--text-gray);
|
| 404 |
+
font-size: 0.9rem;
|
| 405 |
+
margin-bottom: 15px;
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
.match-score { color: #46d369; font-weight: bold; }
|
| 409 |
+
|
| 410 |
+
.modal-desc {
|
| 411 |
+
line-height: 1.5;
|
| 412 |
+
color: #fff;
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
/* --- RESPONSIVE --- */
|
| 416 |
+
@media (max-width: 768px) {
|
| 417 |
+
.hero-title { font-size: 2rem; }
|
| 418 |
+
.nav-links { display: none; } /* Menu caché sur mobile pour simplifier */
|
| 419 |
+
.search-box.active input { width: 150px; }
|
| 420 |
+
}
|
| 421 |
+
</style>
|
| 422 |
+
</head>
|
| 423 |
+
<body>
|
| 424 |
+
|
| 425 |
+
<!-- Header -->
|
| 426 |
+
<header id="main-header">
|
| 427 |
+
<div class="logo">CineStream</div>
|
| 428 |
+
<ul class="nav-links">
|
| 429 |
+
<li><a href="#" class="active">Accueil</a></li>
|
| 430 |
+
<li><a href="#">Séries</a></li>
|
| 431 |
+
<li><a href="#">Films</a></li>
|
| 432 |
+
<li><a href="#">Nouveautés</a></li>
|
| 433 |
+
<li><a href="#">Ma liste</a></li>
|
| 434 |
+
</ul>
|
| 435 |
+
<div class="right-section">
|
| 436 |
+
<div class="search-box" id="search-box">
|
| 437 |
+
<i class="ph ph-magnifying-glass" id="search-icon"></i>
|
| 438 |
+
<input type="text" id="search-input" placeholder="Titres, personnages, genres...">
|
| 439 |
+
</div>
|
| 440 |
+
<div class="user-avatar"></div>
|
| 441 |
+
</div>
|
| 442 |
+
</header>
|
| 443 |
+
|
| 444 |
+
<!-- Hero Section -->
|
| 445 |
+
<section class="hero" id="hero-section">
|
| 446 |
+
<div class="hero-content">
|
| 447 |
+
<h1 class="hero-title" id="hero-title">Chargement...</h1>
|
| 448 |
+
<p class="hero-desc" id="hero-desc">...</p>
|
| 449 |
+
<div class="hero-buttons">
|
| 450 |
+
<button class="btn btn-play" onclick="playHeroMovie()">
|
| 451 |
+
<i class="ph ph-play-fill"></i> Lecture
|
| 452 |
+
</button>
|
| 453 |
+
<button class="btn btn-info" onclick="showHeroDetails()">
|
| 454 |
+
<i class="ph ph-info"></i> Plus d'infos
|
| 455 |
+
</button>
|
| 456 |
+
</div>
|
| 457 |
+
</div>
|
| 458 |
+
</section>
|
| 459 |
+
|
| 460 |
+
<!-- Main Content -->
|
| 461 |
+
<main id="main-content">
|
| 462 |
+
<!-- Les catégories seront injectées ici par JS -->
|
| 463 |
+
</main>
|
| 464 |
+
|
| 465 |
+
<!-- Modal Player -->
|
| 466 |
+
<div class="modal-overlay" id="movie-modal">
|
| 467 |
+
<div class="modal-content">
|
| 468 |
+
<div class="close-modal" onclick="closeModal()">
|
| 469 |
+
<i class="ph ph-x"></i>
|
| 470 |
+
</div>
|
| 471 |
+
|
| 472 |
+
<div class="video-placeholder" id="modal-video-area">
|
| 473 |
+
<!-- Simulation du lecteur -->
|
| 474 |
+
<img src="" id="modal-bg-img" style="position:absolute; width:100%; height:100%; object-fit:cover; opacity:0.3;">
|
| 475 |
+
<i class="ph ph-play-circle play-btn-large" onclick="startFakePlayback()"></i>
|
| 476 |
+
<div id="video-status" style="position:absolute; bottom:20px; color:white; display:none;">Chargement du flux...</div>
|
| 477 |
+
</div>
|
| 478 |
+
|
| 479 |
+
<div class="modal-details">
|
| 480 |
+
<h2 class="modal-title" id="modal-title">Titre du film</h2>
|
| 481 |
+
<div class="modal-meta">
|
| 482 |
+
<span class="match-score">98% pour vous</span>
|
| 483 |
+
<span id="modal-year">2023</span>
|
| 484 |
+
<span style="border:1px solid #666; padding:0 4px; font-size:0.7rem;">HD</span>
|
| 485 |
+
</div>
|
| 486 |
+
<p class="modal-desc" id="modal-desc">Description du film...</p>
|
| 487 |
+
</div>
|
| 488 |
+
</div>
|
| 489 |
+
</div>
|
| 490 |
+
|
| 491 |
+
<!-- Footer -->
|
| 492 |
+
<footer>
|
| 493 |
+
<p>© 2023 CineStream. Tous droits réservés. Ceci est une démo technique.</p>
|
| 494 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
|
| 495 |
+
Built with anycoder
|
| 496 |
+
</a>
|
| 497 |
+
</footer>
|
| 498 |
+
|
| 499 |
+
<script>
|
| 500 |
+
// --- DONNÉES SIMULÉES (Base de données locale) ---
|
| 501 |
+
// J'utilise des images de placeholder avec du texte pour garantir qu'elles fonctionnent toujours.
|
| 502 |
+
const database = [
|
| 503 |
+
{
|
| 504 |
+
id: 1,
|
| 505 |
+
title: "Naruto Shippuden",
|
| 506 |
+
category: "Anime",
|
| 507 |
+
year: 2007,
|
| 508 |
+
rating: "4.8",
|
| 509 |
+
desc: "Naruto Uzumaki veut devenir le meilleur Hokage de tous les temps. Un anime d'action et d'aventure épique.",
|
| 510 |
+
image: "https://placehold.co/300x450/FF4500/white?text=Naruto",
|
| 511 |
+
hero: true
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
id: 2,
|
| 515 |
+
title: "One Piece",
|
| 516 |
+
category: "Anime",
|
| 517 |
+
year: 1999,
|
| 518 |
+
rating: "4.9",
|
| 519 |
+
desc: "Luffy et son équipage naviguent sur la Grand Line à la recherche du légendaire trésor One Piece.",
|
| 520 |
+
image: "https://placehold.co/300x450/1e90ff/white?text=One+Piece",
|
| 521 |
+
hero: false
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
id: 3,
|
| 525 |
+
title: "Stranger Things",
|
| 526 |
+
category: "Séries TV",
|
| 527 |
+
year: 2016,
|
| 528 |
+
rating: "4.7",
|
| 529 |
+
desc: "Quand un jeune garçon disparaît, une petite ville découvre une affaire mystérieuse, des expériences secrètes et des forces surnaturelles.",
|
| 530 |
+
image: "https://placehold.co/300x450/8b0000/white?text=Stranger+Things",
|
| 531 |
+
hero: false
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
id: 4,
|
| 535 |
+
title: "Spider-Man: No Way Home",
|
| 536 |
+
category: "Films",
|
| 537 |
+
year: 2021,
|
| 538 |
+
rating: "4.8",
|
| 539 |
+
desc: "Avec l'identité de Spider-Man désormais révélée, Peter Parker demande de l'aide au Docteur Strange.",
|
| 540 |
+
image: "https://placehold.co/300x450/daa520/white?text=Spiderman",
|
| 541 |
+
hero: false
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
id: 5,
|
| 545 |
+
title: "Attack on Titan",
|
| 546 |
+
category: "Anime",
|
| 547 |
+
year: 2013,
|
| 548 |
+
rating: "4.9",
|
| 549 |
+
desc: "L'humanité vit à l'intérieur de villes entourées de murs géants qui les protègent des Titans mangeurs d'hommes.",
|
| 550 |
+
image: "https://placehold.co/300x450/708090/white?text=AOT",
|
| 551 |
+
hero: false
|
| 552 |
+
},
|
| 553 |
+
{
|
| 554 |
+
id: 6,
|
| 555 |
+
title: "Breaking Bad",
|
| 556 |
+
category: "Séries TV",
|
| 557 |
+
year: 2008,
|
| 558 |
+
rating: "5.0",
|
| 559 |
+
desc: "Un professeur de chimie de lycée atteint d'un cancer se tourne vers la fabrication de méthamphétamine.",
|
| 560 |
+
image: "https://placehold.co/300x450/228b22/white?text=Breaking+Bad",
|
| 561 |
+
hero: false
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
id: 7,
|
| 565 |
+
title: "The Witcher",
|
| 566 |
+
category: "Séries TV",
|
| 567 |
+
year: 2019,
|
| 568 |
+
rating: "4.5",
|
| 569 |
+
desc: "Le sorceleur Geralt, un chasseur de monstres mutant, se bat pour trouver sa place dans un monde.",
|
| 570 |
+
image: "https://placehold.co/300x450/556b2f/white?text=The+Witcher",
|
| 571 |
+
hero: false
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
id: 8,
|
| 575 |
+
title: "Demon Slayer",
|
| 576 |
+
category: "Anime",
|
| 577 |
+
year: 2019,
|
| 578 |
+
rating: "4.8",
|
| 579 |
+
desc: "Tanjiro Kamado devient un chasseur de démons après que sa famille a été massacrée.",
|
| 580 |
+
image: "https://placehold.co/300x450/800080/white?text=Demon+Slayer",
|
| 581 |
+
hero: false
|
| 582 |
+
},
|
| 583 |
+
{
|
| 584 |
+
id: 9,
|
| 585 |
+
title: "Inception",
|
| 586 |
+
category: "Films",
|
| 587 |
+
year: 2010,
|
| 588 |
+
rating: "4.9",
|
| 589 |
+
desc: "Un voleur qui vole les secrets d'entreprise grâce à l'utilisation de la technologie de partage de rêves.",
|
| 590 |
+
image: "https://placehold.co/300x450/000000/white?text=Inception",
|
| 591 |
+
hero: false
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
id: 10,
|
| 595 |
+
title: "Arcane",
|
| 596 |
+
category: "Séries TV",
|
| 597 |
+
year: 2021,
|
| 598 |
+
rating: "4.9",
|
| 599 |
+
desc: "Sœurs jumelles Vi et Jinx se retrouvent dans les deux côtés opposés d'une guerre entre technologies magiques.",
|
| 600 |
+
image: "https://placehold.co/300x450/00ced1/white?text=Arcane",
|
| 601 |
+
hero: false
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
id: 11,
|
| 605 |
+
title: "Jujutsu Kaisen",
|
| 606 |
+
category: "Anime",
|
| 607 |
+
year: 2020,
|
| 608 |
+
rating: "4.7",
|
| 609 |
+
desc: "Yuji Itadori rejoint une organisation secrète de Sorciers pour tuer un Puissant Sorcier nommé Ryomen Sukuna.",
|
| 610 |
+
image: "https://placehold.co/300x450/9932cc/white?text=JJK",
|
| 611 |
+
hero: false
|
| 612 |
+
},
|
| 613 |
+
{
|
| 614 |
+
id: 12,
|
| 615 |
+
title: "Avatar 2",
|
| 616 |
+
category: "Films",
|
| 617 |
+
year: 2022,
|
| 618 |
+
rating: "4.6",
|
| 619 |
+
desc: "Jake Sully vit avec sa nouvelle famille sur la planète Pandora. Une menace familière revient pour finir ce qu'il a commencé.",
|
| 620 |
+
image: "https://placehold.co/300x450/4682b4/white?text=Avatar+2",
|
| 621 |
+
hero: false
|
| 622 |
+
}
|
| 623 |
+
];
|
| 624 |
+
|
| 625 |
+
// --- DOM ELEMENTS ---
|
| 626 |
+
const heroSection = document.getElementById('hero-section');
|
| 627 |
+
const heroTitle = document.getElementById('hero-title');
|
| 628 |
+
const heroDesc = document.getElementById('hero-desc');
|
| 629 |
+
const mainContent = document.getElementById('main-content');
|
| 630 |
+
const searchInput = document.getElementById('search-input');
|
| 631 |
+
const searchBox = document.getElementById('search-box');
|
| 632 |
+
const searchIcon = document.getElementById('search-icon');
|
| 633 |
+
const header = document.getElementById('main-header');
|
| 634 |
+
|
| 635 |
+
// Modal elements
|
| 636 |
+
const modal = document.getElementById('movie-modal');
|
| 637 |
+
const modalTitle = document.getElementById('modal-title');
|
| 638 |
+
const modalDesc = document.getElementById('modal-desc');
|
| 639 |
+
const modalYear = document.getElementById('modal-year');
|
| 640 |
+
const modalBgImg = document.getElementById('modal-bg-img');
|
| 641 |
+
const videoStatus = document.getElementById('video-status');
|
| 642 |
+
|
| 643 |
+
// --- INITIALISATION ---
|
| 644 |
+
|
| 645 |
+
// 1. Configurer le Hero (Film mis en avant)
|
| 646 |
+
function initHero() {
|
| 647 |
+
const heroMovie = database.find(m => m.hero) || database[0];
|
| 648 |
+
// On utilise l'image du film mais en mode sombre pour le fond
|
| 649 |
+
heroSection.style.backgroundImage = `url('https://placehold.co/1920x1080/222/white?text=${encodeURIComponent(heroMovie.title)}')`;
|
| 650 |
+
heroTitle.innerText = heroMovie.title;
|
| 651 |
+
heroDesc.innerText = heroMovie.desc;
|
| 652 |
+
|
| 653 |
+
// Stocker l'ID du hero pour les boutons
|
| 654 |
+
heroSection.dataset.id = heroMovie.id;
|
| 655 |
+
}
|
| 656 |
+
|
| 657 |
+
// 2. Afficher les catégories
|
| 658 |
+
function initCategories() {
|
| 659 |
+
// Extraire les catégories uniques
|
| 660 |
+
const categories = [...new Set(database.map(item => item.category))];
|
| 661 |
+
|
| 662 |
+
mainContent.innerHTML = ''; // Reset
|
| 663 |
+
|
| 664 |
+
categories.forEach(cat => {
|
| 665 |
+
const section = document.createElement('div');
|
| 666 |
+
section.className = 'category-section';
|
| 667 |
+
|
| 668 |
+
const title = document.createElement('h3');
|
| 669 |
+
title.className = 'category-title';
|
| 670 |
+
title.innerText = cat;
|
| 671 |
+
|
| 672 |
+
const row = document.createElement('div');
|
| 673 |
+
row.className = 'movies-row';
|
| 674 |
+
|
| 675 |
+
// Filtrer les films de cette catégorie
|
| 676 |
+
const movies = database.filter(m => m.category === cat);
|
| 677 |
+
|
| 678 |
+
movies.forEach(movie => {
|
| 679 |
+
const card = createMovieCard(movie);
|
| 680 |
+
row.appendChild(card);
|
| 681 |
+
});
|
| 682 |
+
|
| 683 |
+
section.appendChild(title);
|
| 684 |
+
section.appendChild(row);
|
| 685 |
+
mainContent.appendChild(section);
|
| 686 |
+
});
|
| 687 |
+
}
|
| 688 |
+
|
| 689 |
+
// Créer une carte HTML pour un film
|
| 690 |
+
function createMovieCard(movie) {
|
| 691 |
+
const card = document.createElement('div');
|
| 692 |
+
card.className = 'movie-card';
|
| 693 |
+
card.onclick = () => openModal(movie);
|
| 694 |
+
|
| 695 |
+
const img = document.createElement('img');
|
| 696 |
+
img.src = movie.image;
|
| 697 |
+
img.alt = movie.title;
|
| 698 |
+
img.loading = "lazy";
|
| 699 |
+
|
| 700 |
+
const info = document.createElement('div');
|
| 701 |
+
info.className = 'card-info';
|
| 702 |
+
|
| 703 |
+
const title = document.createElement('div');
|
| 704 |
+
title.className = 'card-title';
|
| 705 |
+
title.innerText = movie.title;
|
| 706 |
+
|
| 707 |
+
const meta = document.createElement('div');
|
| 708 |
+
meta.className = 'card-meta';
|
| 709 |
+
meta.innerHTML = `<span>98% Match</span> <span>${movie.year}</span>`;
|
| 710 |
+
|
| 711 |
+
info.appendChild(title);
|
| 712 |
+
info.appendChild(meta);
|
| 713 |
+
card.appendChild(img);
|
| 714 |
+
card.appendChild(info);
|
| 715 |
+
|
| 716 |
+
return card;
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
// --- RECHERCHE ---
|
| 720 |
+
|
| 721 |
+
// Activer la barre de recherche
|
| 722 |
+
searchIcon.addEventListener('click', () => {
|
| 723 |
+
searchBox.classList.toggle('active');
|
| 724 |
+
if(searchBox.classList.contains('active')) {
|
| 725 |
+
searchInput.focus();
|
| 726 |
+
}
|
| 727 |
+
});
|
| 728 |
+
|
| 729 |
+
// Logique de recherche
|
| 730 |
+
searchInput.addEventListener('input', (e) => {
|
| 731 |
+
const query = e.target.value.toLowerCase();
|
| 732 |
+
|
| 733 |
+
if (query.length > 0) {
|
| 734 |
+
displaySearchResults(query);
|
| 735 |
+
} else {
|
| 736 |
+
initCategories(); // Retour à l'accueil si vide
|
| 737 |
+
heroSection.style.display = 'flex'; // Réafficher le hero
|
| 738 |
+
}
|
| 739 |
+
});
|
| 740 |
+
|
| 741 |
+
function displaySearchResults(query) {
|
| 742 |
+
// Cacher le hero pour une meilleure lisibilité
|
| 743 |
+
heroSection.style.display = 'none';
|
| 744 |
+
mainContent.innerHTML = '';
|
| 745 |
+
|
| 746 |
+
const results = database.filter(movie =>
|
| 747 |
+
movie.title.toLowerCase().includes(query)
|
| 748 |
+
);
|
| 749 |
+
|
| 750 |
+
if (results.length === 0) {
|
| 751 |
+
mainContent.innerHTML = '<h3 style="color:#666; margin-top:50px;">Aucun résultat trouvé.</h3>';
|
| 752 |
+
return;
|
| 753 |
+
}
|
| 754 |
+
|
| 755 |
+
const section = document.createElement('div');
|
| 756 |
+
section.className = 'category-section';
|
| 757 |
+
|
| 758 |
+
const title = document.createElement('h3');
|
| 759 |
+
title.className = 'category-title';
|
| 760 |
+
title.innerText = `Résultats pour "${query}"`;
|
| 761 |
+
|
| 762 |
+
const row = document.createElement('div');
|
| 763 |
+
row.className = 'movies-row';
|
| 764 |
+
|
| 765 |
+
results.forEach(movie => {
|
| 766 |
+
row.appendChild(createMovieCard(movie));
|
| 767 |
+
});
|
| 768 |
+
|
| 769 |
+
section.appendChild(title);
|
| 770 |
+
section.appendChild(row);
|
| 771 |
+
mainContent.appendChild(section);
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
// --- MODAL & PLAYER ---
|
| 775 |
+
|
| 776 |
+
function openModal(movie) {
|
| 777 |
+
modalTitle.innerText = movie.title;
|
| 778 |
+
modalDesc.innerText = movie.desc;
|
| 779 |
+
modalYear.innerText = movie.year;
|
| 780 |
+
modalBgImg.src = movie.image;
|
| 781 |
+
|
| 782 |
+
// Reset player state
|
| 783 |
+
videoStatus.style.display = 'none';
|
| 784 |
+
|
| 785 |
+
modal.classList.add('active');
|
| 786 |
+
}
|
| 787 |
+
|
| 788 |
+
function closeModal() {
|
| 789 |
+
modal.classList.remove('active');
|
| 790 |
+
// Arrêter la vidéo si elle était en lecture (simulation)
|
| 791 |
+
videoStatus.innerText = "";
|
| 792 |
+
videoStatus.style.display = 'none';
|
| 793 |
+
}
|
| 794 |
+
|
| 795 |
+
// Fermer la modale si on clique en dehors
|
| 796 |
+
modal.addEventListener('click', (e) => {
|
| 797 |
+
if (e.target === modal) {
|
| 798 |
+
closeModal();
|
| 799 |
+
}
|
| 800 |
+
});
|
| 801 |
+
|
| 802 |
+
// Gestion des boutons Hero
|
| 803 |
+
function playHeroMovie() {
|
| 804 |
+
const id = parseInt(heroSection.dataset.id);
|
| 805 |
+
const movie = database.find(m => m.id === id);
|
| 806 |
+
if(movie) openModal(movie);
|
| 807 |
+
}
|
| 808 |
+
|
| 809 |
+
function showHeroDetails() {
|
| 810 |
+
playHeroMovie(); // Pour simplifier, les deux font la même chose ici
|
| 811 |
+
}
|
| 812 |
+
|
| 813 |
+
// Simulation de lecture
|
| 814 |
+
function startFakePlayback() {
|
| 815 |
+
const status = document.getElementById('video-status');
|
| 816 |
+
const btn = document.querySelector('.play-btn-large');
|
| 817 |
+
|
| 818 |
+
btn.style.display = 'none';
|
| 819 |
+
status.style.display = 'block';
|
| 820 |
+
status.innerText = "Chargement du serveur...";
|
| 821 |
+
|
| 822 |
+
setTimeout(() => {
|
| 823 |
+
status.innerText = "Buffering...";
|
| 824 |
+
}, 1000);
|
| 825 |
+
|
| 826 |
+
setTimeout(() => {
|
| 827 |
+
status.innerText = "⚠ Ceci est une démo UI. Aucun flux vidéo réel n'est disponible.";
|
| 828 |
+
status.style.color = "#e50914";
|
| 829 |
+
status.style.fontWeight = "bold";
|
| 830 |
+
|
| 831 |
+
// Simuler l'interface de lecture
|
| 832 |
+
document.getElementById('modal-video-area').style.backgroundColor = "#000";
|
| 833 |
+
document.getElementById('modal-bg-img').style.opacity = "0";
|
| 834 |
+
}, 2500);
|
| 835 |
+
}
|
| 836 |
+
|
| 837 |
+
// --- EFFET SCROLL HEADER ---
|
| 838 |
+
window.addEventListener('scroll', () => {
|
| 839 |
+
if (window.scrollY > 50) {
|
| 840 |
+
header.classList.add('scrolled');
|
| 841 |
+
} else {
|
| 842 |
+
header.classList.remove('scrolled');
|
| 843 |
+
}
|
| 844 |
+
});
|
| 845 |
+
|
| 846 |
+
// Lancer l'app
|
| 847 |
+
initHero();
|
| 848 |
+
initCategories();
|
| 849 |
+
|
| 850 |
+
</script>
|
| 851 |
+
</body>
|
| 852 |
+
</html>
|