/* Variables de couleur et base */
:root {
    --primary-color: #3c94e7;
    --secondary-color: #333;
    --background-light: #f7f7f7;
    --background-dark: #1e1e1e;
    --text-light: #333;
    --text-dark: #f0f0f0;
    --card-bg-light: #ffffff;
    --card-bg-dark: #2a2a2a;
    --border-color-light: #eee;
    --border-color-dark: #444;
    --animation-speed: 0.3s;
    --animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base pour le thème clair */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 60px; /* Espace pour le header fixe */
    background-color: var(--background-light);
    color: var(--text-light);
    transition: background-color 0.3s, color 0.3s;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Thème sombre (activé par JS) */
body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-dark);
}
body.dark-mode .header {
    background-color: var(--background-dark);
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}
body.dark-mode a { color: var(--text-dark); }
body.dark-mode .nav-links a:hover { color: var(--primary-color); }
body.dark-mode .skill-card, body.dark-mode .project-card, body.dark-mode .tech-item {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}
body.dark-mode input, body.dark-mode textarea {
    background-color: #383838;
    color: var(--text-dark);
    border-color: var(--border-color-dark);
}

/* Conteneur général */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typographie et Sections */
.section-title {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 1.5em;
    text-transform: uppercase;
    font-weight: 800;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease-out;
}
.section-title.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-out forwards;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 20px auto 0;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.6s ease-out;
}
.section-title.animate-in::after {
    opacity: 1;
    transform: scaleX(1);
}
.section-title span {
    color: var(--primary-color);
}
.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Boutons génériques */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: all var(--animation-speed) var(--animation-easing);
    display: inline-block;
    position: relative;
    overflow: hidden;
}
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}
.btn-primary {
    background-color: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    opacity: 0.9;
}
.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}
body.dark-mode .btn-secondary {
    color: var(--text-dark);
    border-color: var(--text-dark);
}
.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}
body.dark-mode .btn-secondary:hover {
    background-color: var(--text-dark);
    color: var(--background-dark);
}

/* 1. Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--card-bg-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all var(--animation-speed) var(--animation-easing);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}
body.dark-mode .header {
    background-color: rgba(30, 30, 30, 0.95);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}
.logo {
    font-weight: bold;
    font-size: 1.5em;
    color: var(--primary-color);
    transition: transform var(--animation-speed) var(--animation-easing);
    cursor: pointer;
    position: relative;
}
.logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--animation-speed) var(--animation-easing);
}
.logo:hover::after {
    width: 100%;
}
.nav-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: all var(--animation-speed) var(--animation-easing);
    position: relative;
    padding: 5px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--animation-speed) var(--animation-easing);
}
.nav-links a:hover::after {
    width: 100%;
}
.nav-links a:hover {
    color: var(--primary-color);
}

/* Menu burger mobile */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

body.dark-mode .mobile-menu-toggle span {
    background-color: var(--text-dark);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.contact-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    white-space: nowrap;
}

.contact-btn .contact-text {
    display: inline;
}
/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 100;
}

/* Language Selector */
.language-selector {
    position: relative;
    z-index: 1001;
}

.lang-toggle-btn {
    background: rgba(60, 148, 231, 0.1);
    border: 1px solid rgba(60, 148, 231, 0.2);
    color: var(--secondary-color);
    font-size: 0.9em;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all var(--animation-speed) var(--animation-easing);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

body.dark-mode .lang-toggle-btn {
    color: var(--text-dark);
    background: rgba(60, 148, 231, 0.15);
    border-color: rgba(60, 148, 231, 0.3);
}

.lang-toggle-btn:hover {
    background-color: rgba(60, 148, 231, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(60, 148, 231, 0.3);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background-color: var(--card-bg-light);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--animation-speed) var(--animation-easing);
    z-index: 1002;
    min-width: 160px;
    overflow: hidden;
    border: 1px solid var(--border-color-light);
}

body.dark-mode .lang-dropdown {
    background-color: var(--card-bg-dark);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--border-color-dark);
}

.language-selector:hover .lang-dropdown,
.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text-light);
    transition: all var(--animation-speed) var(--animation-easing);
    font-size: 0.9em;
}

body.dark-mode .lang-option {
    color: var(--text-dark);
}

