/* ========================================
   VARIABLES & RESET
   ======================================== */
:root {
    --primary-color: #0084ff;
    --primary-dark: #1e53af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}



/* ========================================
   PROJECT DETAIL HERO
   ======================================== */
.project-detail-hero {
    background: linear-gradient(135deg, #0a66c2 0%, #0d8acd 40%, #38b2e0 100%);
    color: white;
    padding: 4rem 0 3rem;
}

.breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    opacity: 0.7;
}

.project-detail-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-align: center;
}

.project-detail-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    color: var(--border-color);
    margin-bottom: 2rem;
    text-align: center;
    /* width: 35rem; */
    margin: auto;
}

.project-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.95rem;
    text-align: center;
}

.meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 1.5rem auto 0;
    gap: 0.5rem;
    opacity: 0.95;
}

/* ========================================
   PROJECT IMAGE SECTION
   ======================================== */
.project-image-section {
    padding: 3rem 0;
    background: var(--bg-white);
}

.project-main-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    max-width: 1000px;
    margin: 0 auto;
}

.project-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   PROJECT CONTENT
   ======================================== */
.project-content-section {
    padding: 4rem 0;
}

.project-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.project-main-content {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.project-main-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.project-main-content h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1.5rem;
    color: var(--text-dark);
}

.project-description {
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

.project-technologies {
    margin-top: 3rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.tech-tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.project-gallery {
    margin-top: 3rem;
}


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

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   SIDEBAR
   ======================================== */
.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.project-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--text-dark);
    color: white;
}

.btn-secondary:hover {
    background: #374151;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.like-btn-large {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.like-btn-large:hover {
    background: #fee;
    border-color: #f87171;
}

.like-btn-large.liked {
    background: #fee;
    border-color: #f87171;
}

.like-btn-large.liked .like-icon {
    animation: heartbeat 0.6s ease;
}

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

.like-icon {
    font-size: 1.5rem;
}

.like-count {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.project-stats {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-icon {
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-btn {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    color: white;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.facebook:hover {
    background: #145dbf;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.twitter:hover {
    background: #0c85d0;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.linkedin:hover {
    background: #005582;
}

/* ========================================
   SIMILAR PROJECTS
   ======================================== */
.similar-projects-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-dark);
}

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

.project-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

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

.project-link {
    padding: 0.875rem 2rem;
    background: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    font-weight: 600;
}

.project-content {
    padding: 1.5rem;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.project-title a:hover {
    color: var(--primary-color);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

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

.tag {
    padding: 0.25rem 0.75rem;
    background: var(--bg-light);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-dark);
}

/* ========================================
   PROJECT NAVIGATION
   ======================================== */
.project-navigation {
    padding: 3rem 0;
}

.nav-projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-project {
    padding: 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-project:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(0);
}

.nav-project.prev:hover {
    transform: translateX(-5px);
}

.nav-project.next {
    text-align: right;
    align-items: flex-end;
}

.nav-project.next:hover {
    transform: translateX(5px);
}

.nav-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

.nav-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}



/* ========================================
   ANIMATIONS ADDITIONNELLES
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Loading state pour les images */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Effet de focus accessible */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Amélioration du hamburger animé */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

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

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 968px) {
    .project-layout {
        grid-template-columns: 1fr;
    }
    
    .project-sidebar {
        order: -1;
    }
    
    .nav-projects {
        grid-template-columns: 1fr;
    }
    
    .nav-project.next {
        text-align: left;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 1rem;
        width: 100%;
    }
    
    .project-detail-title {
        font-size: 2rem;
    }
    
    .project-detail-subtitle {
        font-size: 1rem;
    }
    
    .project-meta-info {
        gap: 1rem;
        font-size: 0.875rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .project-main-content {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        flex-direction: row;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .project-detail-title {
        font-size: 1.75rem;
    }
    
    .project-main-content h2 {
        font-size: 1.5rem;
    }
    
    .sidebar-card {
        padding: 1.5rem;
    }
    
    .project-btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }
    
    .nav-container {
        padding: 0.75rem 15px;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .nav-logo img {
        width: 35px;
        height: 35px;
    }
}

/* ========================================
   DARK MODE (Optionnel - à activer via JS)
   ======================================== */
@media (prefers-color-scheme: dark) {
    body.dark-mode {
        --bg-light: #111827;
        --bg-white: #1f2937;
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --border-color: #374151;
    }
    
    body.dark-mode .project-detail-hero {
        background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    }
    
    body.dark-mode .tech-tag {
        background: #374151;
    }
    
    body.dark-mode .tech-tag:hover {
        background: var(--primary-color);
    }
}


/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .navbar,
    .hamburger,
    .project-navigation,
    .sidebar-card:has(.share-buttons),
    .footer,
    .scroll-to-top {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .project-main-content,
    .sidebar-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}












