/* Styles responsives pour la page Projets */

/* Variables CSS pour la responsivité */
:root {
    --navbar-height: 70px;
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
    --container-padding: 2rem;
    --mobile-padding: 1rem;
}

/* Base responsive styles */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

/* Correction pour l'arrière-plan en mode sombre */
[data-theme="dark"] html {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0b1e 50%, #0d1420 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh !important;
}

[data-theme="dark"] html,
[data-theme="dark"] body {
    background-color: #0a0a0a !important;
    background-image: linear-gradient(135deg, #0a0a0a 0%, #1a0b1e 50%, #0d1420 100%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
    min-height: 100vh !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Container responsive */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Navigation - Identique aux autres pages */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    /* Toujours sombre peu importe le thème */
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    height: var(--navbar-height);
}

/* Effet de scroll - reste sombre */
.navbar.scrolled {
    background: rgba(15, 15, 15, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    z-index: 1001;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Mobile menu toggle (hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #ffffff; /* Blanc pour la navbar sombre */
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Animation du hamburger quand le menu est ouvert */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation menu */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff !important; /* Force la couleur blanche */
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.1);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Page active */
.nav-link.active {
    color: #8b5cf6 !important;
    background: rgba(139, 92, 246, 0.15);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Indicateur de page active supplémentaire */
.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
}

/* Auth containers */
.auth-container {
    display: flex;
    gap: 0.5rem;
}

.desktop-auth {
    display: flex;
    margin-left: 1rem;
}

.mobile-auth {
    display: none;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.login-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    color: white;
    box-shadow: 0 2px 15px rgba(139, 92, 246, 0.4);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

/* Theme toggle */
.theme-toggle {
    margin-left: 1rem;
}

.theme-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border: none;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.theme-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.6);
}

/* Projects Hero Section */
.projects-hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding-top: var(--navbar-height);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .projects-hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0b1e 50%, #0d1420 100%) !important;
    background-attachment: local !important;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
}

[data-theme="dark"] .projects-hero::before {
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238b5cf6' fill-opacity='0.06'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="dark"] .projects-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.projects-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.projects-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: slideInUp 1s ease;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.breadcrumb {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.breadcrumb .current {
    color: var(--primary-color);
    font-weight: 600;
}

.projects-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .highlight {
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.projects-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.projects-stats {
    display: flex;
    justify-content: center;
    gap: clamp(1rem, 3vw, 3rem);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: clamp(1rem, 3vw, 1.5rem);
    background: white;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    min-width: 120px;
    flex: 1;
    max-width: 200px;
}

[data-theme="dark"] .stat-item {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.2);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

[data-theme="dark"] .stat-item:hover {
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.3);
}

.stat-number {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .stat-number {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.stat-label {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 500;
}

/* Projects Filters */
.projects-filters {
    padding: 2rem 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--navbar-height);
    z-index: 100;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .projects-filters {
    background: rgba(20, 20, 20, 0.95);
    border-bottom: 1px solid var(--dark-border-color);
    backdrop-filter: blur(20px);
}

.filters-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0 var(--mobile-padding);
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: clamp(0.6rem, 2vw, 0.8rem) clamp(1rem, 3vw, 1.5rem);
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

[data-theme="dark"] .filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--dark-border-color);
    color: var(--dark-text-secondary);
    backdrop-filter: blur(10px);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

[data-theme="dark"] .filter-btn:hover {
    border-color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.filter-btn.active {
    background: var(--gradient-primary);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-medium);
}

[data-theme="dark"] .filter-btn.active {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.filter-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.filter-text {
    flex-shrink: 0;
}

/* Projects Section */
.projects-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

[data-theme="dark"] .projects-section {
    background: var(--dark-bg-secondary);
    position: relative;
}

[data-theme="dark"] .projects-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 3rem;
}

.project-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.6s ease;
    height: fit-content;
}

[data-theme="dark"] .project-card {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.1);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.3);
}

.project-card.featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

[data-theme="dark"] .project-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.2);
}

.project-card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 1;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .featured-badge {
    box-shadow: 0 2px 15px rgba(139, 92, 246, 0.5);
}

.premium-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .premium-badge {
    box-shadow: 0 2px 15px rgba(245, 158, 11, 0.5);
}