.lang-option:hover {
    background-color: rgba(60, 148, 231, 0.1);
    color: var(--primary-color);
}

.theme-toggle-btn {
    background: rgba(60, 148, 231, 0.1);
    border: 1px solid rgba(60, 148, 231, 0.2);
    color: var(--secondary-color);
    font-size: 1.1em;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all var(--animation-speed) var(--animation-easing);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

body.dark-mode .theme-toggle-btn {
    color: var(--text-dark);
    background: rgba(60, 148, 231, 0.15);
    border-color: rgba(60, 148, 231, 0.3);
}

.theme-toggle-btn:hover {
    background-color: rgba(60, 148, 231, 0.25);
    border-color: var(--primary-color);
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 0 4px 12px rgba(60, 148, 231, 0.3);
}

.theme-toggle-btn:active {
    transform: translateY(0) rotate(0deg);
}

/* 2. Hero Section */
.hero-section {
    background-color: white;
    padding: 100px 0;
    overflow: hidden;
    position: relative;
}
body.dark-mode .hero-section {
    background-color: var(--background-dark);
}
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.text-content {
    opacity: 1;
    animation: fadeInLeft 1s ease-out forwards;
}
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.hero-content h1 .letter-animate {
    display: inline-block;
    opacity: 0;
    animation: letterFadeIn 0.5s ease-out forwards;
}
@keyframes letterFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) rotateX(90deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}
.hero-content h1 {
    font-size: 4em;
    margin: 0 0 10px 0;
    line-height: 1.1;
}
.hero-content h1 span {
    color: var(--primary-color);
}
.tagline {
    font-size: 1.2em;
    margin-bottom: 30px;
}
.hero-actions a {
    margin-right: 15px;
}
 

