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

:root {
    --bg: #ffffff;
    --text-color: #333333;
    --muted: #666666;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --bar-color: #333333;
    --hero-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --accent-start: #667eea;
    --accent-end: #764ba2;
    --card-bg: #ffffff;
    --section-bg: #f8f9fa;
}

body.dark {
    --bg: #0b0d10;
    --text-color: #e6e6e6;
    --muted: #cfcfcf;
    --nav-bg: rgba(10, 10, 10, 0.95);
    --bar-color: #e6e6e6;
    --hero-bg: linear-gradient(135deg, #0f1724 0%, #1b1b2f 100%);
    --card-bg: #111215;
    --section-bg: #0f1113;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}
    
.nav-logo .nav-logo-img {
    width: 36px;
    height: 36px;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    border-radius: 6px;
}

.nav-logo i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo .logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-button {
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.theme-toggle {
    background: transparent;
    color: var(--text-color);
    border: none;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 8px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.theme-toggle i {
    font-size: 1.1rem;
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--accent-start);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--bar-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Section Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.title-line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

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

.btn-secondary:hover {
    background: var(--accent-start);
    color: white;
    transform: translateY(-2px);
}

.hero-visual {
    position: relative;
    height: 400px;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    animation: float 6s ease-in-out infinite;
}

.element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.element-2 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

.element-3 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 50%;
    animation-delay: 4s;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid var(--accent-start);
    border-bottom: 2px solid var(--accent-start);
    transform: rotate(45deg);
}

/* Sections générales */
section {
    padding: 80px 0;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section À Propos */
.about {
    background: var(--card-bg);
}

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

.about-description {
    font-size: 1.1rem;
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-start);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.about-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    filter: sepia(1) hue-rotate(250deg) saturate(2);
}

.image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
}

.illustration-worker {
    width: 280px;
    height: 280px;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.2));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.illustration-worker:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 15px 40px rgba(102, 126, 234, 0.35));
}

body.dark .illustration-worker {
    filter: drop-shadow(0 10px 30px rgba(102, 126, 234, 0.45));
}

/* Section Projets */
.projects {
    background: var(--section-bg);
}

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

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.project-image {
    height: 200px;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-overlay {
    color: white;
    font-size: 3rem;
    opacity: 0.8;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.project-description {
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

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

.tag {
    background: #f0f0f0;
    color: var(--muted);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Section Compétences */
.skills {
    background: var(--section-bg);
}

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

.category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    text-align: center;
}

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

.skill-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-name {
    font-weight: 500;
    color: var(--text-color);
}

.skill-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    border-radius: 4px;
    transition: width 1.5s ease;
}

/* Section Contact */
.contact {
    background: var(--section-bg);
}

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

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--accent-start);
    font-size: 1.3rem;
    width: 30px;
}

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

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-start);
}

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

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--nav-bg);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

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

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

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

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

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

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

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

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Effets de scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
}

/* Espace de Travail Modal */
.workspace-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.workspace-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.workspace-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    color: white;
}

.workspace-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin: 0;
}

.close-workspace {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-workspace:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.workspace-tabs {
    display: flex;
    background: var(--section-bg);
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--muted);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: var(--accent-start);
    border-bottom-color: var(--accent-start);
    background: var(--card-bg);
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.workspace-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.workspace-actions {
    margin-bottom: 2rem;
    text-align: center;
}

.add-item-btn {
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.add-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--card-bg);
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-start);
}

.item-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.item-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.1rem;
}

.item-info p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.item-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.item-card:hover .item-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.download-btn {
    color: #28a745;
}

.download-btn:hover {
    background: #28a745;
    color: white;
    transform: scale(1.1);
}

.delete-btn {
    color: #dc3545;
}

.delete-btn:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

/* Types d'items spécifiques */
.photo-item .item-preview {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.ecommerce-item .item-preview {
    background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
}

.code-item .item-preview {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive pour l'espace de travail */
@media (max-width: 768px) {
    .workspace-content {
        width: 95%;
        margin: 1rem;
    }
    
    .workspace-header {
        padding: 1.5rem;
    }
    
    .workspace-header h2 {
        font-size: 1.5rem;
    }
    
    .workspace-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .workspace-body {
        padding: 1.5rem;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Modal de prévisualisation d'image */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-preview-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.image-preview-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.image-preview-content p {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.close-preview {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-preview:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

