/* Import des polices */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variables pour les thèmes */
:root {
    /* Light theme */
    --primary-light: #4F46E5;
    --primary-light-rgb: 79, 70, 229;
    --secondary-light: #6B7280;
    --background-light: linear-gradient(135deg, #E0E5EC 0%, #F5F7FA 100%);
    --text-light: #374151;
    --card-bg-light: rgba(255, 255, 255, 0.7);
    --shadow-light: 10px 10px 20px #D1D9E6, -10px -10px 20px #FFFFFF;
    
    /* Section backgrounds - Light theme */
    --hero-bg-light: #F5F7FA;
    --about-bg-light: #E8EDF2;
    --skills-bg-light: #F5F7FA;
    --projects-bg-light: #E8EDF2;
    --contact-bg-light: #F5F7FA;
    
    /* Dark theme */
    --primary-dark: #BB9AF7;
    --primary-dark-rgb: 187, 154, 247;
    --secondary-dark: #7AA2F7;
    --background-dark: linear-gradient(135deg, #1A1B26 0%, #24283B 100%);
    --text-dark: #A9B1D6;
    --card-bg-dark: rgba(26, 27, 38, 0.7);
    --shadow-dark: 10px 10px 20px rgba(0, 0, 0, 0.3), -10px -10px 20px rgba(255, 255, 255, 0.05);

    /* Section backgrounds - Dark theme */
    --hero-bg-dark: #1A1B26;
    --about-bg-dark: #24283B;
    --skills-bg-dark: #1A1B26;
    --projects-bg-dark: #24283B;
    --contact-bg-dark: #1A1B26;

    /* Typography */
    --font-hero: 'Inter', sans-serif;
    --font-headings: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-accent: 'Inter', sans-serif;
}

/* Theme Styles */
body.light-theme {
    --primary: var(--primary-light);
    --primary-rgb: var(--primary-light-rgb);
    --secondary: var(--secondary-light);
    --background: var(--background-light);
    --text: var(--text-light);
    --card-bg: var(--card-bg-light);
    --shadow: var(--shadow-light);
}

body.dark-theme {
    --primary: var(--primary-dark);
    --primary-rgb: var(--primary-dark-rgb);
    --secondary: var(--secondary-dark);
    --background: var(--background-dark);
    --text: var(--text-dark);
    --card-bg: var(--card-bg-dark);
    --shadow: var(--shadow-dark);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    height: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    scroll-snap-type: none;
}

@media (min-width: 1024px) {
    body {
        scroll-snap-type: y proximity;
    }
}

@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
}

/* Theme-specific section backgrounds */
body.light-theme .hero { background-color: var(--hero-bg-light); }
body.light-theme .about { background-color: var(--about-bg-light); }
body.light-theme .skills { background-color: var(--skills-bg-light); }
body.light-theme .projects { background-color: var(--projects-bg-light); }
body.light-theme .contact { background-color: var(--contact-bg-light); }

body.dark-theme .hero { background-color: var(--hero-bg-dark); }
body.dark-theme .about { background-color: var(--about-bg-dark); }
body.dark-theme .skills { background-color: var(--skills-bg-dark); }
body.dark-theme .projects { background-color: var(--projects-bg-dark); }
body.dark-theme .contact { background-color: var(--contact-bg-dark); }

/* Sections communes */
section {
    min-height: 100vh;
    width: 100%;
    padding: clamp(40px, 5vw, 80px) clamp(20px, 5vw, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    section {
        min-height: auto;
        padding: clamp(20px, 3vw, 40px) clamp(15px, 3vw, 30px);
    }
}

/* Theme Switcher */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: var(--card-bg);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}

.slider .fa-sun {
    color: #f39c12;
    font-size: 14px;
}

.slider .fa-moon {
    color: #f1c40f;
    font-size: 14px;
}

.slider:before {
    background-color: var(--primary);
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 26px;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Navigation */
.navbar {
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 0;
}

.hero-content {
    width: min(90%, 800px);
    margin: 0 auto;
    padding: clamp(1rem, 5vw, 2rem);
    text-align: center;
    z-index: 1;
}

.glitch {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 var(--primary), -0.05em -0.025em 0 var(--secondary);
    animation: glitch 1s infinite;
    line-height: 1.2;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 var(--primary), -0.05em -0.025em 0 var(--secondary);
    }
    15% {
        text-shadow: -0.05em -0.025em 0 var(--primary), 0.025em 0.025em 0 var(--secondary);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 var(--primary), 0.025em 0.025em 0 var(--secondary);
    }
    50% {
        text-shadow: 0.05em 0.025em 0 var(--primary), 0.05em 0 0 var(--secondary);
    }
    99% {
        text-shadow: 0.05em 0.025em 0 var(--primary), 0.05em 0 0 var(--secondary);
    }
    100% {
        text-shadow: -0.05em 0 0 var(--primary), -0.025em -0.025em 0 var(--secondary);
    }
}

.typing-container {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin: clamp(1rem, 3vw, 2rem) 0;
}

.dynamic-text {
    color: var(--primary);
    position: relative;
}

.dynamic-text::after {
    content: '|';
    position: absolute;
    right: -8px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Floating Cubes Animation */
.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
}

.cube {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--primary);
    animation: cube 20s linear infinite;
    opacity: 0.1;
}