/* 3. About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

body.dark-mode .about-section {
    background-color: var(--background-dark);
}

.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
}

.illustration {
    flex-shrink: 0;
}

.illustration img {
    max-width: 350px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

body.dark-mode .illustration img {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.illustration img:hover {
    transform: scale(1.05);
}

.about-text {
    max-width: 600px;
    line-height: 1.8;
    font-size: 1.1em;
    color: var(--text-light);
}

body.dark-mode .about-text {
    color: var(--text-dark);
}

/* 4. Skills & Tech Section */
.skills-section {
    padding: 80px 0;
    text-align: center;
}
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}
.skill-card {
    background-color: var(--card-bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: all var(--animation-speed) var(--animation-easing);
    opacity: 1;
    transform: translateY(0);
}
.skill-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out forwards;
}
.skill-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(60, 148, 231, 0.2);
}
.skill-card i {
    transition: transform var(--animation-speed) var(--animation-easing);
}
.skill-card:hover i {
    transform: scale(1.2) rotate(5deg);
}
.skill-card i {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.skill-card h3 {
    margin-top: 0;
}

/* Technologies Grid */
.tech-filter {
    margin-bottom: 40px;
}
.filter-btn {
    background-color: transparent;
    border: 1px solid var(--border-color-light);
    color: var(--text-light);
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}
.tech-filter .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
body.dark-mode .filter-btn {
    border-color: var(--border-color-dark);
    color: var(--text-dark);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}
.tech-item {
    background-color: var(--card-bg-light);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all var(--animation-speed) var(--animation-easing);
    opacity: 1;
    transform: scale(1);
}
.tech-item.animate-in {
    opacity: 1;
    transform: scale(1);
    animation: scaleIn 0.5s ease-out forwards;
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.tech-item img {
    transition: transform var(--animation-speed) var(--animation-easing);
}
.tech-item:hover img {
    transform: scale(1.1);
}
.tech-item img {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}
.tech-item.hidden {
    display: none;
}

/* 5. Projects Section */
.projects-section {
    padding: 80px 0;
    background-color: var(--background-light);
    contain: layout style;
}
body.dark-mode .projects-section {
    background-color: var(--background-dark);
}

/* 6. Blog Section */
.blog-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

body.dark-mode .blog-section {
    background-color: var(--background-dark);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background-color: var(--card-bg-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
}

body.dark-mode .blog-card {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.blog-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(60, 148, 231, 0.3);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #ddd;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(60, 148, 231, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
    opacity: 1;
}

.blog-card-link {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.blog-card-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.blog-card-date {
    color: var(--primary-color);
    font-size: 0.85em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-views {
    color: var(--text-light);
    font-size: 0.85em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(60, 148, 231, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

body.dark-mode .blog-card-views {
    color: var(--text-dark);
    background: rgba(60, 148, 231, 0.2);
}

.blog-card-views i {
    color: var(--primary-color);
    font-size: 0.9em;
}

.blog-card-title {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: 12px;
    line-height: 1.4;
}

body.dark-mode .blog-card-title {
    color: var(--text-dark);
}

.blog-card-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.dark-mode .blog-card-description {
    color: var(--text-dark);
    opacity: 0.9;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color-light);
    flex-wrap: wrap;
    gap: 15px;
}

body.dark-mode .blog-card-footer {
    border-top-color: var(--border-color-dark);
}

.blog-card-read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.blog-card-read-more:hover {
    gap: 12px;
    color: #2d7dd2;
}

.blog-share-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(60, 148, 231, 0.1);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

body.dark-mode .share-btn {
    background: rgba(60, 148, 231, 0.2);
    color: var(--primary-color);
}

.share-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(60, 148, 231, 0.3);
}

.share-btn:nth-child(1):hover {
    background: #1877f2;
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

.share-btn:nth-child(2):hover {
    background: #1da1f2;
    box-shadow: 0 4px 8px rgba(29, 161, 242, 0.3);
}

.share-btn:nth-child(3):hover {
    background: #0077b5;
    box-shadow: 0 4px 8px rgba(0, 119, 181, 0.3);
}

.share-btn:nth-child(4):hover {
    background: #25D366;
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.3);
}

.share-btn:nth-child(5):hover {
    background: #6c757d;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

body.dark-mode .blog-empty {
    color: var(--text-dark);
}

.blog-empty i {
    font-size: 4em;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.5;
}

.blog-empty p {
    font-size: 1.2em;
    margin: 0;
}

/* 7. Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background-color: var(--background-light);
}

body.dark-mode .testimonials-section {
    background-color: var(--background-dark);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.testimonial-card {
    background-color: var(--card-bg-light);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.testimonial-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.6s ease-out forwards;
}

body.dark-mode .testimonial-card {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(60, 148, 231, 0.2);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #2d7dd2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(60, 148, 231, 0.3);
}

.testimonial-info h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-light);
}

body.dark-mode .testimonial-info h4 {
    color: var(--text-dark);
}

.testimonial-role {
    margin: 5px 0 0 0;
    font-size: 0.85em;
    color: var(--primary-color);
    font-weight: 500;
}

.testimonial-rating {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    color: #ffc107;
}

.testimonial-rating i {
    font-size: 0.9em;
}

.testimonial-text {
    font-size: 0.95em;
    line-height: 1.7;
    color: var(--text-light);
    font-style: italic;
    margin: 0;
    position: relative;
    padding-left: 20px;
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 3em;
    color: var(--primary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

body.dark-mode .testimonial-text {
    color: var(--text-dark);
    opacity: 0.9;
}

/* Formulaire d'ajout d'avis */
.testimonial-form-container {
    max-width: 800px;
    margin: 50px auto;
    padding: 40px;
    background-color: var(--card-bg-light);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode .testimonial-form-container {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.testimonial-form-container h3 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 30px;
    color: var(--text-light);
}

body.dark-mode .testimonial-form-container h3 {
    color: var(--text-dark);
}

.testimonial-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.testimonial-form .form-group {
    flex: 1;
    margin-bottom: 20px;
}

.testimonial-form .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
    font-size: 0.95em;
}

body.dark-mode .testimonial-form .form-group label {
    color: var(--text-dark);
}

.testimonial-form input[type="text"],
.testimonial-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color-light);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: var(--card-bg-light);
    color: var(--text-light);
    box-sizing: border-box;
}

body.dark-mode .testimonial-form input[type="text"],
body.dark-mode .testimonial-form textarea {
    background-color: var(--card-bg-dark);
    border-color: var(--border-color-dark);
    color: var(--text-dark);
}

.testimonial-form input[type="text"]:focus,
.testimonial-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(60, 148, 231, 0.1);
}

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

/* Rating Input */
.rating-input {
    display: flex;
    gap: 5px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.rating-input input[type="radio"] {
    display: none;
}

.rating-input .star-label {
    font-size: 2em;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-input .star-label:hover,
.rating-input input[type="radio"]:checked ~ .star-label,
.rating-input input[type="radio"]:checked + .star-label {
    color: #ffc107;
}

.rating-input input[type="radio"]:checked ~ .star-label {
    color: #ffc107;
}

.testimonial-form button[type="submit"] {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 10px;
}

/* Message de succès/erreur */
.testimonial-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.testimonial-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

body.dark-mode .testimonial-message.success {
    background-color: rgba(40, 167, 69, 0.2);
    color: #6cff88;
    border-color: rgba(40, 167, 69, 0.3);
}

.testimonial-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

body.dark-mode .testimonial-message.error {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b7a;
    border-color: rgba(220, 53, 69, 0.3);
}

/* Contrôles de recherche et filtres */
.projects-controls {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.1em;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--border-color-light);
    border-radius: 25px;
    font-size: 1em;
    transition: all var(--animation-speed) var(--animation-easing);
    background-color: var(--card-bg-light);
    color: var(--text-light);
}

body.dark-mode .search-box input {
    border-color: var(--border-color-dark);
    background-color: var(--card-bg-dark);
    color: var(--text-dark);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(60, 148, 231, 0.1);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.filter-buttons .filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color-light);
    border-radius: 20px;
    background-color: var(--card-bg-light);
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--animation-speed) var(--animation-easing);
    font-weight: 500;
    font-size: 0.9em;
}

body.dark-mode .filter-buttons .filter-btn {
    border-color: var(--border-color-dark);
    background-color: var(--card-bg-dark);
    color: var(--text-dark);
}

.filter-buttons .filter-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(60, 148, 231, 0.2);
}

.filter-buttons .filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(60, 148, 231, 0.3);
}