.project-image {
    position: relative;
    height: clamp(180px, 25vw, 200px);
    overflow: hidden;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.placeholder-icon {
    font-size: clamp(2rem, 5vw, 3rem);
    color: white;
    transition: transform 0.3s ease;
}

.project-card:hover .placeholder-icon {
    transform: scale(1.1) rotate(5deg);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: clamp(0.5rem, 2vw, 0.6rem) clamp(0.8rem, 2vw, 1rem);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 25px;
    color: var(--text-primary);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.action-btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.demo-btn:hover {
    background: var(--primary-color);
    color: white;
}

.github-btn:hover {
    background: #333;
    color: white;
}

.download-btn:hover {
    background: var(--secondary-color);
    color: white;
}

.project-content {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-title {
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.project-price {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-price.free {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .project-price.free {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

.project-price:not(.free) {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .project-price:not(.free) {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    padding: 0.3rem 0.8rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 15px;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: 500;
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

[data-theme="dark"] .tech-tag {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--primary-color);
}

.tech-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

[data-theme="dark"] .tech-tag:hover {
    background: rgba(139, 92, 246, 0.3);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.2);
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat {
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.2rem;
    white-space: nowrap;
}

.project-btn {
    padding: clamp(0.5rem, 2vw, 0.6rem) clamp(1rem, 3vw, 1.2rem);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    border-radius: 25px;
    white-space: nowrap;
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    padding: 1rem 2rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Projects CTA */
.projects-cta {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

[data-theme="dark"] .projects-cta {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0b1e 50%, #0d1420 100%);
    position: relative;
}

[data-theme="dark"] .projects-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.projects-cta-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.projects-cta-content h2 {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

[data-theme="dark"] .projects-cta-content h2 {
    background: var(--dark-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.projects-cta-content p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #d1d5db;
    margin-bottom: 2rem;
}

[data-theme="dark"] .projects-cta-content p {
    color: var(--dark-text-secondary);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary,
.cta-buttons .btn-secondary {
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
    border-radius: 25px;
}

/* Footer responsive */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 2rem 0;
}

[data-theme="dark"] .footer {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0b1e 50%, #0d1420 100%);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideInUp 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    margin: 1rem;
}

[data-theme="dark"] .modal-content {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.3);
}

.modal-content.download-modal {
    max-width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
}

[data-theme="dark"] .modal-header {
    border-bottom: 1px solid var(--dark-border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.modal-body {
    padding: clamp(1.5rem, 4vw, 2rem);
}

.modal-image {
    margin-bottom: 2rem;
}

.modal-image .project-placeholder {
    height: clamp(150px, 25vw, 200px);
    border-radius: 15px;
}

.modal-info {
    display: grid;
    gap: 1.5rem;
}

.modal-price {
    text-align: center;
}

.modal-price span {
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: clamp(1rem, 3vw, 1.1rem);
    font-weight: 600;
}

.modal-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.modal-technologies h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: clamp(0.7rem, 2vw, 0.8rem) clamp(1.2rem, 3vw, 1.5rem);
    border-radius: 25px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    white-space: nowrap;
}

/* Download Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.form-group input[type="email"] {
    width: 100%;
    padding: clamp(0.7rem, 2vw, 0.8rem) 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

[data-theme="dark"] .form-group input[type="email"] {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--dark-border-color);
    color: var(--dark-text-primary);
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .form-group input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
    margin-bottom: 0 !important;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

[data-theme="dark"] .checkmark {
    border-color: var(--dark-border-color);
    background: rgba(255, 255, 255, 0.05);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

.download-actions {
    text-align: center;
    margin-top: 2rem;
}

.download-actions .btn-primary {
    padding: clamp(0.8rem, 2vw, 1rem) clamp(1.5rem, 3vw, 2rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* User Menu Responsive */
.user-menu-container {
    position: relative;
}

.user-avatar-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: white;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

[data-theme="dark"] .user-avatar-btn {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--dark-text-primary);
}

.user-avatar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

[data-theme="dark"] .user-avatar-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

[data-theme="dark"] .user-avatar-img {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.user-name {
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
    flex-shrink: 0;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(20px);
    max-width: 90vw;
}

[data-theme="dark"] .user-dropdown {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .user-dropdown-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
}

[data-theme="dark"] .dropdown-avatar {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    flex: 1;
}

.dropdown-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-menu {
    padding: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-color);
}

.dropdown-icon {
    font-size: 1.1rem;
    width: 20px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

[data-theme="dark"] .dropdown-divider {
    background: rgba(255, 255, 255, 0.1);
}

/* RESPONSIVE BREAKPOINTS */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        padding: 0 3rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .projects-hero-container {
        padding: 0 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .projects-stats {
        gap: 2rem;
    }
    
    .filters-container {
        gap: 0.8rem;
    }
    
    .filter-btn {
        padding: 0.7rem 1.2rem;
    }
    
    .project-actions {
        gap: 0.3rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .cta-buttons {
        gap: 0.8rem;
    }
    
    .footer-content {
        text-align: center;
        flex-direction: column;
    }
    
    .footer-links {
        justify-content: center;
        gap: 1.5rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) {
    /* Hide desktop auth, show mobile nav */
    .desktop-auth {
        display: none;
    }
    
    .mobile-auth {
        display: flex;
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Mobile navigation menu */
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        background: rgba(15, 15, 15, 0.98);
        flex-direction: column;
        padding: 2rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        z-index: 999;
        height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
        backdrop-filter: blur(20px);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        border-radius: 0;
        width: 100%;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(139, 92, 246, 0.1);
    }
    
    /* Theme toggle positioning */
    .theme-toggle {
        margin-left: 0.5rem;
        order: 3;
    }
    
    .theme-btn {
        width: 45px;
        height: 45px;
    }
    
    /* Container and spacing */
    :root {
        --container-padding: var(--mobile-padding);
    }
    
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    .nav-container {
        padding: 0 var(--mobile-padding);
    }
    
    .projects-hero-container {
        padding: 0 var(--mobile-padding);
    }
    
    /* Hero section mobile */
    .projects-hero {
        min-height: 60vh;
        padding-top: calc(var(--navbar-height) + 2rem);
    }
    
    .projects-hero-content {
        text-align: center;
    }
    
    .projects-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .projects-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .projects-stats {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .stat-item {
        min-width: 200px;
        max-width: 250px;
        width: 100%;
    }
    
    /* Filters mobile */
    .projects-filters {
        padding: 1.5rem 0;
    }
    
    .filters-container {
        gap: 0.5rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 var(--mobile-padding);
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .filters-container::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .filter-text {
        display: none;
    }
    
    .filter-icon {
        margin-right: 0;
    }
    
    /* Projects grid mobile */
    .projects-section {
        padding: 3rem 0;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .project-card {
        margin: 0;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .action-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-width: 120px;
    }
    
    .btn-text {
        display: inline;
    }
    
    .project-content {
        padding: 1.25rem;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-title {
        font-size: 1.2rem;
    }
    
    .project-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .project-stats {
        justify-content: center;
    }
    
    .project-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Load more mobile */
    .load-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }
    
    /* CTA section mobile */
    .projects-cta {
        padding: 3rem 0;
    }
    
    .projects-cta-content h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .projects-cta-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Modal mobile */
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem;
        position: sticky;
        top: 0;
        background: inherit;
        z-index: 1;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-image .project-placeholder {
        height: 150px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    .modal-actions .btn-primary,
    .modal-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    /* Form mobile */
    .form-group input[type="email"] {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .checkbox-label {
        font-size: 0.9rem;
    }
    
    .download-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    /* User dropdown mobile */
    .user-dropdown {
        right: -1rem;
        min-width: 250px;
        max-width: calc(100vw - 2rem);
    }
    
    .user-dropdown-header {
        padding: 1rem;
    }
    
    .dropdown-avatar {
        width: 40px;
        height: 40px;
    }
    
    .dropdown-name {
        font-size: 0.9rem;
    }
    
    .dropdown-email {
        font-size: 0.8rem;
    }
    
    .dropdown-item {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .projects-hero-container {
        padding: 0 1rem;
    }
    
    .projects-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .stat-item {
        padding: 1rem;
        min-width: 150px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .project-content {
        padding: 1rem;
    }
    
    .project-title {
        font-size: 1.1rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .tech-tag {
        padding: 0.2rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .project-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .projects-cta-content h2 {
        font-size: 1.8rem;
    }
    
    .projects-cta-content p {
        font-size: 0.95rem;
    }
    
    .modal-content {
        margin: 0.25rem;
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .user-dropdown {
        right: -0.5rem;
        min-width: 220px;
    }
    
    .auth-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .theme-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
}

/* Very Small Mobile (up to 380px) */
@media (max-width: 380px) {
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .projects-title {
        font-size: 1.6rem;
    }
    
    .projects-subtitle {
        font-size: 0.9rem;
    }
    
    .stat-item {
        min-width: 120px;
        padding: 0.8rem;
    }
    
    .filter-btn {
        padding: 0.4rem 0.6rem;
    }
    
    .project-content {
        padding: 0.8rem;
    }
    
    .action-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .modal-content {
        margin: 0.1rem;
        border-radius: 10px;
    }
    
    .modal-header,
    .modal-body {
        padding: 0.8rem;
    }
    
    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Landscape mode adjustments */
@media (max-height: 600px) and (orientation: landscape) {
    .projects-hero {
        min-height: 50vh;
        padding-top: calc(var(--navbar-height) + 1rem);
    }
    
    .projects-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .stat-item {
        min-width: 100px;
        padding: 0.8rem;
    }
    
    .nav-menu {
        height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 95vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .project-placeholder {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .user-avatar-img,
    .dropdown-avatar {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Hover states for touch devices */
@media (hover: none) and (pointer: coarse) {
    .project-card:hover {
        transform: none;
    }
    
    .project-card:hover .project-overlay {
        opacity: 0;
    }
    
    .project-overlay {
        opacity: 0;
        pointer-events: none;
    }
    
    .project-actions {
        position: static;
        background: transparent;
        padding: 1rem;
        opacity: 1;
        display: flex;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .action-btn:hover {
        transform: none;
    }
    
    .filter-btn:hover {
        transform: none;
    }
    
    .stat-item:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .projects-filters,
    .projects-cta,
    .footer,
    .modal,
    .mobile-menu-toggle,
    .theme-toggle {
        display: none !important;
    }
    
    .projects-hero {
        padding-top: 0;
    }
    
    .project-overlay,
    .project-actions {
        display: none !important;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}











/* === STYLES ADMIN À AJOUTER À LA FIN DE projets.css === */

/* Badge admin */
.admin-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Dropdown role */
.dropdown-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.8;
}

/* Admin item dans le dropdown */
.admin-item {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    margin: 0.5rem 0;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .admin-item {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.admin-item:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(217, 119, 6, 0.2) 100%);
    color: #f59e0b;
    transform: translateX(5px);
}

[data-theme="dark"] .admin-item:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.25) 100%);
}

.admin-indicator {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.7;
}

/* Protection des pages admin */
.admin-protected {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.admin-access-denied {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    border: 1px solid #e5e7eb;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .admin-access-denied {
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--dark-text-primary);
}

.access-denied-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ef4444;
}

.access-denied-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.access-denied-message {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.access-denied-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.access-denied-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-login-admin {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-login-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-back-projects {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-back-projects:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Styles pour les modales admin */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

.downloads-list,
.likes-list,
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.download-item,
.like-item,
.notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

[data-theme="dark"] .download-item,
[data-theme="dark"] .like-item,
[data-theme="dark"] .notification-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--dark-border-color);
}

.download-item:hover,
.like-item:hover,
.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.download-info,
.like-info {
    flex: 1;
}

.download-info h4,
.like-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.download-info p,
.like-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.download-info small,
.like-info small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.download-actions,
.like-actions {
    margin-left: 1rem;
}

.status.pending {
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Notification item specific styles */
.notification-item {
    align-items: flex-start;
}

.notification-item.unread {
    border-left: 4px solid var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

[data-theme="dark"] .notification-item.unread {
    background: rgba(139, 92, 246, 0.1);
}

.notification-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.2rem;
}

.notification-content {
    flex: 1;
}

.notification-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.notification-content p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-content small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.mark-read-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.mark-read-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Profile modal admin enhancements */
.profile-content .profile-role {
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

.profile-content .profile-role:contains("Administrateur") {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

/* Responsive admin styles */
@media (max-width: 767px) {
    .admin-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        margin-left: 0.3rem;
    }

    .admin-access-denied {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .access-denied-title {
        font-size: 1.5rem;
    }

    .access-denied-actions {
        flex-direction: column;
        align-items: center;
    }

    .access-denied-btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .download-item,
    .like-item,
    .notification-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .download-actions,
    .like-actions {
        margin-left: 0;
        width: 100%;
    }

    .download-actions button,
    .like-actions button {
        width: 100%;
    }

    .notification-item {
        align-items: flex-start;
    }

    .mark-read-btn {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
}

/* Animation pour les éléments admin */
@keyframes adminGlow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3); 
    }
    50% { 
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6); 
    }
}

.admin-item:hover {
    animation: adminGlow 2s ease-in-out infinite;
}

/* Loading spinner pour les modales */
.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}