Commit ·
482d44b
1
Parent(s): ccd6703
Fix mobile responsiveness: add hamburger menu, optimize grids and typography for small screens
Browse files- static/css/style.css +274 -77
- static/js/script.js +73 -25
static/css/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
* {
|
| 2 |
margin: 0;
|
| 3 |
padding: 0;
|
| 4 |
box-sizing: border-box;
|
|
@@ -11,6 +11,50 @@ body {
|
|
| 11 |
overflow-x: hidden;
|
| 12 |
}
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
/* ============ SIDEBAR STICKY ============ */
|
| 15 |
.sidebar {
|
| 16 |
position: fixed;
|
|
@@ -23,6 +67,7 @@ body {
|
|
| 23 |
box-shadow: 5px 0 20px rgba(0, 217, 255, 0.3);
|
| 24 |
overflow-y: auto;
|
| 25 |
z-index: 1000;
|
|
|
|
| 26 |
}
|
| 27 |
|
| 28 |
.sidebar-content {
|
|
@@ -62,6 +107,7 @@ body {
|
|
| 62 |
margin-left: 280px;
|
| 63 |
min-height: 100vh;
|
| 64 |
padding: 2rem;
|
|
|
|
| 65 |
}
|
| 66 |
|
| 67 |
.page {
|
|
@@ -91,6 +137,7 @@ body {
|
|
| 91 |
border: 5px solid #00D9FF;
|
| 92 |
box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
|
| 93 |
margin-bottom: 2rem;
|
|
|
|
| 94 |
}
|
| 95 |
|
| 96 |
.hero-name {
|
|
@@ -156,7 +203,7 @@ body {
|
|
| 156 |
|
| 157 |
.home-projects {
|
| 158 |
display: grid;
|
| 159 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
| 160 |
gap: 2rem;
|
| 161 |
margin: 2rem 0;
|
| 162 |
}
|
|
@@ -246,7 +293,7 @@ body {
|
|
| 246 |
/* ============ ABOUT PAGE ============ */
|
| 247 |
.about-content {
|
| 248 |
display: grid;
|
| 249 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
| 250 |
gap: 2rem;
|
| 251 |
}
|
| 252 |
|
|
@@ -333,13 +380,14 @@ body {
|
|
| 333 |
|
| 334 |
.project-images {
|
| 335 |
display: grid;
|
| 336 |
-
grid-template-columns: repeat(
|
| 337 |
gap: 1rem;
|
| 338 |
margin: 1rem 0;
|
| 339 |
}
|
| 340 |
|
| 341 |
.project-images img {
|
| 342 |
width: 100%;
|
|
|
|
| 343 |
border-radius: 10px;
|
| 344 |
border: 2px solid rgba(0, 217, 255, 0.3);
|
| 345 |
transition: all 0.3s ease;
|
|
@@ -387,7 +435,7 @@ body {
|
|
| 387 |
/* ============ SKILLS PAGE ============ */
|
| 388 |
.skills-grid {
|
| 389 |
display: grid;
|
| 390 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
| 391 |
gap: 2rem;
|
| 392 |
}
|
| 393 |
|
|
@@ -414,7 +462,7 @@ body {
|
|
| 414 |
/* ============ CONTACT PAGE ============ */
|
| 415 |
.contact-content {
|
| 416 |
display: grid;
|
| 417 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
| 418 |
gap: 2rem;
|
| 419 |
}
|
| 420 |
|
|
@@ -445,83 +493,13 @@ body {
|
|
| 445 |
font-weight: 700;
|
| 446 |
font-size: 1.1rem;
|
| 447 |
transition: all 0.3s ease;
|
|
|
|
| 448 |
}
|
| 449 |
|
| 450 |
.contact-card a:hover {
|
| 451 |
color: #667EEA;
|
| 452 |
}
|
| 453 |
|
| 454 |
-
/* ============ RESPONSIVE ============ */
|
| 455 |
-
@media (max-width: 768px) {
|
| 456 |
-
.sidebar {
|
| 457 |
-
width: 100%;
|
| 458 |
-
height: auto;
|
| 459 |
-
position: relative;
|
| 460 |
-
}
|
| 461 |
-
|
| 462 |
-
.main-content {
|
| 463 |
-
margin-left: 0;
|
| 464 |
-
}
|
| 465 |
-
|
| 466 |
-
.project-images {
|
| 467 |
-
grid-template-columns: 1fr;
|
| 468 |
-
}
|
| 469 |
-
}
|
| 470 |
-
/* ============ ANIMATIONS AU SCROLL ============ */
|
| 471 |
-
.animate-on-scroll {
|
| 472 |
-
opacity: 0;
|
| 473 |
-
transform: translateY(30px);
|
| 474 |
-
transition: opacity 0.6s ease, transform 0.6s ease;
|
| 475 |
-
}
|
| 476 |
-
|
| 477 |
-
.animate-on-scroll.animated {
|
| 478 |
-
opacity: 1;
|
| 479 |
-
transform: translateY(0);
|
| 480 |
-
}
|
| 481 |
-
|
| 482 |
-
/* Animation avec délai pour effet cascade */
|
| 483 |
-
.animate-delay-1 { transition-delay: 0.1s; }
|
| 484 |
-
.animate-delay-2 { transition-delay: 0.2s; }
|
| 485 |
-
.animate-delay-3 { transition-delay: 0.3s; }
|
| 486 |
-
.animate-delay-4 { transition-delay: 0.4s; }
|
| 487 |
-
|
| 488 |
-
/* Animation depuis la gauche */
|
| 489 |
-
.animate-from-left {
|
| 490 |
-
opacity: 0;
|
| 491 |
-
transform: translateX(-50px);
|
| 492 |
-
transition: opacity 0.6s ease, transform 0.6s ease;
|
| 493 |
-
}
|
| 494 |
-
|
| 495 |
-
.animate-from-left.animated {
|
| 496 |
-
opacity: 1;
|
| 497 |
-
transform: translateX(0);
|
| 498 |
-
}
|
| 499 |
-
|
| 500 |
-
/* Animation depuis la droite */
|
| 501 |
-
.animate-from-right {
|
| 502 |
-
opacity: 0;
|
| 503 |
-
transform: translateX(50px);
|
| 504 |
-
transition: opacity 0.6s ease, transform 0.6s ease;
|
| 505 |
-
}
|
| 506 |
-
|
| 507 |
-
.animate-from-right.animated {
|
| 508 |
-
opacity: 1;
|
| 509 |
-
transform: translateX(0);
|
| 510 |
-
}
|
| 511 |
-
|
| 512 |
-
/* Animation zoom */
|
| 513 |
-
.animate-zoom {
|
| 514 |
-
opacity: 0;
|
| 515 |
-
transform: scale(0.8);
|
| 516 |
-
transition: opacity 0.5s ease, transform 0.5s ease;
|
| 517 |
-
}
|
| 518 |
-
|
| 519 |
-
.animate-zoom.animated {
|
| 520 |
-
opacity: 1;
|
| 521 |
-
transform: scale(1);
|
| 522 |
-
}
|
| 523 |
-
|
| 524 |
-
|
| 525 |
/* ============ FORMULAIRE DE CONTACT ============ */
|
| 526 |
.contact-form-wrapper {
|
| 527 |
max-width: 700px;
|
|
@@ -624,3 +602,222 @@ body {
|
|
| 624 |
border: 2px solid #EF4444;
|
| 625 |
color: #EF4444;
|
| 626 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
* {
|
| 2 |
margin: 0;
|
| 3 |
padding: 0;
|
| 4 |
box-sizing: border-box;
|
|
|
|
| 11 |
overflow-x: hidden;
|
| 12 |
}
|
| 13 |
|
| 14 |
+
/* ============ MENU HAMBURGER MOBILE ============ */
|
| 15 |
+
.menu-toggle {
|
| 16 |
+
display: none;
|
| 17 |
+
position: fixed;
|
| 18 |
+
top: 20px;
|
| 19 |
+
left: 20px;
|
| 20 |
+
z-index: 2000;
|
| 21 |
+
background: linear-gradient(135deg, #00D9FF 0%, #667EEA 100%);
|
| 22 |
+
border: none;
|
| 23 |
+
border-radius: 10px;
|
| 24 |
+
padding: 12px 16px;
|
| 25 |
+
cursor: pointer;
|
| 26 |
+
box-shadow: 0 4px 15px rgba(0, 217, 255, 0.5);
|
| 27 |
+
transition: all 0.3s ease;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.menu-toggle:hover {
|
| 31 |
+
transform: scale(1.1);
|
| 32 |
+
box-shadow: 0 6px 20px rgba(0, 217, 255, 0.7);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.menu-toggle span {
|
| 36 |
+
display: block;
|
| 37 |
+
width: 25px;
|
| 38 |
+
height: 3px;
|
| 39 |
+
background: white;
|
| 40 |
+
margin: 5px 0;
|
| 41 |
+
border-radius: 3px;
|
| 42 |
+
transition: all 0.3s ease;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
/* Animation hamburger -> X */
|
| 46 |
+
.menu-toggle.active span:nth-child(1) {
|
| 47 |
+
transform: rotate(45deg) translate(8px, 8px);
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.menu-toggle.active span:nth-child(2) {
|
| 51 |
+
opacity: 0;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.menu-toggle.active span:nth-child(3) {
|
| 55 |
+
transform: rotate(-45deg) translate(7px, -7px);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
/* ============ SIDEBAR STICKY ============ */
|
| 59 |
.sidebar {
|
| 60 |
position: fixed;
|
|
|
|
| 67 |
box-shadow: 5px 0 20px rgba(0, 217, 255, 0.3);
|
| 68 |
overflow-y: auto;
|
| 69 |
z-index: 1000;
|
| 70 |
+
transition: transform 0.3s ease;
|
| 71 |
}
|
| 72 |
|
| 73 |
.sidebar-content {
|
|
|
|
| 107 |
margin-left: 280px;
|
| 108 |
min-height: 100vh;
|
| 109 |
padding: 2rem;
|
| 110 |
+
transition: margin-left 0.3s ease;
|
| 111 |
}
|
| 112 |
|
| 113 |
.page {
|
|
|
|
| 137 |
border: 5px solid #00D9FF;
|
| 138 |
box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
|
| 139 |
margin-bottom: 2rem;
|
| 140 |
+
object-fit: cover;
|
| 141 |
}
|
| 142 |
|
| 143 |
.hero-name {
|
|
|
|
| 203 |
|
| 204 |
.home-projects {
|
| 205 |
display: grid;
|
| 206 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 207 |
gap: 2rem;
|
| 208 |
margin: 2rem 0;
|
| 209 |
}
|
|
|
|
| 293 |
/* ============ ABOUT PAGE ============ */
|
| 294 |
.about-content {
|
| 295 |
display: grid;
|
| 296 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| 297 |
gap: 2rem;
|
| 298 |
}
|
| 299 |
|
|
|
|
| 380 |
|
| 381 |
.project-images {
|
| 382 |
display: grid;
|
| 383 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 384 |
gap: 1rem;
|
| 385 |
margin: 1rem 0;
|
| 386 |
}
|
| 387 |
|
| 388 |
.project-images img {
|
| 389 |
width: 100%;
|
| 390 |
+
height: auto;
|
| 391 |
border-radius: 10px;
|
| 392 |
border: 2px solid rgba(0, 217, 255, 0.3);
|
| 393 |
transition: all 0.3s ease;
|
|
|
|
| 435 |
/* ============ SKILLS PAGE ============ */
|
| 436 |
.skills-grid {
|
| 437 |
display: grid;
|
| 438 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| 439 |
gap: 2rem;
|
| 440 |
}
|
| 441 |
|
|
|
|
| 462 |
/* ============ CONTACT PAGE ============ */
|
| 463 |
.contact-content {
|
| 464 |
display: grid;
|
| 465 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| 466 |
gap: 2rem;
|
| 467 |
}
|
| 468 |
|
|
|
|
| 493 |
font-weight: 700;
|
| 494 |
font-size: 1.1rem;
|
| 495 |
transition: all 0.3s ease;
|
| 496 |
+
word-break: break-word;
|
| 497 |
}
|
| 498 |
|
| 499 |
.contact-card a:hover {
|
| 500 |
color: #667EEA;
|
| 501 |
}
|
| 502 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 503 |
/* ============ FORMULAIRE DE CONTACT ============ */
|
| 504 |
.contact-form-wrapper {
|
| 505 |
max-width: 700px;
|
|
|
|
| 602 |
border: 2px solid #EF4444;
|
| 603 |
color: #EF4444;
|
| 604 |
}
|
| 605 |
+
|
| 606 |
+
/* ============ ANIMATIONS AU SCROLL ============ */
|
| 607 |
+
.animate-on-scroll {
|
| 608 |
+
opacity: 0;
|
| 609 |
+
transform: translateY(30px);
|
| 610 |
+
transition: opacity 0.6s ease, transform 0.6s ease;
|
| 611 |
+
}
|
| 612 |
+
|
| 613 |
+
.animate-on-scroll.animated {
|
| 614 |
+
opacity: 1;
|
| 615 |
+
transform: translateY(0);
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
.animate-delay-1 { transition-delay: 0.1s; }
|
| 619 |
+
.animate-delay-2 { transition-delay: 0.2s; }
|
| 620 |
+
.animate-delay-3 { transition-delay: 0.3s; }
|
| 621 |
+
.animate-delay-4 { transition-delay: 0.4s; }
|
| 622 |
+
|
| 623 |
+
.animate-from-left {
|
| 624 |
+
opacity: 0;
|
| 625 |
+
transform: translateX(-50px);
|
| 626 |
+
transition: opacity 0.6s ease, transform 0.6s ease;
|
| 627 |
+
}
|
| 628 |
+
|
| 629 |
+
.animate-from-left.animated {
|
| 630 |
+
opacity: 1;
|
| 631 |
+
transform: translateX(0);
|
| 632 |
+
}
|
| 633 |
+
|
| 634 |
+
.animate-from-right {
|
| 635 |
+
opacity: 0;
|
| 636 |
+
transform: translateX(50px);
|
| 637 |
+
transition: opacity 0.6s ease, transform 0.6s ease;
|
| 638 |
+
}
|
| 639 |
+
|
| 640 |
+
.animate-from-right.animated {
|
| 641 |
+
opacity: 1;
|
| 642 |
+
transform: translateX(0);
|
| 643 |
+
}
|
| 644 |
+
|
| 645 |
+
.animate-zoom {
|
| 646 |
+
opacity: 0;
|
| 647 |
+
transform: scale(0.8);
|
| 648 |
+
transition: opacity 0.5s ease, transform 0.5s ease;
|
| 649 |
+
}
|
| 650 |
+
|
| 651 |
+
.animate-zoom.animated {
|
| 652 |
+
opacity: 1;
|
| 653 |
+
transform: scale(1);
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
/* ============ RESPONSIVE MOBILE ============ */
|
| 657 |
+
@media (max-width: 768px) {
|
| 658 |
+
/* Afficher le bouton hamburger */
|
| 659 |
+
.menu-toggle {
|
| 660 |
+
display: block;
|
| 661 |
+
}
|
| 662 |
+
|
| 663 |
+
/* Sidebar cachée par défaut sur mobile */
|
| 664 |
+
.sidebar {
|
| 665 |
+
transform: translateX(-100%);
|
| 666 |
+
}
|
| 667 |
+
|
| 668 |
+
/* Sidebar visible quand active */
|
| 669 |
+
.sidebar.active {
|
| 670 |
+
transform: translateX(0);
|
| 671 |
+
}
|
| 672 |
+
|
| 673 |
+
/* Overlay sombre quand menu ouvert */
|
| 674 |
+
.sidebar.active::after {
|
| 675 |
+
content: '';
|
| 676 |
+
position: fixed;
|
| 677 |
+
top: 0;
|
| 678 |
+
right: -100vw;
|
| 679 |
+
width: 100vw;
|
| 680 |
+
height: 100vh;
|
| 681 |
+
background: rgba(0, 0, 0, 0.5);
|
| 682 |
+
z-index: -1;
|
| 683 |
+
}
|
| 684 |
+
|
| 685 |
+
/* Main content prend toute la largeur */
|
| 686 |
+
.main-content {
|
| 687 |
+
margin-left: 0;
|
| 688 |
+
padding: 5rem 1.5rem 1.5rem 1.5rem;
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
/* Textes plus petits */
|
| 692 |
+
.hero-name {
|
| 693 |
+
font-size: 2.2rem;
|
| 694 |
+
}
|
| 695 |
+
|
| 696 |
+
.hero-title {
|
| 697 |
+
font-size: 1.2rem;
|
| 698 |
+
}
|
| 699 |
+
|
| 700 |
+
.hero-quote {
|
| 701 |
+
font-size: 1rem;
|
| 702 |
+
}
|
| 703 |
+
|
| 704 |
+
.page-title {
|
| 705 |
+
font-size: 1.8rem;
|
| 706 |
+
}
|
| 707 |
+
|
| 708 |
+
.section-title {
|
| 709 |
+
font-size: 1.5rem;
|
| 710 |
+
}
|
| 711 |
+
|
| 712 |
+
/* Photo de profil plus petite */
|
| 713 |
+
.profile-img {
|
| 714 |
+
width: 150px;
|
| 715 |
+
height: 150px;
|
| 716 |
+
}
|
| 717 |
+
|
| 718 |
+
/* Métriques en 2 colonnes */
|
| 719 |
+
.metrics {
|
| 720 |
+
grid-template-columns: repeat(2, 1fr);
|
| 721 |
+
gap: 1rem;
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
.metric-card {
|
| 725 |
+
padding: 1.5rem;
|
| 726 |
+
}
|
| 727 |
+
|
| 728 |
+
.metric-value {
|
| 729 |
+
font-size: 2rem;
|
| 730 |
+
}
|
| 731 |
+
|
| 732 |
+
/* Projets en 1 colonne */
|
| 733 |
+
.home-projects {
|
| 734 |
+
grid-template-columns: 1fr;
|
| 735 |
+
}
|
| 736 |
+
|
| 737 |
+
/* Images projets en 1 colonne */
|
| 738 |
+
.project-images {
|
| 739 |
+
grid-template-columns: 1fr;
|
| 740 |
+
}
|
| 741 |
+
|
| 742 |
+
/* Cards plus compactes */
|
| 743 |
+
.project-card,
|
| 744 |
+
.about-card,
|
| 745 |
+
.skill-card,
|
| 746 |
+
.contact-card {
|
| 747 |
+
padding: 1.5rem;
|
| 748 |
+
}
|
| 749 |
+
|
| 750 |
+
.contact-form-wrapper {
|
| 751 |
+
padding: 1.5rem;
|
| 752 |
+
}
|
| 753 |
+
|
| 754 |
+
/* Titres projets plus petits */
|
| 755 |
+
.project-title {
|
| 756 |
+
font-size: 1.4rem;
|
| 757 |
+
}
|
| 758 |
+
|
| 759 |
+
.project-desc {
|
| 760 |
+
font-size: 1rem;
|
| 761 |
+
}
|
| 762 |
+
|
| 763 |
+
/* Liens projet en colonne */
|
| 764 |
+
.project-link {
|
| 765 |
+
min-width: 100%;
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
/* Tech pills plus petits */
|
| 769 |
+
.tech-pill {
|
| 770 |
+
font-size: 0.8rem;
|
| 771 |
+
padding: 0.4rem 0.8rem;
|
| 772 |
+
}
|
| 773 |
+
|
| 774 |
+
/* Badges plus petits */
|
| 775 |
+
.badge {
|
| 776 |
+
font-size: 0.75rem;
|
| 777 |
+
padding: 0.3rem 0.7rem;
|
| 778 |
+
}
|
| 779 |
+
|
| 780 |
+
/* Désactiver animations hover sur mobile */
|
| 781 |
+
.nav-btn:hover,
|
| 782 |
+
.metric-card:hover,
|
| 783 |
+
.home-project-card:hover,
|
| 784 |
+
.project-card:hover,
|
| 785 |
+
.about-card:hover,
|
| 786 |
+
.skill-card:hover,
|
| 787 |
+
.contact-card:hover {
|
| 788 |
+
transform: none;
|
| 789 |
+
}
|
| 790 |
+
|
| 791 |
+
/* Footer plus compact */
|
| 792 |
+
.footer {
|
| 793 |
+
font-size: 0.9rem;
|
| 794 |
+
padding: 1.5rem;
|
| 795 |
+
}
|
| 796 |
+
}
|
| 797 |
+
|
| 798 |
+
/* ============ TRÈS PETITS ÉCRANS ============ */
|
| 799 |
+
@media (max-width: 480px) {
|
| 800 |
+
.hero-name {
|
| 801 |
+
font-size: 1.8rem;
|
| 802 |
+
}
|
| 803 |
+
|
| 804 |
+
.page-title {
|
| 805 |
+
font-size: 1.5rem;
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
.metrics {
|
| 809 |
+
gap: 0.8rem;
|
| 810 |
+
}
|
| 811 |
+
|
| 812 |
+
.metric-value {
|
| 813 |
+
font-size: 1.5rem;
|
| 814 |
+
}
|
| 815 |
+
|
| 816 |
+
.metric-label {
|
| 817 |
+
font-size: 0.85rem;
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
.contact-form-wrapper {
|
| 821 |
+
padding: 1rem;
|
| 822 |
+
}
|
| 823 |
+
}
|
static/js/script.js
CHANGED
|
@@ -1,40 +1,92 @@
|
|
| 1 |
-
// Navigation entre les pages
|
| 2 |
document.addEventListener("DOMContentLoaded", function() {
|
| 3 |
const navButtons = document.querySelectorAll(".nav-btn");
|
| 4 |
const pages = document.querySelectorAll(".page");
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
navButtons.forEach(button => {
|
| 7 |
button.addEventListener("click", function() {
|
| 8 |
// Retirer la classe active de tous les boutons
|
| 9 |
navButtons.forEach(btn => btn.classList.remove("active"));
|
| 10 |
-
|
| 11 |
// Ajouter la classe active au bouton cliqué
|
| 12 |
this.classList.add("active");
|
| 13 |
-
|
| 14 |
// Cacher toutes les pages
|
| 15 |
pages.forEach(page => page.classList.remove("active"));
|
| 16 |
-
|
| 17 |
// Afficher la page correspondante
|
| 18 |
const pageId = this.getAttribute("data-page");
|
| 19 |
document.getElementById(pageId).classList.add("active");
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
// Scroll vers le haut
|
| 22 |
window.scrollTo({ top: 0, behavior: "smooth" });
|
| 23 |
-
|
| 24 |
// Réinitialiser les animations pour la nouvelle page
|
| 25 |
setTimeout(() => {
|
| 26 |
initScrollAnimations();
|
| 27 |
}, 100);
|
| 28 |
});
|
| 29 |
});
|
| 30 |
-
|
| 31 |
// Initialiser les animations au chargement
|
| 32 |
initScrollAnimations();
|
| 33 |
});
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
// Fonction pour détecter les éléments visibles et les animer
|
| 36 |
function initScrollAnimations() {
|
| 37 |
-
const animatedElements = document.querySelectorAll('.animate-on-scroll, .animate-from-left, .animate-from-right, .animate-zoom');
|
| 38 |
|
| 39 |
const observer = new IntersectionObserver((entries) => {
|
| 40 |
entries.forEach(entry => {
|
|
@@ -46,30 +98,31 @@ function initScrollAnimations() {
|
|
| 46 |
threshold: 0.1,
|
| 47 |
rootMargin: '0px 0px -50px 0px'
|
| 48 |
});
|
| 49 |
-
|
| 50 |
animatedElements.forEach(element => {
|
| 51 |
// Retirer la classe animated pour réinitialiser
|
| 52 |
element.classList.remove('animated');
|
| 53 |
observer.observe(element);
|
| 54 |
});
|
| 55 |
}
|
|
|
|
| 56 |
// Gestion du formulaire de contact
|
| 57 |
document.addEventListener("DOMContentLoaded", function() {
|
| 58 |
const form = document.getElementById("contact-form");
|
| 59 |
const status = document.getElementById("form-status");
|
| 60 |
-
|
| 61 |
if (form) {
|
| 62 |
form.addEventListener("submit", async function(e) {
|
| 63 |
e.preventDefault();
|
| 64 |
-
|
| 65 |
const formData = new FormData(form);
|
| 66 |
const submitBtn = form.querySelector(".submit-btn");
|
| 67 |
const originalBtnText = submitBtn.textContent;
|
| 68 |
-
|
| 69 |
// Désactiver le bouton pendant l'envoi
|
| 70 |
submitBtn.disabled = true;
|
| 71 |
submitBtn.textContent = "Envoi en cours... ⏳";
|
| 72 |
-
|
| 73 |
try {
|
| 74 |
const response = await fetch(form.action, {
|
| 75 |
method: form.method,
|
|
@@ -78,28 +131,23 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
| 78 |
'Accept': 'application/json'
|
| 79 |
}
|
| 80 |
});
|
| 81 |
-
|
| 82 |
if (response.ok) {
|
| 83 |
status.className = "success";
|
| 84 |
status.textContent = "✅ Message envoyé avec succès ! Je vous répondrai bientôt.";
|
| 85 |
form.reset();
|
| 86 |
} else {
|
| 87 |
status.className = "error";
|
| 88 |
-
status.textContent = "❌
|
| 89 |
}
|
| 90 |
} catch (error) {
|
| 91 |
status.className = "error";
|
| 92 |
-
status.textContent = "❌ Erreur réseau.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
}
|
| 94 |
-
|
| 95 |
-
// Réactiver le bouton
|
| 96 |
-
submitBtn.disabled = false;
|
| 97 |
-
submitBtn.textContent = originalBtnText;
|
| 98 |
-
|
| 99 |
-
// Masquer le message après 5 secondes
|
| 100 |
-
setTimeout(() => {
|
| 101 |
-
status.style.display = "none";
|
| 102 |
-
}, 5000);
|
| 103 |
});
|
| 104 |
}
|
| 105 |
});
|
|
|
|
| 1 |
+
// Navigation entre les pages
|
| 2 |
document.addEventListener("DOMContentLoaded", function() {
|
| 3 |
const navButtons = document.querySelectorAll(".nav-btn");
|
| 4 |
const pages = document.querySelectorAll(".page");
|
| 5 |
+
const sidebar = document.getElementById("sidebar");
|
| 6 |
+
|
| 7 |
+
// Créer le bouton hamburger
|
| 8 |
+
createMobileMenuButton();
|
| 9 |
|
| 10 |
navButtons.forEach(button => {
|
| 11 |
button.addEventListener("click", function() {
|
| 12 |
// Retirer la classe active de tous les boutons
|
| 13 |
navButtons.forEach(btn => btn.classList.remove("active"));
|
| 14 |
+
|
| 15 |
// Ajouter la classe active au bouton cliqué
|
| 16 |
this.classList.add("active");
|
| 17 |
+
|
| 18 |
// Cacher toutes les pages
|
| 19 |
pages.forEach(page => page.classList.remove("active"));
|
| 20 |
+
|
| 21 |
// Afficher la page correspondante
|
| 22 |
const pageId = this.getAttribute("data-page");
|
| 23 |
document.getElementById(pageId).classList.add("active");
|
| 24 |
+
|
| 25 |
+
// Sur mobile, fermer la sidebar après clic
|
| 26 |
+
if (window.innerWidth <= 768) {
|
| 27 |
+
sidebar.classList.remove("active");
|
| 28 |
+
const menuToggle = document.querySelector(".menu-toggle");
|
| 29 |
+
if (menuToggle) {
|
| 30 |
+
menuToggle.classList.remove("active");
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
// Scroll vers le haut
|
| 35 |
window.scrollTo({ top: 0, behavior: "smooth" });
|
| 36 |
+
|
| 37 |
// Réinitialiser les animations pour la nouvelle page
|
| 38 |
setTimeout(() => {
|
| 39 |
initScrollAnimations();
|
| 40 |
}, 100);
|
| 41 |
});
|
| 42 |
});
|
| 43 |
+
|
| 44 |
// Initialiser les animations au chargement
|
| 45 |
initScrollAnimations();
|
| 46 |
});
|
| 47 |
|
| 48 |
+
// Fonction pour créer le bouton hamburger mobile
|
| 49 |
+
function createMobileMenuButton() {
|
| 50 |
+
const menuToggle = document.createElement("button");
|
| 51 |
+
menuToggle.className = "menu-toggle";
|
| 52 |
+
menuToggle.innerHTML = `
|
| 53 |
+
<span></span>
|
| 54 |
+
<span></span>
|
| 55 |
+
<span></span>
|
| 56 |
+
`;
|
| 57 |
+
|
| 58 |
+
document.body.appendChild(menuToggle);
|
| 59 |
+
|
| 60 |
+
const sidebar = document.getElementById("sidebar");
|
| 61 |
+
|
| 62 |
+
// Toggle menu au clic
|
| 63 |
+
menuToggle.addEventListener("click", function() {
|
| 64 |
+
this.classList.toggle("active");
|
| 65 |
+
sidebar.classList.toggle("active");
|
| 66 |
+
});
|
| 67 |
+
|
| 68 |
+
// Fermer le menu si on clique en dehors
|
| 69 |
+
document.addEventListener("click", function(e) {
|
| 70 |
+
if (window.innerWidth <= 768) {
|
| 71 |
+
if (!sidebar.contains(e.target) && !menuToggle.contains(e.target)) {
|
| 72 |
+
sidebar.classList.remove("active");
|
| 73 |
+
menuToggle.classList.remove("active");
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
});
|
| 77 |
+
|
| 78 |
+
// Gérer le redimensionnement de la fenêtre
|
| 79 |
+
window.addEventListener("resize", function() {
|
| 80 |
+
if (window.innerWidth > 768) {
|
| 81 |
+
sidebar.classList.remove("active");
|
| 82 |
+
menuToggle.classList.remove("active");
|
| 83 |
+
}
|
| 84 |
+
});
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
// Fonction pour détecter les éléments visibles et les animer
|
| 88 |
function initScrollAnimations() {
|
| 89 |
+
const animatedElements = document.querySelectorAll('.animate-on-scroll, .animate-from-left, .animate-from-right, .animate-zoom');
|
| 90 |
|
| 91 |
const observer = new IntersectionObserver((entries) => {
|
| 92 |
entries.forEach(entry => {
|
|
|
|
| 98 |
threshold: 0.1,
|
| 99 |
rootMargin: '0px 0px -50px 0px'
|
| 100 |
});
|
| 101 |
+
|
| 102 |
animatedElements.forEach(element => {
|
| 103 |
// Retirer la classe animated pour réinitialiser
|
| 104 |
element.classList.remove('animated');
|
| 105 |
observer.observe(element);
|
| 106 |
});
|
| 107 |
}
|
| 108 |
+
|
| 109 |
// Gestion du formulaire de contact
|
| 110 |
document.addEventListener("DOMContentLoaded", function() {
|
| 111 |
const form = document.getElementById("contact-form");
|
| 112 |
const status = document.getElementById("form-status");
|
| 113 |
+
|
| 114 |
if (form) {
|
| 115 |
form.addEventListener("submit", async function(e) {
|
| 116 |
e.preventDefault();
|
| 117 |
+
|
| 118 |
const formData = new FormData(form);
|
| 119 |
const submitBtn = form.querySelector(".submit-btn");
|
| 120 |
const originalBtnText = submitBtn.textContent;
|
| 121 |
+
|
| 122 |
// Désactiver le bouton pendant l'envoi
|
| 123 |
submitBtn.disabled = true;
|
| 124 |
submitBtn.textContent = "Envoi en cours... ⏳";
|
| 125 |
+
|
| 126 |
try {
|
| 127 |
const response = await fetch(form.action, {
|
| 128 |
method: form.method,
|
|
|
|
| 131 |
'Accept': 'application/json'
|
| 132 |
}
|
| 133 |
});
|
| 134 |
+
|
| 135 |
if (response.ok) {
|
| 136 |
status.className = "success";
|
| 137 |
status.textContent = "✅ Message envoyé avec succès ! Je vous répondrai bientôt.";
|
| 138 |
form.reset();
|
| 139 |
} else {
|
| 140 |
status.className = "error";
|
| 141 |
+
status.textContent = "❌ Une erreur s'est produite. Réessayez ou contactez-moi directement par email.";
|
| 142 |
}
|
| 143 |
} catch (error) {
|
| 144 |
status.className = "error";
|
| 145 |
+
status.textContent = "❌ Erreur réseau. Vérifiez votre connexion et réessayez.";
|
| 146 |
+
} finally {
|
| 147 |
+
// Réactiver le bouton
|
| 148 |
+
submitBtn.disabled = false;
|
| 149 |
+
submitBtn.textContent = originalBtnText;
|
| 150 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
});
|
| 152 |
}
|
| 153 |
});
|