.projects-count {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9em;
    font-weight: 500;
}

body.dark-mode .projects-count {
    color: var(--text-dark);
}

.projects-count #projects-count-text {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.2em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    contain: layout style paint;
}

.projects-grid.no-results::after {
    content: "Aucun projet trouvé";
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 1.2em;
}

body.dark-mode .projects-grid.no-results::after {
    color: var(--text-dark);
}
.project-card {
    background-color: var(--card-bg-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
    position: relative;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

body.dark-mode .project-card {
    background-color: var(--card-bg-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.project-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.project-card.hidden {
    display: none;
}

.project-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 12px 30px rgba(60, 148, 231, 0.3);
}

.project-card:not(:hover) {
    will-change: auto;
}

/* Badge de catégorie */
.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-color), #2d7dd2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.project-badge i {
    font-size: 0.9em;
}
.project-image-placeholder {
    height: 180px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    position: relative;
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    cursor: pointer;
}

.project-image-placeholder:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.project-image-placeholder:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.project-card:hover .project-image-placeholder {
    transform: scale(1.08);
}

.project-card h3, .project-card p, .project-card .tags, .project-card .project-actions {
    padding: 0 20px;
}

.project-card h3 {
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1.4em;
    color: var(--text-light);
}

body.dark-mode .project-card h3 {
    color: var(--text-dark);
}

.project-card p {
    font-size: 0.95em;
    margin-bottom: 12px;
    line-height: 1.5;
    color: var(--text-light);
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    word-wrap: break-word;
}

.project-card p.expanded {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

body.dark-mode .project-card p {
    color: var(--text-dark);
    opacity: 0.8;
}
.project-card .tags {
    margin-bottom: 15px;
    min-height: 30px;
}

.project-card .tags span {
    display: inline-block;
    background: linear-gradient(135deg, rgba(60, 148, 231, 0.1), rgba(60, 148, 231, 0.05));
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(60, 148, 231, 0.2);
    transition: all var(--animation-speed) var(--animation-easing);
}

body.dark-mode .project-card .tags span {
    background: linear-gradient(135deg, rgba(60, 148, 231, 0.2), rgba(60, 148, 231, 0.1));
    border-color: rgba(60, 148, 231, 0.3);
}

.project-card .tags span:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(60, 148, 231, 0.3);
}

.project-description-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.project-read-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.85em;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.project-read-more:hover {
    opacity: 1;
    color: var(--secondary-color);
}

.project-read-more:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

body.dark-mode .project-read-more {
    color: var(--primary-color);
}

body.dark-mode .project-read-more:hover {
    color: var(--secondary-color);
}

/* Responsive pour les boutons "Lire plus" */
@media (max-width: 768px) {
    .project-read-more {
        font-size: 0.8em;
        margin-top: 6px;
    }
}

/* Modal pour les détails du projet */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--animation-speed) var(--animation-easing), visibility var(--animation-speed) var(--animation-easing);
}

