:root {
    --bg-color: #0d0a2c;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* --- GEOMETRIC BACKGROUND --- */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(135deg, #0d0a2c 0%, #1a0f3d 100%);
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    will-change: transform;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    top: 50%;
    right: -75px;
}

.shape-4 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.25) 0%, transparent 70%);
    top: 20%;
    left: 10%;
}

.shape-5 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.2) 0%, transparent 70%);
    bottom: 10%;
    right: 15%;
}

/* --- NAVIGATION --- */
nav {
    background: rgba(15, 23, 42, 0.95);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    border-bottom: 1px solid #334155;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* --- LAYOUT & SECTIONS --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

section {
    padding: 4rem 0;
}

section::before {
    content: '';
    display: inline-block;
    margin-right: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--accent);
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- HEADER --- */
header {
    text-align: center;
    padding: 5rem 1rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(56, 189, 248, 0.1) 100%);
    margin-bottom: 2rem;
}

.header-with-bg {
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 15px 5px;
}

.abstract-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #1e293b 0%, rgba(139, 92, 246, 0.15) 50%, rgba(56, 189, 248, 0.15) 100%);
    z-index: 0;
}

.abstract-bg::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    top: -100px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

.abstract-bg::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
    bottom: -75px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0px, 0px);
    }
    50% {
        transform: translate(30px, 30px);
    }
}

.header-content {
    position: relative;
    z-index: 1;
    padding: 5rem 1rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #a78bfa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* --- CARDS & GRIDS --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 15px 5px;
    border: 1px solid #334155;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #334155, #1e293b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #64748b;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.card-duration {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.card .btn {
    margin-top: auto;
}

/* --- TIMELINE (Exp & Education) --- */
.timeline-item {
    border-left: 5px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    border-top: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
    padding-left: 2rem;
    margin-bottom: 2rem;
    position: relative;
    background: rgba(139, 92, 246, 0.05);
    padding: 1.5rem;
    padding-left: 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(5px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 1.5rem;
    width: 15px;
    height: 15px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.date {
    color: var(--accent);
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* --- COMPETENCES --- */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.skill-tag {
    background-color: #334155;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
}

/* --- BOUTONS --- */
.btn {
    background-color: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
    margin-top: 1rem;
}

.btn:hover {
    background-color: var(--accent-hover);
}

.btn-back {
    background-color: #475569;
    margin-bottom: 2rem;
}

/* --- VUES (SPA) --- */
.view-section {
    display: none;
    animation: fadeIn 0.5s;
    position: relative;
    z-index: 10;
}

.view-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- PAGE DÉTAIL PROJET --- */
.project-detail-header {
    margin-bottom: 3rem;
}

.tech-list {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tech-badge {
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.objective-list {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 1rem;
    color: var(--text-secondary);
}

.objective-list li {
    margin-bottom: 0.5rem;
}

/* Loading */
#loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Remplacez ou ajoutez ceci dans votre section CSS existante */

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Grille responsive */
    gap: 1.5rem;
}

.skill-category-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #334155;
    transition: all 0.3s ease;
}

.skill-category-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.15);
}

.skill-category-card h3 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.3);
    padding-bottom: 0.5rem;
}

.skill-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background-color: rgba(139, 92, 246, 0.15);
    color: #e2e8f0;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.skill-tag:hover {
    background-color: rgba(139, 92, 246, 0.3);
    border-color: var(--accent);
    transform: scale(1.05);
}

/* --- CAROUSEL STYLES --- */
.carousel-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.carousel-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 10px;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    padding: 0.5rem;
}

.carousel-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.1);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #475569;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--accent);
    transform: scale(1.3);
}

.dot:hover {
    background-color: var(--accent-hover);
}

/* --- RESPONSIVE CAROUSEL --- */
@media (max-width: 768px) {
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-item {
        padding: 0.25rem;
    }
}

@media (max-width: 600px) {
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        gap: 0.5rem;
    }

    .carousel-container {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .dot {
        width: 10px;
        height: 10px;
    }
}