/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    font-size: clamp(12px, 2.4vw, 14px);
    background: #ffffff;
    min-width: 150px;

}

/* Mode sombre */
body.dark h3 {
  color: #ffffff !important;
}

body.dark input{
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #475569 !important;
}

body.dark textarea{
    background: #1e293b !important;
        color: #ffffff !important;
    border: 1px solid #475569 !important;


}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(8px, 3vw, 20px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 clamp(8px, 3vw, 2rem);
    gap: 0.5rem;
}

.nav-logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #2563eb;
}

/* Underline animé */
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 100%;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: clamp(0.3rem, 1.5vw, 0.5rem);
    z-index: 1001;
    min-width: 32px;
    min-height: 32px;
    align-items: center;
    justify-content: center;
}

.bar {
    width: clamp(20px, 5vw, 25px);
    height: clamp(2px, 0.6vw, 3px);
    background: #1e293b;
    margin: clamp(2px, 0.5vw, 3px) 0;
    transition: 0.3s ease;
    border-radius: 2px;
}

/* Section Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #ffffff;
    color: white;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

/* Améliore le contraste en mode clair: voile sombre sur le dégradé */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.18) 65%, rgba(0, 0, 0, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 3;
}

/* Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-badge i {
    color: #fbbf24;
}

/* Contenu hero */
.hero-title {
    font-size: clamp(1.6rem, 1.2rem + 2.2vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    color: #bac0c7;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.6rem;
    color: #aeaeae;
    line-height: 1.8;

}

.hero-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
    margin-bottom: 1.6rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #aeaeae;
    /* text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); */
}

.feature-item i {
    color: #fbbf24;
    font-size: 0.8rem;
}

.hero-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn {
    padding: 9px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: none;
    cursor: pointer;
    font-size: 0.88rem;
}

.btn-primary {
    background: #fbbf24;
    color: #111827;
}

.btn-primary:hover {
    background: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(251, 191, 36, 0.25);
}

.btn-secondary {
    background: transparent;
    color: #111827;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #111827;
    border: 2px solid rgb(52, 50, 50);
    transform: translateY(-1px);
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.45rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.72rem;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Card */
.profile-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.6rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.profile-avatar i {
    font-size: 3.2rem;
    color: #fbbf24;
    margin-bottom: 0.7rem;
}

.profile-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.profile-info p {
    color: rgb(179, 180, 181);
    margin-bottom: 0.7rem;
    font-size: 0.88rem;
}

.profile-location,
.profile-education {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    color: #d1d5db;
}

.profile-location i,
.profile-education i {
    color: #fbbf24;
    font-size: 0.7rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.7rem;
}

.social-link {
    color: white;
    font-size: 0.95rem;
    padding: 0.45rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.social-link:hover {
    color: #fbbf24;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Floating Card (sans animation) */

.floating-card {
    position: absolute;
    top: -20px;
    right: -20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.9rem;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #1f2937;
}

.floating-card .card-icon {
    background: #2563eb;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.floating-card .card-content h4 {
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.floating-card .card-content p {
    font-size: 0.72rem;
    color: #6b7280;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
}

.scroll-text {
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-arrow {
    font-size: 1.1rem;
    color: #fbbf24;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-8px);
    }

    60% {
        transform: translateY(-4px);
    }
}

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    /* display: flex;
    grid-template-columns: 1fr 1fr; */
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}
body.dark .footer-section p {
    color: #94a3b8;
}
 

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }

    51%, 100% {
        border-color: #fbbf24;
    }
}

/* Classes d'animation */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid #fbbf24;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Animations au survol */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.6);
}

/* Animations d'entrée avec délai */
.stagger-animation>* {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

/* Animations de chargement */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Animations de particules flottantes */
.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(251, 191, 36, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.floating-particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 30%;
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 40%;
    animation-delay: 1s;
}

.floating-particle:nth-child(5) {
    left: 50%;
    animation-delay: 3s;
}

/* Sections générales */
.section-title {
    text-align: center;
    font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem);
    font-weight: 700;
    margin-bottom: 2.6rem;
    color: #1f2937;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #fbbf24);
    border-radius: 2px;
}

/* Dark mode amélioré */
.dark body,
body.dark {
    background: #0a0f1a;
    color: #e2e8f0;
}

