/* ========================================
   Variables CSS
======================================== */
:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;
    --accent-primary: #5BA4E6;
    --accent-secondary: #87CEEB;
    --accent-light: #E6F3FF;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --gradient-primary: linear-gradient(135deg, #5BA4E6 0%, #87CEEB 100%);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #adb5bd;
    --text-tertiary: #6c757d;
    --accent-primary: #5BA4E6;
    --accent-secondary: #87CEEB;
    --accent-light: #1a2332;
    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* ========================================
   Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Loader
======================================== */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

#loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--accent-light);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Particle Canvas
======================================== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ========================================
   Navigation
======================================== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] #navbar {
    background: rgba(10, 10, 10, 0.95);
}

#navbar.scrolled {
    padding: 15px 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-link {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-extras {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle,
.lang-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.theme-toggle:hover,
.lang-toggle:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ========================================
   Hero Section
======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.geometric-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-light) 0%, transparent 50%);
    opacity: 0.5;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 400;
}

.hero-title {
    font-size: clamp(40px, 5vw, 60px);
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 20px;
    height: 35px;
}

.typing-text {
    font-weight: 500;
}

.cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-tagline {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(91, 164, 230, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 164, 230, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.hero-visual {
    position: relative;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 400px;
}

.card-tech {
    position: absolute;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

[data-theme="dark"] .card-tech {
    background: var(--bg-secondary);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    color: #68A063;
}

.card-2 {
    top: 10%;
    right: 20%;
    animation-delay: 0.5s;
    color: #4FC08D;
}

.card-3 {
    bottom: 30%;
    left: 30%;
    animation-delay: 1s;
    color: #61DAFB;
}

.card-4 {
    bottom: 20%;
    right: 10%;
    animation-delay: 1.5s;
    color: #007396;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 15px;
    position: relative;
}

.wheel {
    width: 3px;
    height: 8px;
    background: var(--text-secondary);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 0; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* ========================================
   Section Commons
======================================== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
}

.title-line {
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: 2px;
}

/* ========================================
   About Section
======================================== */
.about {
    background: var(--bg-secondary);
}

.about-intro {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.about-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.value-card {
    background: var(--bg-primary);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.value-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    background: var(--accent-light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-primary);
}

.value-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.value-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 80px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ========================================
   Skills Section
======================================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.skill-category:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-title {
    font-size: 20px;
    margin-bottom: 25px;
    color: var(--accent-primary);
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 20px;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.skill-item i {
    font-size: 28px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.skill-item:hover i {
    color: var(--accent-primary);
}

.skill-item span {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* ========================================
   Projects Section
======================================== */
.projects {
    background: var(--bg-secondary);
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.project-image {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit:fill;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(91, 164, 230, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 20px;
    transition: transform 0.3s ease;
}

.project-link:hover {
    transform: scale(1.1);
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 22px;
    margin-bottom: 10px;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 5px 12px;
    background: var(--accent-light);
    color: var(--accent-primary);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* ========================================
   Contact Section
======================================== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.contact-item a {
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent-primary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   Footer
======================================== */
.footer {
    background: var(--bg-secondary);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        gap: 40px;
    }
}


/* Terminal Trigger */
.terminal-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
}

.terminal-trigger:hover {
    background: var(--gradient-primary);
    transform: translateY(-25px) scale(1.1);
}

.terminal-trigger i {
    color: #4CAF50;
}

/* Terminal Container */
.terminal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.terminal-window {
    width: 90%;
    max-width: 700px;
    height: 500px;
    background: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform-origin: center;
}

/* Terminal Header */
.terminal-header {
    background: #2d2d2d;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.terminal-buttons {
    display: flex;
    gap: 8px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
}

.terminal-btn.close {
    background: #ff5f56;
}

.terminal-btn.close:hover {
    background: #ff3830;
}

.terminal-btn.minimize {
    background: #ffbd2e;
}

.terminal-btn.maximize {
    background: #27c93f;
}

.terminal-title {
    color: #999;
    font-size: 13px;
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    color: #0f0;
    background: #0a0a0a;
}

.terminal-output {
    margin-bottom: 20px;
}

.terminal-line {
    margin-bottom: 10px;
    line-height: 1.4;
    white-space: pre-wrap;
}

/* Clickable Commands */
.terminal-commands {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.terminal-cmd {
    padding: 5px 12px;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4CAF50;
}

.terminal-cmd:hover {
    background: rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Terminal Input */
.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-prompt {
    color: #4CAF50;
}

.terminal-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #0f0;
    font-family: inherit;
    font-size: 14px;
}

.terminal-input::placeholder {
    color: #555;
}

/* Animations */
.terminal-expand-enter-active {
    animation: terminalOpen 0.4s ease;
}

.terminal-expand-leave-active {
    animation: terminalClose 0.3s ease;
}

@keyframes terminalOpen {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes terminalClose {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.terminal-expand-enter .terminal-window {
    animation: expandFromIcon 0.5s ease;
}

@keyframes expandFromIcon {
    from {
        transform: scale(0) translate(-50%, -50%);
        opacity: 0;
    }
    to {
        transform: scale(1) translate(0, 0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .terminal-window {
        width: 95%;
        height: 400px;
    }
}


/* Container pour le cube 3D */
.project-card-3d {
    width: 300px;
    height: 300px;
    perspective: 1000px;
    margin: 20px;
}

.cube-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: translateZ(-150px) rotateY(-15deg);
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.cube:hover {
    transform: translateZ(-150px) rotateY(-110deg);
}



.cube.paused {
    animation-play-state: paused !important;
}

@keyframes slowRotate {
    0% { transform: translateZ(-150px) rotateY(0deg); }
    100% { transform: translateZ(-150px) rotateY(-360deg); }
}

/* Pause la rotation au hover */
.cube.auto-rotate:hover {
    animation-play-state: paused;
    transform: translateZ(-150px) rotateY(-90deg);
}

/* Faces du cube */
.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Positionnement des faces */
.cube-front {
    transform: rotateY(0deg) translateZ(150px);
}

.cube-right {
    transform: rotateY(90deg) translateZ(150px);
}

.cube-back {
    transform: rotateY(180deg) translateZ(150px);
}

.cube-left {
    transform: rotateY(-90deg) translateZ(150px);
}

.cube-top {
    transform: rotateX(90deg) translateZ(150px);
    background: var(--gradient-primary);
    opacity: 0.5;
}

.cube-bottom {
    transform: rotateX(-90deg) translateZ(150px);
    background: var(--gradient-primary);
    opacity: 0.5;
}

/* Contenu des faces */
.face-content {
    padding: 30px;
    text-align: center;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Face 1 - Titre */
.project-main-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.meta-category,
.meta-date {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.meta-category i,
.meta-date i {
    color: var(--accent-primary);
}

/* Face 2 - Image */
.cube-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Face 3 - Description */
.project-description {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 15px;
    padding: 20px;
}

/* Face 4 - Technologies */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.tech-badge {
    padding: 10px 20px;
    background: var(--accent-light);
    color: var(--accent-primary);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--accent-primary);
}

/* Flèche indicatrice */
.face-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: var(--accent-primary);
    font-size: 20px;
    font-weight: bold;
    opacity: 0.6;
    animation: slideArrow 2s ease-in-out infinite;
}

@keyframes slideArrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* Face 2 - Flèche sur image */
.cube-right .face-arrow {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 20px;
}

/* Effet hover global */
.project-card-3d:hover {
    transform: translateY(-5px);
}

/* Mode sombre */
[data-theme="dark"] .cube-face {
    background: var(--bg-secondary);
}

[data-theme="dark"] .project-description {
    color: var(--text-primary);
}

[data-theme="dark"] .cube-right .face-arrow {
    background: rgba(26, 26, 26, 0.9);
    color: var(--accent-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .project-card-3d {
        width: 250px;
        height: 250px;
    }
    
    .cube-face {
        width: 250px;
        height: 250px;
    }
    
    .cube-front,
    .cube-right,
    .cube-back,
    .cube-left {
        transform: rotateY(var(--rotation)) translateZ(125px);
    }
    
    .project-main-title {
        font-size: 24px;
    }
}

.face-scroll-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(91, 164, 230, 0.1);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    font-size: 14px;
    animation: bounceScroll 2s ease-in-out infinite;
}

@keyframes bounceScroll {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Pour l'image */
.cube-right .face-scroll-hint {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .cube-right .face-scroll-hint {
    background: rgba(26, 26, 26, 0.9);
}


/* Responsive - Cartes horizontales sur mobile */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }
    
    /* Cache le cube 3D sur mobile */
    .project-card-3d {
        width: 100%;
        height: auto;
        perspective: none;
        margin: 15px 0;
    }
    
    .cube-container {
        transform-style: flat;
        height: auto;
    }
    
    .cube {
        transform: none !important;
        animation: none !important;
        display: block;
        height: auto;
    }
    
    /* Affiche seulement la face frontale comme une carte */
    .cube-face {
        position: static;
        width: 100%;
        height: auto;
        transform: none !important;
        border-radius: 15px;
        padding: 20px;
        display: none;
    }
    
    /* Affiche uniquement la face avant */
    .cube-front {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-height: 120px;
        background: var(--bg-primary);
        box-shadow: var(--shadow-md);
    }
    
    .cube-front .face-content {
        flex: 1;
        padding: 15px;
        text-align: left;
    }
    
    .cube-front .project-main-title {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .cube-front .project-meta {
        flex-direction: row;
        gap: 20px;
    }
    
    /* Cache l'icône de scroll */
    .face-scroll-hint {
        display: none;
    }
    
    /* Affiche les infos au tap/click */
    .cube-front:active {
        transform: scale(0.98);
        box-shadow: var(--shadow-sm);
    }
}