.cube:nth-child(1) {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.cube:nth-child(2) {
    top: 60%;
    left: 50%;
    animation-delay: -5s;
}

.cube:nth-child(3) {
    top: 40%;
    left: 80%;
    animation-delay: -10s;
}

@keyframes cube {
    0% {
        transform: scale(0) rotate(0deg) translate(-50%, -50%);
    }
    100% {
        transform: scale(1.3) rotate(360deg) translate(100%, 100%);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    margin: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn.primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn.secondary {
    background: transparent;
    color: var(--text);
    border: 2px solid var(--primary);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* About Section */
.about {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 1024px) {
    .about {
        max-height: 100vh;
    }
}

.about h2 {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--primary);
    position: relative;
}

.about h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 50px;
    height: 3px;
    background: var(--primary);
    transform: translateX(-50%) scaleX(0);
    animation: slideIn 0.6s ease forwards;
}

@keyframes slideIn {
    to {
        transform: translateX(-50%) scaleX(1);
    }
}

.about-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
}

.about-left {
    flex: 1;
    padding: 2rem;
}

.about-right {
    flex: 1;
    padding: 2rem;
}

.about-text-container {
    width: 100%;
    height: auto;
    min-height: auto;
    padding: clamp(1rem, 3vw, 1.5rem);
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.tech-stack {
    display: grid;
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.tech-item {
    background: var(--card-bg);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tech-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(var(--primary-rgb), 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px) scale(1.02);
}

.tech-item:hover::before {
    opacity: 1;
}

.tech-item-inner {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.tech-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.tech-item:hover i {
    transform: scale(1.1) rotate(5deg);
}

.tech-item h3 {
    font-family: var(--font-headings);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    position: relative;
}

.tech-item h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.tech-item:hover h3::after {
    width: 50px;
}

.tech-item p {
    font-size: 0.9rem;
    color: var(--secondary);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.tech-item:hover p {
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .about-container {
        flex-direction: column;
        gap: 2rem;
    }

    .about-left,
    .about-right {
        width: 100%;
        padding: 0;
    }

    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .about {
        padding: 60px 1rem;
        height: auto;
    }

    .about-container {
        padding: 0.5rem;
    }

    .about-left,
    .about-right {
        padding: 0.5rem;
    }

    .about-text-container {
        padding: 1.5rem;
        max-height: none;
        overflow-y: visible;
    }

    .tech-stack {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tech-item {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .about-text-container {
        padding: 1rem;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    .tech-item {
        padding: 1rem;
    }

    .tech-item h3 {
        font-size: 1.1rem;
    }

    .tech-item p {
        font-size: 0.85rem;
    }
}

@media (max-height: 800px) {
    .about {
        padding: 60px 1rem 20px;
    }

    .about h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .about-container {
        gap: 1rem;
        padding: 0.5rem;
    }

    .about-text-container {
        padding: 1rem;
        font-size: 0.9rem;
        max-height: 60vh;
        overflow-y: auto;
    }

    .about-text-container::-webkit-scrollbar {
        width: 4px;
    }

    .about-text-container::-webkit-scrollbar-thumb {
        background-color: var(--primary);
        border-radius: 2px;
    }

    .tech-stack {
        gap: 0.8rem;
    }

    .tech-item {
        padding: 0.8rem;
    }

    .tech-item-inner {
        padding: 0.8rem;
    }

    .tech-item i {
        font-size: 1.5rem;
    }

    .tech-item h3 {
        font-size: 1rem;
    }

    .tech-item p {
        font-size: 0.8rem;
    }
}

@media (max-height: 600px) {
    .about {
        padding: 40px 1rem 10px;
    }

    .about h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .about-container {
        gap: 0.5rem;
    }

    .about-text-container {
        padding: 0.8rem;
        font-size: 0.85rem;
        max-height: 50vh;
    }

    .tech-stack {
        gap: 0.5rem;
    }

    .tech-item {
        padding: 0.5rem;
    }

    .tech-item-inner {
        padding: 0.5rem;
    }

    .tech-item i {
        font-size: 1.2rem;
        margin-bottom: 0.3rem;
    }

    .tech-item h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .tech-item p {
        font-size: 0.75rem;
    }
}

/* Skills Section */
.skills {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2rem;
    position: relative;
    overflow: visible;
}

.skills h2 {
    margin-bottom: 2rem;
    color: var(--primary);
    text-align: center;
}

.skills-container {
    width: min(90%, 1400px);
    padding: clamp(1rem, 3vw, 2rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: visible;
    max-height: none;
}

.skills-grid {
    gap: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(0.5rem, 2vw, 1rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    height: 100%;
    align-items: center;
}

.skill-category {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.skill-hexagon {
    width: 80px;
    height: 92px;
    margin: 0 auto 1rem;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}

.skill-category:hover .skill-hexagon {
    transform: rotate(360deg);
}

.hexagon-content {
    color: var(--text-dark);
    text-align: center;
    z-index: 1;
}

.hexagon-content i {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.hexagon-content h3 {
    font-size: 1rem;
    margin: 0;
}

.skill-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 1rem;
}

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

.skill-icon-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.skill-icon-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    box-sizing: border-box;
    opacity: 0;
    transition: all 0.3s ease;
}

.skill-icon-container:hover {
    transform: rotate(360deg) scale(1.1);
    background: rgba(var(--primary-rgb), 0.2);
}

.skill-icon-container:hover::before {
    opacity: 1;
    animation: pulse-border 1.5s infinite;
}

.skill-icon-container i {
    font-size: 1.8rem;
    color: var(--primary);
    transition: color 0.3s ease;
}

@keyframes pulse-border {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.skill-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.skill-info i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 24px;
    text-align: center;
}

.skill-info span {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

@media (max-width: 768px) {
    .skills {
        height: auto;
        min-height: auto;
        padding: 4rem 1rem;
        overflow: visible;
    }
    
    .skills-container {
        max-height: none;
        padding: 0.5rem 0;
        overflow: visible;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 0.5rem;
        height: auto;
    }
    
    .skill-category {
        min-height: unset;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .skill-hexagon {
        width: 60px;
        height: 69px;
    }
    
    .hexagon-content h3 {
        font-size: 0.9rem;
    }
    
    .skill-item {
        gap: 0.5rem;
    }
    
    .skill-info span {
        font-size: 0.8rem;
    }
    
    .skill-icon-container {
        width: 40px;
        height: 40px;
    }
}

@media (max-height: 700px) {
    .skill-category {
        padding: 1rem;
        min-height: unset;
    }
    
    .skill-hexagon {
        width: 60px;
        height: 69px;
        margin-bottom: 0.5rem;
    }
    
    .skill-details {
        gap: 0.5rem;
    }
    
    .skill-icon-container {
        width: 35px;
        height: 35px;
    }
}

/* Projects Section */
.projects {
    padding: 80px 20px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(var(--primary-rgb), 0.1) 50%,
        transparent 100%
    );
}

.projects::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(var(--primary-rgb), 0.1) 50%,
        transparent 100%
    );
}

.projects-grid {
    width: min(90%, 1200px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
    height: auto;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: clamp(1rem, 3vw, 1.5rem);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    height: 100%;
    min-height: 400px;
}

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

.project-content h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-content p {
    margin-bottom: 1rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.project-details {
    margin: 1rem 0;
}

.project-details h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.project-details ul {
    list-style-type: none;
    padding-left: 1rem;
}

.project-details ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.project-details ul li:before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: -1rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tags span {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.5rem;
}

.project-link.btn {
    width: auto;
    min-width: 180px;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.5px;
    gap: 0.8rem;
}

.project-link.btn:hover i {
    transform: translateX(5px);
    transition: transform 0.3s ease;
}

.project-link {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.project-link:hover {
    color: var(--secondary);
}

.project-link i {
    font-size: 1.2rem;
}

.project-image {
    width: 100%;
    height: clamp(150px, 30vw, 200px);
    min-height: auto;
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

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

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Project Slider Styles */
.project-slider {
    width: 100%;
    height: 200px;
    min-height: auto;
    max-height: 200px;
    background: var(--card-bg);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.slider-images {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slider-images img {
    width: 33.333%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.project-card:hover .slider-images img {
    transform: scale(1.05);
}

.slider-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: var(--primary);
}

/* Contact Section */
.contact {
    min-height: 100vh;
    padding: 80px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary);
}

.contact-container {
    width: 100%;
    max-width: 1200px;
    gap: clamp(1rem, 4vw, 4rem);
    padding: clamp(1rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: 1fr 1.5fr;
}

.contact-info {
    background: rgba(var(--primary-rgb), 0.08);
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    margin-bottom: 2rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.contact-info p {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--primary);
    font-size: 1.3rem;
    margin-right: 1rem;
    width: 24px;
}

.contact-form {
    background: rgba(var(--primary-rgb), 0.08);
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: none;
    border-bottom: 2px solid var(--secondary);
    background: transparent;
    color: var(--text);
    transition: all 0.3s ease;
}

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

.form-group label {
    position: absolute;
    left: 0.8rem;
    top: 0.8rem;
    color: var(--secondary);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.form-group .focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
}

.form-group input:focus ~ .focus-border,
.form-group textarea:focus ~ .focus-border,
.form-group input:valid ~ .focus-border,
.form-group textarea:valid ~ .focus-border {
    width: 100%;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:valid + label,
.form-group textarea:valid + label {
    top: -20px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

.contact-form .btn {
    width: 100%;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form .btn i {
    transition: transform 0.3s ease;
}

.contact-form .btn:hover i {
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-link {
    color: var(--text);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .contact-container {
        padding: 1rem;
    }
    
    .contact-form,
    .contact-info {
        padding: 2rem;
    }
}

/* Footer */
footer {
    min-height: 200px;
    width: 100%;
    background: var(--card-bg);
    padding: 2rem;
    position: relative;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    scroll-snap-align: start;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        max-height: none;
        overflow-y: visible;
    }
    
    .project-card {
        min-height: 350px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Typography Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

/* Hero Section Typography Override */
.hero h1, 
.hero h2,
.hero p {
    font-family: var(--font-hero);
}

/* Buttons and Interactive Elements */
button,
.button,
.nav-link {
    font-family: var(--font-accent);
    font-weight: 500;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    h4 {
        font-size: 1.25rem;
    }
    
    body {
        font-size: 15px;
    }
}

/* Image Modal Styles */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.image-modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  z-index: 1001;
}

.modal-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: -40px;
  right: -40px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.3s ease;
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 20px;
  transition: all 0.3s ease;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-prev {
  left: -80px;
}

.modal-next {
  right: -80px;
}

.modal-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
  .modal-close {
    top: -35px;
    right: 0;
  }

  .modal-nav {
    padding: 15px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.7);
  }

  .modal-prev {
    left: 10px;
  }

  .modal-next {
    right: 10px;
  }
}

/* Styles pour la scrollbar des conteneurs */
.projects-grid::-webkit-scrollbar {
    display: none;
}

.projects-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Ajustements responsive */
@media (max-width: 768px) {
    section {
        padding: 60px 15px;
    }

    section:not(#home) {
        padding-top: 80px;
    }

    .projects-grid,
    .contact-container {
        max-height: none;
        height: auto;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }
}

/* Animations de défilement */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section > * {
    animation: fadeInUp 0.6s ease-out;
}

/* Indicateur de défilement */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    opacity: 0.15;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.scroll-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.scroll-dot:hover {
    opacity: 0.5;
}

.scroll-dot.active {
    opacity: 1;
    background: var(--primary);
    transform: scale(1);
}

.scroll-dot.active::before {
    opacity: 0.2;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.2;
    }
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none;
    }
}

@media (max-height: 700px) {
    section {
        padding: 40px 15px;
    }

    .hero-content {
        transform: scale(0.9);
    }

    .about-container,
    .skills-container,
    .projects-grid,
    .contact-container {
        margin-top: 2rem;
    }
}

/* Ajustements pour les appareils en mode paysage */
@media (max-height: 500px) and (orientation: landscape) {
    section {
        height: auto;
        min-height: 120vh;
    }

    .hero {
        height: auto;
        min-height: 120vh;
    }

    .about-container,
    .skills-container,
    .projects-grid {
        margin-top: 4rem;
    }
}

/* Menu Mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1000;
}

@media (max-width: 768px) {
    .logo-text {
        display: none; /* Cache le logo AB sur mobile */
    }

    .menu-toggle {
        display: block; /* Affiche le burger menu */
        margin-right: auto; /* Aligne le burger menu à gauche */
    }

    .nav-content {
        justify-content: flex-end; /* Aligne les éléments à droite */
        gap: 1rem; /* Espace entre les éléments */
    }

    /* Styles du menu mobile */
    .nav-links {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: 100vh;
        background: var(--card-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: 0.3s ease-in-out;
        backdrop-filter: blur(10px);
        z-index: 999;
        padding: 2rem;
    }

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

    .nav-links li {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links li:nth-child(5) { transition-delay: 0.5s; }

    .nav-links a {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: center;
        display: block;
    }

    .nav-links a::after {
        bottom: 0;
        width: 0;
        height: 2px;
        transition: width 0.3s ease;
    }

    .nav-links a:hover::after {
        width: 100%;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 360px) {
    .nav-content {
        padding: 0.5rem;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .theme-switch-wrapper {
        margin-left: 0.5rem;
    }

    .theme-switch {
        width: 50px;
        height: 28px;
    }

    .slider:before {
        width: 20px;
        height: 20px;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Ajustements pour l'accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Support pour les écrans haute résolution */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .project-image img {
        transform: scale(1);
    }
}

/* Light theme */
body.light-theme .contact-info,
body.light-theme .contact-form {
    background: rgba(79, 70, 229, 0.03);
    border: 1px solid rgba(79, 70, 229, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Dark theme */
body.dark-theme .contact-info,
body.dark-theme .contact-form {
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: var(--shadow);
}

.contact-info,
.contact-form {
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Responsive Content Sections */

/* Hero Section */
.hero-content {
    width: min(90%, 800px);
    margin: 0 auto;
    padding: clamp(1rem, 5vw, 2rem);
}

.glitch {
    font-size: clamp(2rem, 8vw, 4rem);
    line-height: 1.2;
}

.typing-container {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin: clamp(1rem, 3vw, 2rem) 0;
}

/* About Section */
.about-container {
    width: min(90%, 1200px);
    margin: 0 auto;
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
}

.about-text-container {
    padding: clamp(1rem, 3vw, 2rem);
}

/* Skills Section */
.skills-container {
    width: min(90%, 1400px);
    padding: clamp(1rem, 3vw, 2rem);
}

.skills-grid {
    gap: clamp(1rem, 3vw, 1.5rem);
    padding: clamp(0.5rem, 2vw, 1rem);
}

/* Projects Section */
.projects-grid {
    width: min(90%, 1200px);
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 2rem);
}

.project-card {
    padding: clamp(1rem, 3vw, 1.5rem);
}

/* Contact Section */
.contact-container {
    width: min(90%, 1200px);
    gap: clamp(1rem, 4vw, 4rem);
    padding: clamp(1rem, 3vw, 2rem);
}

.contact-info,
.contact-form {
    padding: clamp(1.5rem, 4vw, 3rem);
}

/* Responsive Grid Layouts */
@media (max-width: 1024px) {
    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
    }

    .about-left,
    .about-right {
        width: 100%;
    }

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

    .contact-container {
        grid-template-columns: 1fr;
    }
}

/* Responsive Images */
.project-image {
    height: clamp(150px, 30vw, 200px);
}

.project-image img,
.slider-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
    h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
    h3 { font-size: clamp(1.5rem, 5vw, 2rem); }
    h4 { font-size: clamp(1.2rem, 4vw, 1.5rem); }
    p { font-size: clamp(0.9rem, 3vw, 1rem); }
}

/* Responsive Spacing */
@media (max-width: 768px) {
    .section {
        gap: clamp(1rem, 3vw, 2rem);
    }

    .btn {
        padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    }
}

/* Ajustements des marges et espacements */
.section-padding {
    padding-top: max(60px, 10vh);
    padding-bottom: max(60px, 10vh);
}

.content-margin {
    margin-top: clamp(1rem, 3vw, 2rem);
    margin-bottom: clamp(1rem, 3vw, 2rem);
}

/* Optimisations pour les petits écrans */
@media (max-width: 480px) {
    .btn {
        width: 100%;
        margin: 0.5rem 0;
    }

    .contact-form,
    .contact-info {
        padding: 1.5rem;
    }

    .tech-tags {
        justify-content: center;
    }
}

/* Optimisations pour le mode paysage sur mobile */
@media (max-height: 500px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 4rem 1rem;
    }

    .hero-content {
        padding: 2rem 1rem;
    }

    .nav-links {
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }
}

.admin-link {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.2rem;
    opacity: 0.3;
    transition: opacity 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.admin-link:hover {
    opacity: 1;
}

/* Reminiss Section */
.reminiss {
    padding: 80px 20px;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.reminiss::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--skills-bg-light);
    z-index: -1;
}

body.dark-theme .reminiss::before {
    background: var(--skills-bg-dark);
}

.reminiss-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.reminiss-left {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reminiss-image {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.reminiss-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.reminiss-right {
    flex: 1;
    padding: 2rem;
}

.reminiss-content h3 {
    font-family: var(--font-headings);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.reminiss-description {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.reminiss-questions {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.question-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.question-item:hover {
    transform: translateX(5px);
}

.question-item i {
    font-size: 1rem;
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.question-item span {
    font-weight: 500;
    color: var(--text);
    font-size: 0.9rem;
}

.reminiss-features {
    margin: 1.5rem 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1rem;
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.feature-item span {
    font-size: 0.9rem;
    color: var(--text);
}

.reminiss-goal {
    margin: 1.5rem 0 1rem 0;
    text-align: center;
    font-style: italic;
    color: var(--secondary);
    font-size: 1rem;
}

.reminiss-cta {
    text-align: center;
    margin-top: 1.5rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
    text-decoration: none;
    color: white;
}

@media (max-width: 1024px) {
    .reminiss-container {
        flex-direction: column;
        gap: 3rem;
    }

    .reminiss-left,
    .reminiss-right {
        width: 100%;
    }

    .reminiss-right {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .reminiss {
        padding: 60px 1rem;
        min-height: auto;
    }

    .reminiss-container {
        padding: 0.5rem;
        gap: 2rem;
    }

    .reminiss-content h3 {
        font-size: 1.8rem;
        text-align: center;
    }

    .reminiss-description {
        font-size: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .question-item {
        padding: 0.8rem;
    }

    .question-item span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .reminiss-image {
        max-width: 300px;
    }

    .reminiss-content h3 {
        font-size: 1.5rem;
    }

    .reminiss-description {
        font-size: 0.95rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}