.project-modal[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}

.project-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.project-modal-content {
    position: relative;
    background-color: var(--card-bg-light);
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform var(--animation-speed) var(--animation-easing);
    z-index: 10000;
}

.project-modal[aria-hidden="false"] .project-modal-content {
    transform: scale(1) translateY(0);
}

body.dark-mode .project-modal-content {
    background-color: var(--card-bg-dark);
}

.project-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    z-index: 10001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: rotate(90deg);
}

.project-modal-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.project-modal-header {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.project-modal-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
}

body.dark-mode .project-modal-image {
    background-color: #2a2a2a;
}

.project-modal-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color), #2d7dd2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.project-modal-body {
    padding: 30px;
}

.project-modal-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-light);
}

body.dark-mode .project-modal-title {
    color: var(--text-dark);
}

.project-modal-tags {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-modal-tags span {
    display: inline-block;
    background: linear-gradient(135deg, rgba(60, 148, 231, 0.1), rgba(60, 148, 231, 0.05));
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    border: 1px solid rgba(60, 148, 231, 0.2);
}

body.dark-mode .project-modal-tags span {
    background: linear-gradient(135deg, rgba(60, 148, 231, 0.2), rgba(60, 148, 231, 0.1));
    border-color: rgba(60, 148, 231, 0.3);
}

.project-modal-description {
    font-size: 1.05em;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 25px;
}

body.dark-mode .project-modal-description {
    color: var(--text-dark);
}

.project-modal-footer {
    padding: 20px 30px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
}

body.dark-mode .project-modal-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* Responsive pour le modal */
@media (max-width: 768px) {
    .project-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 15px;
    }

    .project-modal-header {
        height: 200px;
        border-radius: 15px 15px 0 0;
    }

    .project-modal-body {
        padding: 20px;
    }

    .project-modal-title {
        font-size: 1.5em;
    }

    .project-modal-description {
        font-size: 0.95em;
    }

    .project-modal-footer {
        padding: 15px 20px 20px;
    }

    .project-modal-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
}

.project-actions {
    margin-top: auto;
    padding-bottom: 15px;
}

.project-card .btn-project {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #2d7dd2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    width: 100%;
    transition: all var(--animation-speed) var(--animation-easing);
    box-shadow: 0 4px 12px rgba(60, 148, 231, 0.3);
}

.project-card .btn-project:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(60, 148, 231, 0.4);
    background: linear-gradient(135deg, #2d7dd2, var(--primary-color));
}

.project-card .btn-project span {
    font-weight: 600;
}

/* Style pour les projets privés */
.project-private {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    color: #e74c3c;
    padding: 12px 24px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    font-size: 1em;
    cursor: default;
    user-select: none;
}

.project-private i {
    font-size: 1em;
}

/* 6. Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--background-light);
}
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--card-bg-light);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
body.dark-mode .contact-form {
    background-color: var(--card-bg-dark);
}
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.form-group {
    flex: 1;
}
.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}
body.dark-mode .form-group label {
    color: var(--text-dark);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color-light);
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1em;
}
.btn-submit {
    display: block;
    width: 100%;
    margin-top: 30px;
    padding: 15px;
    font-size: 1.1em;
    text-transform: uppercase;
}

/* 7. Footer */
.footer {
    background: linear-gradient(135deg, var(--card-bg-light) 0%, rgba(60, 148, 231, 0.05) 100%);
    padding: 60px 0 0;
    border-top: 1px solid var(--border-color-light);
    position: relative;
    margin-top: 80px;
}

body.dark-mode .footer {
    background: linear-gradient(135deg, var(--background-dark) 0%, rgba(60, 148, 231, 0.1) 100%);
    border-top-color: var(--border-color-dark);
}

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

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 2px;
}

