:root {
    --bg-deep: #050507;
    --bg-panel: #0a0a0f;
    --bg-card: #101015;
    --cyan-neon: #00e5ff;
    --sw-blue: #007cc2;
    --f360-orange: #ff8a00;
    --blender-orange: #7510d4;
    --print-green: #bfff00; 
    --text-muted: #6c757d;
    --font-main: 'JetBrains Mono', monospace;
    --font-header: 'Orbitron', sans-serif;
    --meshy-red: #ff2d2d;
}

body {
    background-color: var(--bg-deep);
    color: #d1d1d1;
    font-family: var(--font-main);
    height: 100vh;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
        radial-gradient(circle at center, rgba(0,229,255,0.08), transparent 60%),
        url("Images/Banc.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* EFFET CRT & SCANLINES */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), 
                linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 3px 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.15;
}

/* HEADER */
header {
    height: 48px;
    background: black;
    border-bottom: 2px solid var(--cyan-neon);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.header-title {
    font-family: var(--font-header);
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--cyan-neon);
    font-size: 1rem;
}

/* LAYOUT */
.wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background-color: var(--bg-panel);
    border-right: 1px solid #1a1a1a;
    display: flex;
    flex-direction: column;
}

.nav-item {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: currentColor;
    color: #fff;
}

.nav-item i {
    width: 20px;
    margin-right: 15px;
    font-size: 1.1rem;
}

/* MAIN CONTENT */
main {
    flex: 1;
    overflow-y: auto;
    padding: 3rem;
    position: relative;
    background-image: radial-gradient(circle, #1a1a1a 1px, transparent 1px);
    background-size: 30px 30px;
}

.section-header {
    border-left: 4px solid var(--cyan-neon);
    padding-left: 1.5rem;
    margin-bottom: 2.5rem;
}

.section-header h1 {
    font-family: var(--font-header);
    font-weight: 900;
    font-size: 3rem;
    margin: 0;
    color: white;
    letter-spacing: -2px;
}

.section-header p {
    color: var(--cyan-neon);
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* TERMINAL BOX */
.terminal-box {
    background: black;
    border: 1px solid rgba(0, 229, 255, 0.2);
    padding: 1rem;
    border-radius: 2px;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.terminal-status {
    display: flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--cyan-neon);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--cyan-neon);
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.terminal-text {
    color: rgba(0, 229, 255, 0.6);
    font-size: 0.75rem;
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

/* PROJECT CARDS */
.project-card {
    background: var(--bg-card);
    border-top: 2px solid transparent;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    background: #151520;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.project-tag {
    font-size: 0.6rem;
    font-weight: bold;
    padding: 2px 8px;
    background: #000;
    border: 1px solid #1a1a1a;
    color: var(--text-muted);
    text-transform: uppercase;
}

.project-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-header);
}

.project-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.tech-pill {
    font-size: 0.6rem;
    background: black;
    border: 1px solid #222;
    padding: 2px 6px;
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-block;
    color: #aaa;
}

.card-footer-custom {
    border-top: 1px solid #1a1a1a;
    padding-top: 1rem;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.65rem;
    font-weight: bold;
}

/* FOOTER */
footer {
    height: 32px;
    background: black;
    border-top: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* Utility colors */
.text-sw { color: var(--sw-blue); }
.text-f360 { color: var(--f360-orange); }
.text-blender { color: var(--blender-orange); }
.text-print { color: var(--print-green); }
.text-meshy { color: var(--meshy-red); }

.border-sw { border-top-color: var(--sw-blue); }
.border-f360 { border-top-color: var(--f360-orange); }
.border-blender { border-top-color: var(--blender-orange); }
.border-print { border-top-color: var(--print-green); }
.border-meshy { border-top-color: var(--meshy-red); }

@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar .nav-label { display: none; }
    main { padding: 1.5rem; }
    .section-header h1 { font-size: 2rem; }
}

/* Présentation */
.note {
    background: rgba(10, 10, 10, 0.8);
    border-left: 3px solid var(--cyan, #00f3ff);
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    border-right: 1px solid #333;
    margin: 20px 0;
    padding: 0;
    font-family: 'JetBrains Mono', monospace;
}

.note-header {
    background: rgba(0, 243, 255, 0.1);
    color: var(--cyan, #00f3ff);
    padding: 5px 15px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
}

.note-content {
    padding: 15px;
    font-size: 0.8rem;
    color: #ccc;
    line-height: 1.5;
}

.note-content strong {
    color: var(--cyan, #00f3ff);
}

.note-footer {
    padding: 5px 15px;
    font-size: 0.6rem;
    color: #555;
    text-align: right;
}

/* MOBILE FIX : afficher les labels sous les icônes dans la sidebar */
@media (max-width: 768px){
  .sidebar{
    width: 86px; 
  }

  .sidebar .nav-label{
    display:block !important;
    font-size:.55rem;
    line-height:1.1;
    text-align:center;
    margin-top:6px;
    white-space:normal;   
    opacity:.85;
  }

  .nav-item{
    padding: .85rem .5rem;
    justify-content:center;
    flex-direction:column;
    gap: 2px;
  }

  .nav-item i{
    margin-right:0 !important;
    width:auto;
    font-size:1.15rem;
  }

  .nav-sub{
    padding-left:0 !important;
    font-size:.55rem;
    opacity:.9;
  }

  .sidebar-footer,
  .sidebar-caption,
  .sidebar-sep{
    display:none !important;
  }
}