body.dark .navbar {
    background: rgba(10, 15, 26, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .navbar.scrolled {
    background: rgba(10, 15, 26, 0.98);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

body.dark .nav-link {
    color: #cbd5e1;
}

body.dark .nav-link:hover {
    color: #60a5fa;
}

body.dark .nav-link::after {
    background: #60a5fa;
}

body.dark .theme-toggle {
    background: #1e293b;
    color: #e2e8f0;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark .theme-toggle:hover {
    background: #334155;
    border-color: rgba(59, 130, 246, 0.4);
}

body.dark .hero {
    background: #0a0f1a;
}

body.dark .hero::before {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

body.dark .btn-secondary {
    color: #e2e8f0;
    border-color: #e2e8f0;
}

body.dark .btn-secondary:hover {
    background: #e2e8f0;
    color: #0a0f1a;
}

body.dark .profile-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(59, 130, 246, 0.2);
    backdrop-filter: blur(20px);
}

body.dark .floating-card {
    background: rgba(30, 41, 59, 0.95);
    color: #e2e8f0;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

body.dark .floating-card .card-content p {
    color: #94a3b8;
}

body.dark .about {
    background: #0f172a;
}

body.dark .skills {
    background: #0a0f1a;
}

body.dark .projects {
    background: #0f172a;
}

body.dark .experience {
    background: #0a0f1a;
}

body.dark .contact {
    background: #0f172a;
}

body.dark .contact-item,
body.dark .contact-form,
body.dark .stat-card,
body.dark .skill-category,
body.dark .project-card,
body.dark .timeline-content,
body.dark .detail-item {
    background: #1e293b;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .skill-category {
    border-left-color: #60a5fa;
}

body.dark .skill-category h3 i {
    color: #60a5fa;
}

body.dark .skill-bar {
    background: #334155;
}

body.dark .skill-progress {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

body.dark .project-image {
    background: linear-gradient(135deg, #1e293b, #334155);
}

body.dark .tech-tag {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

body.dark .timeline::before {
    background: #334155;
}

body.dark .timeline-content::before {
    background: #60a5fa;
}

body.dark .timeline-date {
    background: #60a5fa;
    color: #0a0f1a;
}

body.dark .timeline-content h4 {
    color: #60a5fa;
}

body.dark .timeline-content li::before {
    color: #60a5fa;
}

body.dark .section-title {
    color: #e2e8f0;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #60a5fa, #fbbf24);
}

body.dark .stat-card h3 {
    color: #60a5fa;
}

body.dark .stat-card p {
    color: #94a3b8;
}

body.dark .detail-item i,
body.dark .contact-item i {
    color: #60a5fa;
}

body.dark .contact-item h4 {
    color: #e2e8f0;
}

body.dark .contact-item p {
    color: #94a3b8;
}

body.dark .contact-item .social-link {
    color: #60a5fa;
}

body.dark .contact-item .social-link:hover {
    color: #93c5fd;
}

body.dark .footer {
    background: #0a0f1a;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

body.dark .footer-section h3,
body.dark .footer-section h4 {
    color: #fbbf24;
}

body.dark .footer-section a {
    color: #94a3b8;
}

body.dark .footer-section a:hover {
    color: #fbbf24;
}

body.dark .footer-bottom {
    color: #64748b;
    border-top-color: #1e293b;
}

/* À Propos */
.about {
    padding: 4rem 0;
    background: #f8fafc;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-details {
    margin-top: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-item i {
    color: #2563eb;
    font-size: 1rem;
    width: 20px;
}

.about-stats {
    display: grid;
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: #6b7280;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Compétences */
.skills {
    padding: 4rem 0;
    background: white;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #2563eb;
}

.skill-category h3 {
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.skill-category h3 i {
    color: #2563eb;
}

.skill-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.skill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.skill-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
    font-size: 0.9rem;
}

.skill-bar {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 1s ease;
}

/* Projets */
.projects {
    padding: 4rem 0;
    background: #f8fafc;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.project-image {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 2.4rem;
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.08rem;
}

.project-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Expérience */
.experience {
    padding: 4rem 0;
    background: white;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 3rem;
    position: relative;
}

.timeline-content {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-left: 2rem;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border-radius: 50%;
    transform: translateY(-50%);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.timeline-header h3 {
    color: #1f2937;
    font-size: 1rem;
}

.timeline-date {
    background: #2563eb;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: #2563eb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.timeline-content ul {
    list-style: none;
    padding-left: 0;
}

.timeline-content li {
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.85rem;
}

.timeline-content li::before {
    content: '•';
    color: #2563eb;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Contact */
.contact {
    padding: 4rem 0;
    background: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    color: #2563eb;
    font-size: 1.2rem;
    margin-top: 0.25rem;
}

.contact-item h4 {
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-item p {
    color: #6b7280;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.contact-item .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.contact-item .social-link {
    color: #2563eb;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.contact-item .social-link:hover {
    color: #1d4ed8;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Responsive: grands écrans */
@media (min-width: 1280px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1280px;
    }

    .hero-container {
        gap: 5rem;
    }
}

@media (min-width: 1536px) {

    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }

    .project-image {
        height: 140px;
    }

    .hero::before {
        height: 45vh;
    }
}

/* Navigation mobile */
@media (max-width: 870px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: clamp(1rem, 4vw, 2rem) 0;
        z-index: 1000;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        min-height: 200px;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: clamp(0.3rem, 1.5vw, 0.5rem) 0;
    }

    .nav-link {
        display: block;
        padding: clamp(0.5rem, 2vw, 0.75rem) clamp(0.5rem, 2vw, 1rem);
        font-size: clamp(0.85rem, 3vw, 1rem);
        border-radius: 8px;
        margin: 0 clamp(0.5rem, 2vw, 1rem);
        transition: all 0.2s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-link:hover {
        background: rgba(37, 99, 235, 0.1);
        color: #2563eb;
    }

    .nav-link::after {
        display: none;
    }

    .nav-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .theme-toggle {
        margin-right: clamp(0.3rem, 1.5vw, 0.5rem);
        flex-shrink: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.1rem;
    }

    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .hero-stats {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        margin-left: 3rem;
    }

    .timeline-content::before {
        left: -15px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
    }
}

/* Très petits écrans - 480px et moins */
@media (max-width: 480px) {
    .navbar {
        padding: clamp(0.3rem, 2vw, 0.5rem) 0;
    }

    .nav-container {
        padding: 0 clamp(8px, 3vw, 15px);
        gap: clamp(0.3rem, 1.5vw, 0.5rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.8rem, 4vw, 1rem);
        min-width: 60px;
    }

    .nav-menu {
        top: 65px;
        padding: clamp(1rem, 3vw, 1.5rem) 0;
    }

    .nav-link {
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
        margin: 0 clamp(0.5rem, 2vw, 0.8rem);
    }

    .theme-toggle {
        width: clamp(32px, 8vw, 36px);
        height: clamp(32px, 8vw, 36px);
        font-size: clamp(0.8rem, 2.5vw, 0.9rem);
        flex-shrink: 0;
    }

    .container {
        padding: 0 clamp(8px, 3vw, 15px);
    }

    .hero-title {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.6rem);
    }

    .btn {
        padding: clamp(6px, 2.5vw, 8px) clamp(12px, 4vw, 16px);
        font-size: clamp(0.75rem, 2.5vw, 0.8rem);
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.8rem, 3vw, 1rem);
    }
}

/* Écrans ultra-petits - 360px et moins */
@media (max-width: 360px) {
    .container {
        padding: 0 clamp(8px, 2.5vw, 12px);
    }

    .nav-logo h2 {
        font-size: clamp(0.75rem, 3.5vw, 0.98rem);
        min-width: 50px;
    }

    .theme-toggle {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        border-radius: 9px;
    }

    .hamburger .bar {
        width: clamp(18px, 4.5vw, 22px);
        height: clamp(2px, 0.5vw, 2.5px);
    }

    .nav-menu {
        top: clamp(60px, 15vw, 64px);
        max-height: calc(100vh - clamp(60px, 15vw, 64px));
        overflow-y: auto;
    }

    .hero::before {
        height: 70vh;
    }

    .hero-container {
        gap: clamp(1rem, 3vw, 1.4rem);
    }

    .hero-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
        line-height: 1.25;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
    }

    .hero-description {
        font-size: clamp(0.75rem, 2.5vw, 0.9rem);
    }

    .hero-features {
        gap: clamp(0.4rem, 1.5vw, 0.6rem) clamp(0.5rem, 2vw, 0.8rem);
    }

    .feature-item {
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
    }

    .feature-item i {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
    }

    .btn {
        padding: clamp(5px, 2vw, 7px) clamp(10px, 3vw, 14px);
        font-size: clamp(0.65rem, 2.5vw, 0.78rem);
        border-radius: 9px;
    }

    .hero-stats {
        gap: clamp(0.6rem, 2.5vw, 1rem);
    }

    .stat-number {
        font-size: clamp(0.9rem, 3.5vw, 1.15rem);
    }

    .stat-label {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .scroll-indicator {
        display: none;
    }

    .profile-card {
        padding: clamp(0.8rem, 3vw, 1.2rem);
    }

    .profile-avatar i {
        font-size: clamp(2rem, 6vw, 2.6rem);
    }

    .profile-info h3 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
    }

    .profile-info p {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }

    .profile-location,
    .profile-education {
        font-size: clamp(0.6rem, 2.5vw, 0.76rem);
    }

    .floating-card {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
        padding: clamp(0.5rem, 2vw, 0.75rem);
    }

    .floating-card .card-icon {
        width: clamp(28px, 7vw, 32px);
        height: clamp(28px, 7vw, 32px);
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .floating-card .card-content h4 {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    .floating-card .card-content p {
        font-size: clamp(0.55rem, 2.5vw, 0.68rem);
    }

    .section-title {
        font-size: clamp(1.2rem, 4.5vw, 1.5rem);
        margin-bottom: clamp(1.5rem, 4vw, 2rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }

    .timeline::before {
        left: clamp(12px, 3vw, 16px);
    }

    .timeline-content {
        margin-left: clamp(2rem, 5vw, 2.5rem);
    }

    .timeline-date {
        font-size: clamp(0.6rem, 2.5vw, 0.7rem);
    }

    .timeline-content h4 {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }

    .timeline-content li {
        font-size: clamp(0.65rem, 2.5vw, 0.8rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
        padding: clamp(0.5rem, 2vw, 0.7rem);
    }

    .footer-section a {
        font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    }
}

/* Écrans ultra-petits - 320px et moins */
@media (max-width: 320px) {
    .container {
        padding: 0 clamp(6px, 2vw, 10px);
    }

    .nav-logo h2 {
        font-size: clamp(0.65rem, 3vw, 0.92rem);
        min-width: 45px;
    }

    .theme-toggle {
        width: clamp(24px, 6vw, 28px);
        height: clamp(24px, 6vw, 28px);
    }

    .hamburger .bar {
        width: clamp(16px, 4vw, 20px);
        height: clamp(1.8px, 0.4vw, 2.4px);
    }

    .nav-menu {
        top: clamp(55px, 14vw, 60px);
        max-height: calc(100vh - clamp(55px, 14vw, 60px));
    }

    .hero::before {
        height: 75vh;
    }

    .hero-title {
        font-size: clamp(1.1rem, 4.5vw, 1.45rem);
        word-break: break-word;
    }

    .hero-subtitle {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    }

    .hero-description {
        font-size: clamp(0.65rem, 2.5vw, 0.86rem);
    }

    .btn {
        padding: clamp(4px, 1.5vw, 6px) clamp(8px, 2.5vw, 12px);
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        border-radius: 8px;
    }

    .stat-number {
        font-size: clamp(0.8rem, 3vw, 1.05rem);
    }

    .stat-label {
        font-size: clamp(0.5rem, 2vw, 0.64rem);
    }

    .profile-card {
        padding: clamp(0.6rem, 2.5vw, 1rem);
    }

    .profile-avatar i {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
    }

    .section-title {
        font-size: clamp(1.1rem, 4vw, 1.4rem);
    }

    .project-image i {
        font-size: clamp(1.6rem, 4.5vw, 2rem);
    }

    .tech-tag {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
        padding: clamp(0.15rem, 0.5vw, 0.18rem) clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .form-group input,
    .form-group textarea {
        font-size: clamp(0.65rem, 2.5vw, 0.82rem);
    }
}

/* Écrans ultra-petits - 150px et moins */
@media (max-width: 150px) {
    body {
        font-size: clamp(10px, 2vw, 12px);
        min-width: 150px;
    }

    .container {
        padding: 0 clamp(4px, 1.5vw, 6px);
    }

    .navbar {
        padding: clamp(0.2rem, 1.5vw, 0.3rem) 0;
    }

    .nav-container {
        padding: 0 clamp(4px, 1.5vw, 8px);
        gap: clamp(0.2rem, 1vw, 0.3rem);
    }

    .nav-logo h2 {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        min-width: 40px;
    }

    .theme-toggle {
        width: clamp(20px, 5vw, 24px);
        height: clamp(20px, 5vw, 24px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
    }

    .hamburger {
        padding: clamp(0.2rem, 1vw, 0.3rem);
        min-width: 28px;
        min-height: 28px;
    }

    .hamburger .bar {
        width: clamp(14px, 3.5vw, 16px);
        height: clamp(1.5px, 0.3vw, 1.8px);
        margin: clamp(1.5px, 0.4vw, 2px) 0;
    }

    .nav-menu {
        top: clamp(50px, 12vw, 55px);
        max-height: calc(100vh - clamp(50px, 12vw, 55px));
        padding: clamp(0.6rem, 2.5vw, 1rem) 0;
    }

    .nav-link {
        font-size: clamp(0.55rem, 2.5vw, 0.65rem);
        padding: clamp(0.3rem, 1.5vw, 0.4rem) clamp(0.3rem, 1.5vw, 0.4rem);
        margin: 0 clamp(0.3rem, 1.5vw, 0.4rem);
    }

    .hero-container {
        gap: clamp(0.6rem, 2vw, 1rem);
        padding: 0 clamp(4px, 1.5vw, 8px);
    }

    .hero-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: clamp(0.6rem, 2vw, 0.7rem);
    }

    .hero-description {
        font-size: clamp(0.55rem, 2vw, 0.65rem);
    }

    .btn {
        padding: clamp(3px, 1vw, 4px) clamp(6px, 2vw, 8px);
        font-size: clamp(0.5rem, 2vw, 0.6rem);
        border-radius: 6px;
    }

    .hero-stats {
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .stat-number {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .stat-label {
        font-size: clamp(0.45rem, 1.5vw, 0.5rem);
    }

    .profile-card {
        padding: clamp(0.4rem, 2vw, 0.6rem);
    }

    .profile-avatar i {
        font-size: clamp(1.4rem, 4vw, 1.8rem);
    }

    .section-title {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
        margin-bottom: clamp(1rem, 3vw, 1.5rem);
    }

    .about,
    .skills,
    .projects,
    .experience,
    .contact {
        padding: clamp(1.5rem, 4vw, 2rem) 0;
    }
}

/* Réduction des animations si demandé */
@media (prefers-reduced-motion: reduce) {
    .scroll-arrow {
        animation: none !important;
    }

    .fade-in-up {
        animation: none !important;
    }

    * {
        transition-duration: 0s !important;
        animation-duration: 0s !important;
    }
}

/* Reveals utilitaires */
.reveal {
    opacity: 0;
    transform: translateY(16px);
}

.reveal.show {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 500ms ease, transform 500ms ease;
}

/* Médias fluides */
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prévention des débordements très petits écrans */
@media (max-width: 150px) {
    * {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: clamp(0.4rem, 1.5vw, 0.6rem);
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .hero-buttons {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: clamp(0.3rem, 1vw, 0.4rem);
    }

    .stat-item {
        text-align: center;
        width: 100%;
    }

    .floating-card {
        position: relative;
        top: 0;
        right: 0;
        margin-top: clamp(0.4rem, 1.5vw, 0.6rem);
        width: 100%;
        max-width: none;
    }

    .profile-card {
        width: 100%;
        max-width: none;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: clamp(0.8rem, 2.5vw, 1rem);
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: clamp(1rem, 3vw, 2rem);
    }

    .timeline::before {
        left: clamp(8px, 2vw, 12px);
    }

    .timeline-content {
        margin-left: clamp(1.5rem, 4vw, 2rem);
    }
}
 

/* Nouvelles animations CSS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

 
/* Force contact section container to full width */
.contact .container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* full-width contact override */
.contact{width:100
/* full-width contact override */
.contact{width:100%;}
.contact .container{max-width:100%;padding:0;}

/* responsive stack for contact */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}