.footer-about .footer-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95em;
}

body.dark-mode .footer-about .footer-description {
    color: var(--text-dark);
    opacity: 0.9;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #2d7dd2);
    color: white;
    border-radius: 50%;
    font-size: 1.2em;
    transition: all var(--animation-speed) var(--animation-easing);
    box-shadow: 0 4px 10px rgba(60, 148, 231, 0.3);
    text-decoration: none;
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(60, 148, 231, 0.5);
    background: linear-gradient(135deg, #2d7dd2, var(--primary-color));
}

.social-link:nth-child(1):hover {
    background: linear-gradient(135deg, #333, #24292e);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.social-link:nth-child(2):hover {
    background: linear-gradient(135deg, #0077b5, #005885);
    box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

.social-link:nth-child(3):hover {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4);
}

.social-link:nth-child(4):hover {
    background: linear-gradient(135deg, #25D366, #128C7E);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 12px;
}

.footer-nav a {
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--animation-speed) var(--animation-easing);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}

body.dark-mode .footer-nav a {
    color: var(--text-dark);
}

.footer-nav a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--animation-speed) var(--animation-easing);
    color: var(--primary-color);
}

.footer-nav a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-nav a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: all var(--animation-speed) var(--animation-easing);
    padding: 8px 0;
}

body.dark-mode .contact-item {
    color: var(--text-dark);
}

.contact-item i {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(60, 148, 231, 0.1);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.9em;
    transition: all var(--animation-speed) var(--animation-easing);
}

.contact-item:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.contact-item:hover i {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.footer-bottom {
    background: rgba(60, 148, 231, 0.05);
    padding: 25px 0;
    border-top: 1px solid var(--border-color-light);
    margin-top: 40px;
}

body.dark-mode .footer-bottom {
    background: rgba(60, 148, 231, 0.1);
    border-top-color: var(--border-color-dark);
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: var(--text-light);
    font-size: 0.9em;
    margin: 0;
}

body.dark-mode .copyright {
    color: var(--text-dark);
    opacity: 0.8;
}

.footer-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9em;
}

body.dark-mode .footer-badges {
    color: var(--text-dark);
}

.footer-badges .badge {
    color: var(--text-light);
    opacity: 0.8;
}

body.dark-mode .footer-badges .badge {
    color: var(--text-dark);
}

.footer-badges .fas.fa-heart {
    color: #e74c3c;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.2em;
    box-shadow: 0 4px 15px rgba(60, 148, 231, 0.4);
    display: none;
    z-index: 999;
    cursor: pointer;
    transition: all var(--animation-speed) var(--animation-easing);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
}
.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 20px rgba(60, 148, 231, 0.6);
    background-color: #2d7dd2;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. Conteneur pour l'alignement */
.image-content {
    display: flex;
    justify-content: center; 
    align-items: center;
    height: 100%;
    position: relative;
    opacity: 1;
    animation: fadeInRight 1s ease-out 0.3s forwards;
}

/* 2. Style de l'image elle-même */
.image-content img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    transition: all var(--animation-speed) var(--animation-easing);
    box-shadow: 0 10px 30px rgba(60, 148, 231, 0.3);
    position: relative;
    z-index: 1;
}
.image-content::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}
.image-content:hover img {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(60, 148, 231, 0.4);
}
/* Animations générales */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}
.fade-in-up.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animation pour les sections */
section {
    position: relative;
    overflow: hidden;
}

/* Effet de particules animées en arrière-plan (optionnel) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(60, 148, 231, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(60, 148, 231, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    50% {
        transform: translateY(-20px) translateX(20px);
    }
}

/* Responsive Design */
/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablette et petit desktop */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 15px;
    }
}

