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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>AutoMaster | Guide Complet des Pièces Auto</title>
|
| 7 |
+
|
| 8 |
+
<!-- Importation de la police Google Fonts -->
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;600;700&family=Inter:wght@300;400;600&display=swap" rel="stylesheet">
|
| 12 |
+
|
| 13 |
+
<!-- Importation de l'icône FontAwesome -->
|
| 14 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 15 |
+
|
| 16 |
+
<style>
|
| 17 |
+
/* --- VARIABLES CSS & RESET --- */
|
| 18 |
+
:root {
|
| 19 |
+
--primary-color: #3b82f6; /* Bleu Automobile */
|
| 20 |
+
--primary-dark: #1d4ed8;
|
| 21 |
+
--accent-color: #ef4444; /* Rouge Action */
|
| 22 |
+
--bg-dark: #0f172a;
|
| 23 |
+
--bg-card: #1e293b;
|
| 24 |
+
--text-light: #f8fafc;
|
| 25 |
+
--text-gray: #94a3b8;
|
| 26 |
+
--border-color: #334155;
|
| 27 |
+
--transition-speed: 0.3s;
|
| 28 |
+
--shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
* {
|
| 32 |
+
margin: 0;
|
| 33 |
+
padding: 0;
|
| 34 |
+
box-sizing: border-box;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
body {
|
| 38 |
+
font-family: 'Inter', sans-serif;
|
| 39 |
+
background-color: var(--bg-dark);
|
| 40 |
+
color: var(--text-light);
|
| 41 |
+
line-height: 1.6;
|
| 42 |
+
overflow-x: hidden;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
h1, h2, h3, h4 {
|
| 46 |
+
font-family: 'Exo 2', sans-serif;
|
| 47 |
+
font-weight: 700;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
a {
|
| 51 |
+
text-decoration: none;
|
| 52 |
+
color: inherit;
|
| 53 |
+
transition: var(--transition-speed);
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
ul {
|
| 57 |
+
list-style: none;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
/* --- HEADER --- */
|
| 61 |
+
header {
|
| 62 |
+
background-color: rgba(15, 23, 42, 0.95);
|
| 63 |
+
backdrop-filter: blur(10px);
|
| 64 |
+
border-bottom: 1px solid var(--border-color);
|
| 65 |
+
position: sticky;
|
| 66 |
+
top: 0;
|
| 67 |
+
z-index: 1000;
|
| 68 |
+
padding: 1rem 2rem;
|
| 69 |
+
display: flex;
|
| 70 |
+
justify-content: space-between;
|
| 71 |
+
align-items: center;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.logo {
|
| 75 |
+
font-size: 1.5rem;
|
| 76 |
+
color: var(--primary-color);
|
| 77 |
+
display: flex;
|
| 78 |
+
align-items: center;
|
| 79 |
+
gap: 0.5rem;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
.logo i {
|
| 83 |
+
font-size: 1.8rem;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.nav-links {
|
| 87 |
+
display: flex;
|
| 88 |
+
gap: 2rem;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.nav-links a:hover {
|
| 92 |
+
color: var(--primary-color);
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
.anycoder-link {
|
| 96 |
+
font-size: 0.85rem;
|
| 97 |
+
color: var(--text-gray);
|
| 98 |
+
border: 1px solid var(--border-color);
|
| 99 |
+
padding: 0.3rem 0.8rem;
|
| 100 |
+
border-radius: 20px;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.anycoder-link:hover {
|
| 104 |
+
border-color: var(--primary-color);
|
| 105 |
+
color: var(--primary-color);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
/* --- HERO SECTION --- */
|
| 109 |
+
.hero {
|
| 110 |
+
text-align: center;
|
| 111 |
+
padding: 4rem 1rem;
|
| 112 |
+
background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.hero h1 {
|
| 116 |
+
font-size: 2.5rem;
|
| 117 |
+
margin-bottom: 1rem;
|
| 118 |
+
background: linear-gradient(to right, #fff, #94a3b8);
|
| 119 |
+
-webkit-background-clip: text;
|
| 120 |
+
-webkit-text-fill-color: transparent;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.hero p {
|
| 124 |
+
color: var(--text-gray);
|
| 125 |
+
max-width: 600px;
|
| 126 |
+
margin: 0 auto 2rem auto;
|
| 127 |
+
font-size: 1.1rem;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
/* --- MAIN APP LAYOUT --- */
|
| 131 |
+
.app-container {
|
| 132 |
+
max-width: 1200px;
|
| 133 |
+
margin: 0 auto;
|
| 134 |
+
padding: 2rem 1rem;
|
| 135 |
+
display: grid;
|
| 136 |
+
grid-template-columns: 1.5fr 1fr;
|
| 137 |
+
gap: 2rem;
|
| 138 |
+
min-height: 80vh;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
/* --- LEFT: VISUAL EXPLORER --- */
|
| 142 |
+
.visual-explorer {
|
| 143 |
+
background-color: var(--bg-card);
|
| 144 |
+
border-radius: 16px;
|
| 145 |
+
padding: 1rem;
|
| 146 |
+
border: 1px solid var(--border-color);
|
| 147 |
+
position: relative;
|
| 148 |
+
box-shadow: var(--shadow);
|
| 149 |
+
display: flex;
|
| 150 |
+
flex-direction: column;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
.car-image-container {
|
| 154 |
+
width: 100%;
|
| 155 |
+
height: 400px; /* Ajusté pour l'image */
|
| 156 |
+
position: relative;
|
| 157 |
+
overflow: hidden;
|
| 158 |
+
border-radius: 12px;
|
| 159 |
+
background-color: #000;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.car-image {
|
| 163 |
+
width: 100%;
|
| 164 |
+
height: 100%;
|
| 165 |
+
object-fit: cover;
|
| 166 |
+
opacity: 0.8;
|
| 167 |
+
transition: transform 0.5s ease;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.car-image-container:hover .car-image {
|
| 171 |
+
transform: scale(1.05);
|
| 172 |
+
opacity: 1;
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
/* Hotspots (Points interactifs) */
|
| 176 |
+
.hotspot {
|
| 177 |
+
position: absolute;
|
| 178 |
+
width: 24px;
|
| 179 |
+
height: 24px;
|
| 180 |
+
background-color: var(--primary-color);
|
| 181 |
+
border: 2px solid #fff;
|
| 182 |
+
border-radius: 50%;
|
| 183 |
+
cursor: pointer;
|
| 184 |
+
box-shadow: 0 0 10px var(--primary-color);
|
| 185 |
+
z-index: 10;
|
| 186 |
+
display: flex;
|
| 187 |
+
align-items: center;
|
| 188 |
+
justify-content: center;
|
| 189 |
+
transition: all 0.3s ease;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.hotspot::after {
|
| 193 |
+
content: '';
|
| 194 |
+
position: absolute;
|
| 195 |
+
width: 100%;
|
| 196 |
+
height: 100%;
|
| 197 |
+
border-radius: 50%;
|
| 198 |
+
border: 2px solid var(--primary-color);
|
| 199 |
+
animation: pulse 2s infinite;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
.hotspot.active {
|
| 203 |
+
background-color: var(--accent-color);
|
| 204 |
+
box-shadow: 0 0 15px var(--accent-color);
|
| 205 |
+
transform: scale(1.1);
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
.hotspot.active::after {
|
| 209 |
+
border-color: var(--accent-color);
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
.hotspot i {
|
| 213 |
+
font-size: 10px;
|
| 214 |
+
color: white;
|
| 215 |
+
pointer-events: none;
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
.hotspot-tooltip {
|
| 219 |
+
position: absolute;
|
| 220 |
+
bottom: 30px;
|
| 221 |
+
left: 50%;
|
| 222 |
+
transform: translateX(-50%);
|
| 223 |
+
background-color: rgba(0,0,0,0.8);
|
| 224 |
+
color: white;
|
| 225 |
+
padding: 4px 8px;
|
| 226 |
+
border-radius: 4px;
|
| 227 |
+
font-size: 0.8rem;
|
| 228 |
+
white-space: nowrap;
|
| 229 |
+
opacity: 0;
|
| 230 |
+
transition: opacity 0.3s;
|
| 231 |
+
pointer-events: none;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.hotspot:hover .hotspot-tooltip {
|
| 235 |
+
opacity: 1;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
@keyframes pulse {
|
| 239 |
+
0% { transform: scale(1); opacity: 1; }
|
| 240 |
+
100% { transform: scale(2.5); opacity: 0; }
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
/* --- RIGHT: DETAILS PANEL --- */
|
| 244 |
+
.details-panel {
|
| 245 |
+
background-color: var(--bg-card);
|
| 246 |
+
border-radius: 16px;
|
| 247 |
+
padding: 2rem;
|
| 248 |
+
border: 1px solid var(--border-color);
|
| 249 |
+
box-shadow: var(--shadow);
|
| 250 |
+
height: fit-content;
|
| 251 |
+
position: sticky;
|
| 252 |
+
top: 100px;
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
.empty-state {
|
| 256 |
+
text-align: center;
|
| 257 |
+
color: var(--text-gray);
|
| 258 |
+
padding: 2rem 0;
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
.empty-state i {
|
| 262 |
+
font-size: 3rem;
|
| 263 |
+
margin-bottom: 1rem;
|
| 264 |
+
opacity: 0.5;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
.part-content {
|
| 268 |
+
display: none; /* Masqué par défaut */
|
| 269 |
+
animation: slideIn 0.4s ease-out;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
.part-content.active {
|
| 273 |
+
display: block;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
@keyframes slideIn {
|
| 277 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 278 |
+
to { opacity: 1; transform: translateY(0); }
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.part-header {
|
| 282 |
+
display: flex;
|
| 283 |
+
align-items: center;
|
| 284 |
+
gap: 1rem;
|
| 285 |
+
margin-bottom: 1.5rem;
|
| 286 |
+
border-bottom: 1px solid var(--border-color);
|
| 287 |
+
padding-bottom: 1rem;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
.part-icon {
|
| 291 |
+
width: 50px;
|
| 292 |
+
height: 50px;
|
| 293 |
+
background-color: rgba(59, 130, 246, 0.1);
|
| 294 |
+
color: var(--primary-color);
|
| 295 |
+
border-radius: 12px;
|
| 296 |
+
display: flex;
|
| 297 |
+
align-items: center;
|
| 298 |
+
justify-content: center;
|
| 299 |
+
font-size: 1.5rem;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.part-title h2 {
|
| 303 |
+
font-size: 1.5rem;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
.part-title span {
|
| 307 |
+
color: var(--text-gray);
|
| 308 |
+
font-size: 0.9rem;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.section-label {
|
| 312 |
+
color: var(--primary-color);
|
| 313 |
+
font-size: 0.85rem;
|
| 314 |
+
text-transform: uppercase;
|
| 315 |
+
letter-spacing: 1px;
|
| 316 |
+
font-weight: 700;
|
| 317 |
+
margin: 1.5rem 0 0.5rem 0;
|
| 318 |
+
display: block;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
.tutorial-steps {
|
| 322 |
+
counter-reset: step;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
.step-item {
|
| 326 |
+
position: relative;
|
| 327 |
+
padding-left: 2rem;
|
| 328 |
+
margin-bottom: 1rem;
|
| 329 |
+
color: #cbd5e1;
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
.step-item::before {
|
| 333 |
+
counter-increment: step;
|
| 334 |
+
content: counter(step);
|
| 335 |
+
position: absolute;
|
| 336 |
+
left: 0;
|
| 337 |
+
top: 0;
|
| 338 |
+
width: 24px;
|
| 339 |
+
height: 24px;
|
| 340 |
+
background-color: var(--border-color);
|
| 341 |
+
color: white;
|
| 342 |
+
border-radius: 50%;
|
| 343 |
+
font-size: 0.75rem;
|
| 344 |
+
display: flex;
|
| 345 |
+
align-items: center;
|
| 346 |
+
justify-content: center;
|
| 347 |
+
font-weight: bold;
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.tools-list {
|
| 351 |
+
display: flex;
|
| 352 |
+
flex-wrap: wrap;
|
| 353 |
+
gap: 0.5rem;
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
.tool-tag {
|
| 357 |
+
background-color: #334155;
|
| 358 |
+
padding: 0.25rem 0.75rem;
|
| 359 |
+
border-radius: 20px;
|
| 360 |
+
font-size: 0.85rem;
|
| 361 |
+
display: flex;
|
| 362 |
+
align-items: center;
|
| 363 |
+
gap: 0.4rem;
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
.action-btn {
|
| 367 |
+
display: inline-block;
|
| 368 |
+
background-color: var(--primary-color);
|
| 369 |
+
color: white;
|
| 370 |
+
padding: 0.75rem 1.5rem;
|
| 371 |
+
border-radius: 8px;
|
| 372 |
+
margin-top: 2rem;
|
| 373 |
+
width: 100%;
|
| 374 |
+
text-align: center;
|
| 375 |
+
font-weight: 600;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
.action-btn:hover {
|
| 379 |
+
background-color: var(--primary-dark);
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
/* --- TUTORIALS GRID SECTION --- */
|
| 383 |
+
.tutorials-section {
|
| 384 |
+
background-color: #0f172a;
|
| 385 |
+
padding: 4rem 1rem;
|
| 386 |
+
border-top: 1px solid var(--border-color);
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
.section-header {
|
| 390 |
+
max-width: 1200px;
|
| 391 |
+
margin: 0 auto 2rem auto;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.grid-cards {
|
| 395 |
+
max-width: 1200px;
|
| 396 |
+
margin: 0 auto;
|
| 397 |
+
display: grid;
|
| 398 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| 399 |
+
gap: 1.5rem;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
.card {
|
| 403 |
+
background-color: var(--bg-card);
|
| 404 |
+
border-radius: 12px;
|
| 405 |
+
overflow: hidden;
|
| 406 |
+
border: 1px solid var(--border-color);
|
| 407 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
.card:hover {
|
| 411 |
+
transform: translateY(-5px);
|
| 412 |
+
box-shadow: 0 10px 20px rgba(0,0,0,0.3);
|
| 413 |
+
border-color: var(--primary-color);
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
.card-thumb {
|
| 417 |
+
height: 160px;
|
| 418 |
+
background-color: #334155;
|
| 419 |
+
position: relative;
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
.card-thumb img {
|
| 423 |
+
width: 100%;
|
| 424 |
+
height: 100%;
|
| 425 |
+
object-fit: cover;
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
.play-icon {
|
| 429 |
+
position: absolute;
|
| 430 |
+
top: 50%;
|
| 431 |
+
left: 50%;
|
| 432 |
+
transform: translate(-50%, -50%);
|
| 433 |
+
width: 40px;
|
| 434 |
+
height: 40px;
|
| 435 |
+
background: rgba(0,0,0,0.6);
|
| 436 |
+
border-radius: 50%;
|
| 437 |
+
display: flex;
|
| 438 |
+
align-items: center;
|
| 439 |
+
justify-content: center;
|
| 440 |
+
color: white;
|
| 441 |
+
backdrop-filter: blur(4px);
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
.card-content {
|
| 445 |
+
padding: 1.5rem;
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
.card-content h3 {
|
| 449 |
+
font-size: 1.1rem;
|
| 450 |
+
margin-bottom: 0.5rem;
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
.card-content p {
|
| 454 |
+
font-size: 0.9rem;
|
| 455 |
+
color: var(--text-gray);
|
| 456 |
+
margin-bottom: 1rem;
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
.card-link {
|
| 460 |
+
color: var(--primary-color);
|
| 461 |
+
font-size: 0.9rem;
|
| 462 |
+
font-weight: 600;
|
| 463 |
+
display: flex;
|
| 464 |
+
align-items: center;
|
| 465 |
+
gap: 0.5rem;
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
/* --- FOOTER --- */
|
| 469 |
+
footer {
|
| 470 |
+
background-color: #020617;
|
| 471 |
+
padding: 2rem;
|
| 472 |
+
text-align: center;
|
| 473 |
+
color: var(--text-gray);
|
| 474 |
+
border-top: 1px solid var(--border-color);
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
/* --- RESPONSIVE --- */
|
| 478 |
+
@media (max-width: 900px) {
|
| 479 |
+
.app-container {
|
| 480 |
+
grid-template-columns: 1fr;
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
.details-panel {
|
| 484 |
+
order: 2; /* Mettre les détails en dessous sur mobile */
|
| 485 |
+
position: static;
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
.visual-explorer {
|
| 489 |
+
order: 1;
|
| 490 |
+
}
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
@media (max-width: 600px) {
|
| 494 |
+
.hero h1 {
|
| 495 |
+
font-size: 1.8rem;
|
| 496 |
+
}
|
| 497 |
+
|
| 498 |
+
.nav-links {
|
| 499 |
+
display: none; /* Simplification pour mobile */
|
| 500 |
+
}
|
| 501 |
+
}
|
| 502 |
+
</style>
|
| 503 |
+
</head>
|
| 504 |
+
<body>
|
| 505 |
+
|
| 506 |
+
<!-- Header -->
|
| 507 |
+
<header>
|
| 508 |
+
<div class="logo">
|
| 509 |
+
<i class="fa-solid fa-car-side"></i>
|
| 510 |
+
<span>AutoMaster</span>
|
| 511 |
+
</div>
|
| 512 |
+
<nav class="nav-links">
|
| 513 |
+
<a href="#explorer">Explorateur</a>
|
| 514 |
+
<a href="#tutorials">Tutoriels</a>
|
| 515 |
+
<a href="#about">À propos</a>
|
| 516 |
+
</nav>
|
| 517 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
|
| 518 |
+
Built with anycoder
|
| 519 |
+
</a>
|
| 520 |
+
</header>
|
| 521 |
+
|
| 522 |
+
<!-- Hero Section -->
|
| 523 |
+
<section class="hero">
|
| 524 |
+
<h1>La Mécanique Autrement</h1>
|
| 525 |
+
<p>Explorez chaque composant de votre véhicule, visualisez son emplacement et suivez nos guides de montage pas-à-pas.</p>
|
| 526 |
+
</section>
|
| 527 |
+
|
| 528 |
+
<!-- Main Application Area -->
|
| 529 |
+
<main class="app-container" id="explorer">
|
| 530 |
+
|
| 531 |
+
<!-- Left: Interactive Car Image -->
|
| 532 |
+
<section class="visual-explorer">
|
| 533 |
+
<div class="car-image-container">
|
| 534 |
+
<!-- Image générique de voiture style sport -->
|
| 535 |
+
<img src="https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?q=80&w=1000&auto=format&fit=crop" alt="Voiture Sport" class="car-image">
|
| 536 |
+
|
| 537 |
+
<!-- Hotspots (Points cliquables) - Positionnés en % pour la responsivité -->
|
| 538 |
+
|
| 539 |
+
<!-- Moteur -->
|
| 540 |
+
<div class="hotspot" style="top: 40%; left: 35%;" data-part="engine" title="Moteur">
|
| 541 |
+
<i class="fa-solid fa-wrench"></i>
|
| 542 |
+
<div class="hotspot-tooltip">Moteur</div>
|
| 543 |
+
</div>
|
| 544 |
+
|
| 545 |
+
<!-- Roue Avant -->
|
| 546 |
+
<div class="hotspot" style="top: 65%; left: 20%;" data-part="wheels" title="Roues">
|
| 547 |
+
<i class="fa-solid fa-circle-notch"></i>
|
| 548 |
+
<div class="hotspot-tooltip">Roues & Freins</div>
|
| 549 |
+
</div>
|
| 550 |
+
|
| 551 |
+
<!-- Échappement -->
|
| 552 |
+
<div class="hotspot" style="top: 75%; left: 85%;" data-part="exhaust" title="Échappement">
|
| 553 |
+
<i class="fa-solid fa-wind"></i>
|
| 554 |
+
<div class="hotspot-tooltip">Échappement</div>
|
| 555 |
+
</div>
|
| 556 |
+
|
| 557 |
+
<!-- Batterie -->
|
| 558 |
+
<div class="hotspot" style="top: 45%; left: 55%;" data-part="battery" title="Batterie">
|
| 559 |
+
<i class="fa-solid fa-car-battery"></i>
|
| 560 |
+
<div class="hotspot-tooltip">Batterie</div>
|
| 561 |
+
</div>
|
| 562 |
+
|
| 563 |
+
<!-- Transmission -->
|
| 564 |
+
<div class="hotspot" style="top: 70%; left: 45%;" data-part="transmission" title="Transmission">
|
| 565 |
+
<i class="fa-solid fa-gears"></i>
|
| 566 |
+
<div class="hotspot-tooltip">Transmission</div>
|
| 567 |
+
</div>
|
| 568 |
+
</div>
|
| 569 |
+
<div style="margin-top: 1rem; color: var(--text-gray); font-size: 0.9rem; text-align: center;">
|
| 570 |
+
<i class="fa-solid fa-computer-mouse"></i> Cliquez sur les points bleus pour voir les détails
|
| 571 |
+
</div>
|
| 572 |
+
</section>
|
| 573 |
+
|
| 574 |
+
<!-- Right: Dynamic Details Panel -->
|
| 575 |
+
<section class="details-panel">
|
| 576 |
+
|
| 577 |
+
<!-- État vide (initial) -->
|
| 578 |
+
<div id="empty-state" class="empty-state">
|
| 579 |
+
<i class="fa-solid fa-hand-pointer"></i>
|
| 580 |
+
<h3>Sélectionnez une pièce</h3>
|
| 581 |
+
<p>Cliquez sur un point de la carte interactive pour afficher le tutoriel de montage et les spécifications.</p>
|
| 582 |
+
</div>
|
| 583 |
+
|
| 584 |
+
<!-- Contenu dynamique injecté par JS -->
|
| 585 |
+
<div id="part-content-container"></div>
|
| 586 |
+
|
| 587 |
+
<!-- Template caché pour la structure JS -->
|
| 588 |
+
<template id="details-template">
|
| 589 |
+
<div class="part-content">
|
| 590 |
+
<div class="part-header">
|
| 591 |
+
<div class="part-icon">
|
| 592 |
+
<i class="icon-class"></i>
|
| 593 |
+
</div>
|
| 594 |
+
<div class="part-title">
|
| 595 |
+
<h2 class="part-name">Nom de la pièce</h2>
|
| 596 |
+
<span class="part-category">Catégorie</span>
|
| 597 |
+
</div>
|
| 598 |
+
</div>
|
| 599 |
+
|
| 600 |
+
<p class="part-description">Description détaillée...</p>
|
| 601 |
+
|
| 602 |
+
<span class="section-label"><i class="fa-solid fa-screwdriver-wrench"></i> Outils nécessaires</span>
|
| 603 |
+
<div class="tools-list">
|
| 604 |
+
<!-- Outils injectés ici -->
|
| 605 |
+
</div>
|
| 606 |
+
|
| 607 |
+
<span class="section-label"><i class="fa-solid fa-list-check"></i> Tutoriel de Montage</span>
|
| 608 |
+
<div class="tutorial-steps">
|
| 609 |
+
<!-- Étapes injectées ici -->
|
| 610 |
+
</div>
|
| 611 |
+
|
| 612 |
+
<a href="#" class="action-btn">
|
| 613 |
+
<i class="fa-solid fa-play"></i> Voir la vidéo complète
|
| 614 |
+
</a>
|
| 615 |
+
</div>
|
| 616 |
+
</template>
|
| 617 |
+
|
| 618 |
+
</section>
|
| 619 |
+
</main>
|
| 620 |
+
|
| 621 |
+
<!-- Tutorials Grid Section -->
|
| 622 |
+
<section class="tutorials-section" id="tutorials">
|
| 623 |
+
<div class="section-header">
|
| 624 |
+
<h2>Tutoriels Populaires</h2>
|
| 625 |
+
<p style="color: var(--text-gray);">Les guides d'entretien les plus consultés par la communauté.</p>
|
| 626 |
+
</div>
|
| 627 |
+
|
| 628 |
+
<div class="grid-cards">
|
| 629 |
+
<!-- Card 1 -->
|
| 630 |
+
<article class="card">
|
| 631 |
+
<div class="card-thumb">
|
| 632 |
+
<img src="https://picsum.photos/seed/oil/400/250" alt="Vidéo Huile">
|
| 633 |
+
<div class="play-icon"><i class="fa-solid fa-play"></i></div>
|
| 634 |
+
</div>
|
| 635 |
+
<div class="card-content">
|
| 636 |
+
<h3>Changement d'huile moteur</h3>
|
| 637 |
+
<p>Comment vidanger et remplacer le filtre à huile en 15 minutes.</p>
|
| 638 |
+
<a href="#" class="card-link">Regarder le tutoriel <i class="fa-solid fa-arrow-right"></i></a>
|
| 639 |
+
</div>
|
| 640 |
+
</article>
|
| 641 |
+
|
| 642 |
+
<!-- Card 2 -->
|
| 643 |
+
<article class="card">
|
| 644 |
+
<div class="card-thumb">
|
| 645 |
+
<img src="https://picsum.photos/seed/brakes/400/250" alt="Vidéo Freins">
|
| 646 |
+
<div class="play-icon"><i class="fa-solid fa-play"></i></div>
|
| 647 |
+
</div>
|
| 648 |
+
<div class="card-content">
|
| 649 |
+
<h3>Changer ses plaquettes de frein</h3>
|
| 650 |
+
<p>Le guide complet pour changer les plaquettes avant en toute sécurité.</p>
|
| 651 |
+
<a href="#" class="card-link">Regarder le tutoriel <i class="fa-solid fa-arrow-right"></i></a>
|
| 652 |
+
</div>
|
| 653 |
+
</article>
|
| 654 |
+
|
| 655 |
+
<!-- Card 3 -->
|
| 656 |
+
<article class="card">
|
| 657 |
+
<div class="card-thumb">
|
| 658 |
+
<img src="https://picsum.photos/seed/spark/400/250" alt="Vidéo Bougies">
|
| 659 |
+
<div class="play-icon"><i class="fa-solid fa-play"></i></div>
|
| 660 |
+
</div>
|
| 661 |
+
<div class="card-content">
|
| 662 |
+
<h3>Remplacement des bougies</h3>
|
| 663 |
+
<p>Optimisez votre combustion et accélérez en changeant vos bougies.</p>
|
| 664 |
+
<a href="#" class="card-link">Regarder le tutoriel <i class="fa-solid fa-arrow-right"></i></a>
|
| 665 |
+
</div>
|
| 666 |
+
</article>
|
| 667 |
+
</div>
|
| 668 |
+
</section>
|
| 669 |
+
|
| 670 |
+
<!-- Footer -->
|
| 671 |
+
<footer>
|
| 672 |
+
<p>© 2023 AutoMaster. Tous droits réservés. Conçu pour les passionnés.</p>
|
| 673 |
+
</footer>
|
| 674 |
+
|
| 675 |
+
<!-- JavaScript Logic -->
|
| 676 |
+
<script>
|
| 677 |
+
// Base de données des pièces (Simulation Backend)
|
| 678 |
+
const partsData = {
|
| 679 |
+
engine: {
|
| 680 |
+
name: "Moteur Thermique",
|
| 681 |
+
category: "Groupe Moto-propulseur",
|
| 682 |
+
icon: "fa-solid fa-engine-warning", // Note: fa-engine-warning might not exist in all packs, using fa-car-battery as fallback or generic
|
| 683 |
+
iconClass: "fa-solid fa-gear",
|
| 684 |
+
description: "Le moteur est le cœur de la voiture. Il transforme l'énergie chimique du carburant en énergie mécanique. Il est composé de pistons, de bielles et d'un vilebrequin.",
|
| 685 |
+
tools: ["Clé à bougie", "Clé dynamométrique", "Jeu de joints"],
|
| 686 |
+
steps: [
|
| 687 |
+
"Débrancher la batterie pour éviter tout court-circuit.",
|
| 688 |
+
"Retirer les câbles d'allumage et le couvre-culasse.",
|
| 689 |
+
"Dévisser les bougies d'allumage avec une clé adaptée.",
|
| 690 |
+
"Vérifier l'écartement des électrodes des nouvelles bougies.",
|
| 691 |
+
"Visser les nouvelles bougies à la main puis serrer au couple prescrit.",
|
| 692 |
+
"Rebrancher les câbles et la batterie, puis démarrer le moteur."
|
| 693 |
+
]
|
| 694 |
+
},
|
| 695 |
+
wheels: {
|
| 696 |
+
name: "Système de Freinage",
|
| 697 |
+
category: "Châssis & Sécurité",
|
| 698 |
+
iconClass: "fa-solid fa-compact-disc",
|
| 699 |
+
description: "Le système de freinage permet de ralentir ou d'arrêter le véhicule. Il est composé de disques, d'étriers et de plaquettes qui frottent contre le disque.",
|
| 700 |
+
tools: ["Cric", "Béquilles", "Clé à pipe", "Pince à déplier"],
|
| 701 |
+
steps: [
|
| 702 |
+
"Desserrer les écrous de roue alors que la voiture est au sol.",
|
| 703 |
+
"Lever la voiture à l'aide du cric et la sécuriser avec des béquilles.",
|
| 704 |
+
"Retirer la roue.",
|
| 705 |
+
"Retirer les deux goupilles de l'étrier de frein.",
|
| 706 |
+
"Sortir l'ancienne plaquette et pousser le piston vers l'arrière avec la pince.",
|
| 707 |
+
"Insérer les nouvelles plaquettes et remonter l'étrier.",
|
| 708 |
+
"Remonter la roue et serrer les écrous en étoile."
|
| 709 |
+
]
|
| 710 |
+
},
|
| 711 |
+
exhaust: {
|
| 712 |
+
name: "Ligne d'échappement",
|
| 713 |
+
category: "Évacuation des gaz",
|
| 714 |
+
iconClass: "fa-solid fa-wind",
|
| 715 |
+
description: "La ligne d'échappement évacue les gaz brûlés du moteur vers l'extérieur. Elle comprend le collecteur, le catalyseur et le silencieux.",
|
| 716 |
+
tools: ["Lubrifiant dégrippant", "Clé à molette", "Support de ligne"],
|
| 717 |
+
steps: [
|
| 718 |
+
"Pulvériser du dégrippant sur les vis du collecteur 24h avant.",
|
| 719 |
+
"Lever la voiture et accéder à la ligne d'échappement.",
|
| 720 |
+
"Démonter les colliers de fixation et les joints.",
|
| 721 |
+
"Retirer l'ancien pot ou le silencieux défectueux.",
|
| 722 |
+
"Positionner la nouvelle pièce avec des joints neufs.",
|
| 723 |
+
"Serrer les colliers et vérifier les fixations."
|
| 724 |
+
]
|
| 725 |
+
},
|
| 726 |
+
battery: {
|
| 727 |
+
name: "Batterie 12V",
|
| 728 |
+
category: "Électrique",
|
| 729 |
+
iconClass: "fa-solid fa-car-battery",
|
| 730 |
+
description: "La batterie fournit l'énergie électrique nécessaire au démarrage et à l'alimentation des accessoires (lumières, radio) lorsque le moteur est éteint.",
|
| 731 |
+
tools: ["Clé de 10", "Brosse à batterie", "Gants de protection"],
|
| 732 |
+
steps: [
|
| 733 |
+
"Identifier la borne positive (+) rouge et négative (-) noire.",
|
| 734 |
+
"Toujours débrancher la borne négative en premier pour éviter l'étincelle.",
|
| 735 |
+
"Retirer les câbles et nettoyer les bornes avec la brosse.",
|
| 736 |
+
"Placer la nouvelle batterie dans le logement.",
|
| 737 |
+
"Rebrancher la borne positive (+) en premier.",
|
| 738 |
+
"Rebrancher la borne négative (-) en dernier."
|
| 739 |
+
]
|
| 740 |
+
},
|
| 741 |
+
transmission: {
|
| 742 |
+
name: "Boîte de Vitesses",
|
| 743 |
+
category: "Transmission",
|
| 744 |
+
iconClass: "fa-solid fa-gears",
|
| 745 |
+
description: "La boîte de vitesses adapte le couple moteur et la vitesse de rotation aux roues. Elle permet de reculer et de changer le rapport de démultiplication.",
|
| 746 |
+
tools: ["Jauge de niveau", "Clé Allen", "Bac de récupération"],
|
| 747 |
+
steps: [
|
| 748 |
+
"Localiser le bouchon de remplissage et de vidange sur le carter.",
|
| 749 |
+
"Vidanger l'ancienne huile en dévissant le bouchon du bas.",
|
| 750 |
+
"Revisser le bouchon de vidange avec un joint neuf.",
|
| 751 |
+
"Remplir par le haut avec la nouvelle huile de transmission.",
|
| 752 |
+
"Contrôler le niveau avec la jauge jusqu'au débordement.",
|
| 753 |
+
"Revisser le bouchon de remplissage proprement."
|
| 754 |
+
]
|
| 755 |
+
}
|
| 756 |
+
};
|
| 757 |
+
|
| 758 |
+
// DOM Elements
|
| 759 |
+
const hotspots = document.querySelectorAll('.hotspot');
|
| 760 |
+
const emptyState = document.getElementById('empty-state');
|
| 761 |
+
const contentContainer = document.getElementById('part-content-container');
|
| 762 |
+
const template = document.getElementById('details-template');
|
| 763 |
+
|
| 764 |
+
// Fonction d'affichage des détails
|
| 765 |
+
function showPartDetails(partId) {
|
| 766 |
+
const data = partsData[partId];
|
| 767 |
+
if (!data) return;
|
| 768 |
+
|
| 769 |
+
// Masquer l'état vide
|
| 770 |
+
emptyState.style.display = 'none';
|
| 771 |
+
|
| 772 |
+
// Nettoyer le conteneur
|
| 773 |
+
contentContainer.innerHTML = '';
|
| 774 |
+
|
| 775 |
+
// Cloner le template
|
| 776 |
+
const clone = template.content.cloneNode(true);
|
| 777 |
+
|
| 778 |
+
// Remplir les données
|
| 779 |
+
clone.querySelector('.part-name').textContent = data.name;
|
| 780 |
+
clone.querySelector('.part-category').textContent = data.category;
|
| 781 |
+
clone.querySelector('.part-description').textContent = data.description;
|
| 782 |
+
clone.querySelector('.icon-class').className = `${data.iconClass}`;
|
| 783 |
+
|
| 784 |
+
// Remplir les outils
|
| 785 |
+
const toolsContainer = clone.querySelector('.tools-list');
|
| 786 |
+
data.tools.forEach(tool => {
|
| 787 |
+
const span = document.createElement('span');
|
| 788 |
+
span.className = 'tool-tag';
|
| 789 |
+
span.innerHTML = `<i class="fa-solid fa-check"></i> ${tool}`;
|
| 790 |
+
toolsContainer.appendChild(span);
|
| 791 |
+
});
|
| 792 |
+
|
| 793 |
+
// Remplir les étapes
|
| 794 |
+
const stepsContainer = clone.querySelector('.tutorial-steps');
|
| 795 |
+
data.steps.forEach(step => {
|
| 796 |
+
const p = document.createElement('p');
|
| 797 |
+
p.className = 'step-item';
|
| 798 |
+
p.textContent = step;
|
| 799 |
+
stepsContainer.appendChild(p);
|
| 800 |
+
});
|
| 801 |
+
|
| 802 |
+
// Ajouter l'animation et l'afficher
|
| 803 |
+
const newContent = clone.querySelector('.part-content');
|
| 804 |
+
newContent.classList.add('active');
|
| 805 |
+
contentContainer.appendChild(newContent);
|
| 806 |
+
|
| 807 |
+
// Gérer l'état actif des points
|
| 808 |
+
hotspots.forEach(h => h.classList.remove('active'));
|
| 809 |
+
document.querySelector(`.hotspot[data-part="${partId}"]`).classList.add('active');
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
// Event Listeners pour les hotspots
|
| 813 |
+
hotspots.forEach(spot => {
|
| 814 |
+
spot.addEventListener('click', () => {
|
| 815 |
+
const partId = spot.getAttribute('data-part');
|
| 816 |
+
showPartDetails(partId);
|
| 817 |
+
});
|
| 818 |
+
});
|
| 819 |
+
|
| 820 |
+
// Interaction optionnelle : Scroll automatique vers les détails sur mobile
|
| 821 |
+
if (window.innerWidth < 900) {
|
| 822 |
+
hotspots.forEach(spot => {
|
| 823 |
+
spot.addEventListener('click', () => {
|
| 824 |
+
document.querySelector('.details-panel').scrollIntoView({ behavior: 'smooth' });
|
| 825 |
+
});
|
| 826 |
+
});
|
| 827 |
+
}
|
| 828 |
+
|
| 829 |
+
</script>
|
| 830 |
+
</body>
|
| 831 |
+
</html>
|