/* ==========================================================================
   1. VARIABLES & CORE STYLE (Ton identité visuelle)
   ========================================================================== */
:root {
    --bg: #050d1a;
    --surface: #0a1628;
    --surface2: #0f1f38;
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --blue-glow: rgba(37, 99, 235, 0.35);
    --cyan: #06b6d4;
    --text: #e2e8f0;
    --muted: #64748b;
    --border: rgba(37, 99, 235, 0.2);
    --font-main: 'Outfit', sans-serif;
    --font-heading: 'Syne', sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(37,99,235,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37,99,235,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 100vw);
    height: 500px;
    background: radial-gradient(ellipse, rgba(37,99,235,0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.wrapper { position: relative; z-index: 1; }

/* ==========================================================================
   2. NAVIGATION (Ergonomie & Glassmorphism)
   ========================================================================== */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 5%;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 13, 26, 0.75);
}

.nav-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-dot {
    width: 10px;
    height: 10px;
    background: var(--blue-light);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--blue-light);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.btn-add {
    background: var(--blue);
    color: white !important;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px var(--blue-glow);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 25px var(--blue-glow);
}

/* ==========================================================================
   3. HERO SECTION (Moderne & Impactant)
   ========================================================================== */
.hero {
    padding: 80px 5% 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.hero-eyebrow {
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-eyebrow::before {
    content: '';
    width: 25px;
    height: 1px;
    background: var(--cyan);
}

h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    color: white;
    margin-bottom: 1.5rem;
}

h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.1em;
}

/* ==========================================================================
   4. PROJECTS GRID & CARDS (Focus Ergonomie)
   ========================================================================== */
.grid-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 5% 80px;
}

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

.card {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--blue-light) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

.card-media {
    height: 220px;
    position: relative;
    background: var(--surface2);
    border-radius: 20px 20px 0 0;

}

.card-media img, .card-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--blue);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    z-index: 2;
}

.file-count {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(5, 13, 26, 0.6);
    backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.65rem;
    color: var(--cyan);
    border: 1px solid var(--border);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.tag {
    font-size: 0.7rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue-light);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.delete-btn {
    color: #f87171;
    font-size: 0.8rem;
    background: none;
    border: none;
    padding: 5px;
    transition: opacity 0.2s;
    opacity: 0.6;
}

.delete-btn:hover { opacity: 1; }

/* ==========================================================================
   5. BOOTSTRAP MODAL OVERRIDES (Style Bleu Cyber)
   ========================================================================== */
.modal-content {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 24px !important;
    box-shadow: 0 0 50px rgba(0,0,0,0.5) !important;
}

.modal-backdrop.show {
    opacity: 0.85 !important;
    background-color: #050d1a !important;
}

#bs-modal-header {
    border-bottom: 1px solid var(--border);
}

#bs-modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(transparent, var(--surface));
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.modal-body {
    background: var(--surface);
}

/* ==========================================================================
   6. RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    nav { padding: 1rem 1.5rem; }

    .hero { padding-top: 50px; }

    .hero-stats {
        gap: 1.5rem;
        justify-content: space-between;
    }

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

    .projects-grid {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}

.labelColor {
    color: #8fa6ec;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: var(--surface2);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--blue);
}