/* Tablette */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .hero-content .text-content {
        order: 2;
    }
    
    .hero-content .image-content {
        order: 1;
        margin-bottom: 20px;
        width: 70%;
    }
    
    .hero-content h1 {
        font-size: 2.5em;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .hero-actions a {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .about-text {
        padding: 0 20px;
    }
    
    .illustration img {
        max-width: 280px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .section-title {
        font-size: 2em;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Header Mobile */
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-content {
        position: relative;
        justify-content: space-between;
    }
    
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--card-bg-light);
        flex-direction: column;
        padding: 20px 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    body.dark-mode .nav-links {
        background-color: var(--card-bg-dark);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-links a {
        display: block;
        padding: 15px 20px;
        margin: 0;
        border-bottom: 1px solid var(--border-color-light);
    }
    
    body.dark-mode .nav-links a {
        border-bottom-color: var(--border-color-dark);
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .contact-btn .contact-text {
        display: none;
    }
    
    .contact-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .lang-toggle-btn span {
        display: none;
    }
    
    .lang-dropdown {
        right: -10px;
    }
    
    .theme-toggle-btn {
        margin-left: 5px;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2em;
        line-height: 1.2;
    }
    
    .hero-content .image-content {
        width: 80%;
    }
    
    .image-content img {
        width: 250px;
        height: 250px;
    }
    
    .tagline {
        font-size: 1em;
        padding: 0 10px;
    }
    
    /* About Section Mobile */
    .about-section {
        padding: 60px 0;
    }
    
    .illustration img {
        max-width: 250px;
    }
    
    /* Skills Section Mobile */
    .skills-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    
    .section-description {
        font-size: 0.95em;
        padding: 0 15px;
    }
    
    /* Technologies Mobile */
    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 12px;
    }
    
    .tech-item {
        padding: 12px;
    }
    
    .tech-item img {
        width: 40px;
        height: 40px;
    }
    
    .tech-item span {
        font-size: 0.75em;
    }
    
    /* Projects Section Mobile */
    .projects-section {
        padding: 60px 0;
    }
    
    .projects-controls {
        gap: 15px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .filter-buttons {
        gap: 8px;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-buttons .filter-btn {
        padding: 6px 15px;
        font-size: 0.85em;
        white-space: nowrap;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .project-image-placeholder {
        height: 150px;
    }
    
    .project-card {
        min-width: 0; /* Permet aux cartes de se rétrécir */
    }
    
    .project-badge {
        top: 10px;
        right: 10px;
        padding: 5px 10px;
        font-size: 0.7em;
    }
    
    .project-badge span {
        display: none;
    }
    
    .project-card h3 {
        font-size: 1.2em;
    }
    
    .project-card p {
        font-size: 0.9em;
    }
    
    /* Testimonials Section Mobile */
    .testimonials-section {
        padding: 60px 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .testimonial-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }
    
    .testimonial-info h4 {
        font-size: 1em;
    }
    
    .testimonial-text {
        font-size: 0.9em;
        padding-left: 15px;
    }
    
    /* Formulaire d'avis Mobile */
    .testimonial-form-container {
        padding: 25px 20px;
        margin: 30px auto;
    }
    
    .testimonial-form-container h3 {
        font-size: 1.4em;
        margin-bottom: 20px;
    }
    
    .testimonial-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .rating-input .star-label {
        font-size: 1.5em;
    }
    
    /* YouTube Section Mobile */
    .youtube-section {
        padding: 60px 0;
    }
    
    .youtube-intro {
        padding: 0 15px;
        font-size: 0.95em;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 40px 0 80px;
        margin-top: 60px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .footer-section {
        align-items: center;
    }
    
    .footer-title {
        text-align: center;
    }
    
    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-nav {
        text-align: center;
    }
    
    .footer-nav a::before {
        display: none;
    }
    
    .contact-info {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-badges {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        line-height: 45px;
    }
}

/* Petit Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 1.8em;
    }
    
    .section-title {
        font-size: 1.5em;
    }
    
    .hero-actions a {
        padding: 12px 20px;
        font-size: 0.9em;
    }
    
    .image-content img {
        width: 200px;
        height: 200px;
    }
    
    .image-content::before {
        width: 220px;
        height: 220px;
    }
    
    .projects-count {
        font-size: 0.85em;
    }
    
    .project-card h3 {
        font-size: 1.1em;
    }
    
    .btn-project {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .nav-actions {
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .theme-toggle-btn,
    .lang-toggle-btn {
        padding: 6px 10px;
        font-size: 0.85em;
    }
    
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }
    
    .lang-dropdown {
        right: 0;
        min-width: 140px;
    }
    
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 1.1em;
    }
    
    .blog-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .blog-share-buttons {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .share-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85em;
    }
}