/* =========================================
   PORTFOLIO - STYLE "MODERN RETRO / CYBERPUNK"
   AJUSTEMENT DE LA LARGEUR DU MENU
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500&family=VT323&display=swap');

:root {
    --bg-color: #080a0f; 
    --panel-bg: rgba(0, 255, 65, 0.02); 
    --text-color: #00ff41; 
    --highlight-color: #00e5ff; 
    --border-color: rgba(0, 255, 65, 0.3); 
    --scanline-color: rgba(0, 255, 65, 0.03);
}

/* --- STYLE DE BASE --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    padding: 0; 
    background-image: linear-gradient(
        to bottom,
        var(--scanline-color) 50%,
        transparent 50%
    );
    background-size: 100% 4px; 
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

h1, h2, h3, nav a, .read-more-btn {
    font-family: 'VT323', monospace;
    letter-spacing: 1px;
}

h1 { 
    font-size: 2.2em; 
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.4); 
    margin-top: 0; 
    word-wrap: break-word; 
}
h2 { font-size: 1.8em; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
h3 { font-size: 1.4em; color: var(--highlight-color); margin-top: 0; }

/* --- CONTENEUR PRINCIPAL --- */
.container {
    position: relative; 
    width: 95%; 
    max-width: 1200px; 
    margin: 40px auto; 
    
    /* MODIFICATION ICI : On augmente la marge interne gauche à 340px pour laisser plus de place au menu */
    padding: 40px 40px 40px 340px; 
    
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(10, 15, 20, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 65, 0.05);
    box-sizing: border-box;
}

/* --- MENU DE NAVIGATION VERTICAL (SIDEBAR) --- */
nav {
    position: absolute; 
    top: 40px;
    left: 20px;
    /* MODIFICATION ICI : On élargit le menu à 280px pour que tout le texte rentre */
    width: 280px; 
    
    display: flex;
    flex-direction: column; 
    gap: 15px;
    background: rgba(10, 15, 20, 0.85); 
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 255, 65, 0.05);
    box-sizing: border-box;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.3em;
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid transparent; 
    transition: all 0.3s ease;
    text-align: left;
    white-space: nowrap; 
}

nav a:hover {
    color: var(--highlight-color);
    border-left-color: var(--highlight-color); 
    background: rgba(0, 229, 255, 0.05);
    text-shadow: 0 0 8px var(--highlight-color);
    transform: translateX(5px); 
}

nav a.active {
    background-color: rgba(0, 255, 65, 0.1);
    border-left-color: var(--text-color);
    color: var(--text-color);
    box-shadow: inset 5px 0 10px -5px rgba(0, 255, 65, 0.3);
}

/* --- CARTES ET SECTIONS --- */
section { margin-bottom: 50px; }

.project-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 20px;
    background: linear-gradient(145deg, rgba(0,255,65,0.03) 0%, rgba(0,0,0,0) 100%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.1);
    border-color: var(--highlight-color);
}

/* --- COMPÉTENCES (Style Pilule) --- */
.skill-list { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 15px; }

.skill-item {
    background-color: rgba(0, 255, 65, 0.08);
    color: var(--text-color);
    padding: 6px 16px;
    font-size: 0.9em;
    border: 1px solid var(--border-color);
    border-radius: 20px; 
    transition: all 0.3s ease;
}

.skill-item:hover {
    background-color: var(--highlight-color);
    color: #000;
    border-color: var(--highlight-color);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
    transform: scale(1.05);
}

/* --- CURSEUR ET LIENS --- */
.cursor {
    display: inline-block;
    width: 10px;
    height: 1.1em;
    background-color: var(--text-color);
    animation: blink 1s step-end infinite;
    vertical-align: bottom;
    margin-left: 5px;
}

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

p a {
    color: var(--highlight-color);
    text-decoration: none;
    border-bottom: 1px dashed var(--highlight-color);
    transition: all 0.2s;
}

p a:hover {
    background-color: rgba(0, 229, 255, 0.1);
    text-shadow: 0 0 5px var(--highlight-color);
}

/* --- CARTES DE PROJETS CLIQUABLES --- */
a.project-link-wrapper {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

.read-more-btn {
    display: inline-block;
    margin-top: 20px;
    font-size: 1.2em;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a.project-link-wrapper:hover .read-more-btn {
    color: var(--highlight-color);
    text-shadow: 0 0 8px var(--highlight-color);
}

/* --- IMAGES INDIVIDUELLES --- */
.inline-image {
    display: block;
    max-width: 100%;
    width: 700px; 
    margin: 30px auto 15px auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    opacity: 0.9;
    transition: all 0.4s ease;
}

.inline-image:hover {
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.15);
    border-color: var(--highlight-color);
}

.inline-caption {
    text-align: center;
    font-size: 0.85em;
    color: rgba(0, 255, 65, 0.7);
    margin-bottom: 35px;
}

/* --- ADAPTATION POUR ÉCRANS MOYENS/PETITS --- */
@media (max-width: 1100px) {
    .container {
        padding: 25px; /* Sur téléphone, on enlève le grand vide à gauche */
    }

    nav {
        position: static; /* Le menu redevient un bloc normal au-dessus du texte */
        width: 100%; 
        flex-direction: row; 
        flex-wrap: wrap; 
        justify-content: center;
        margin-bottom: 30px;
    }
    
    nav a {
        text-align: center;
        border-left: none; 
        border-bottom: 3px solid transparent; 
        white-space: normal; 
    }
    
    nav a:hover {
        transform: translateY(-3px); 
        border-left-color: transparent;
        border-bottom-color: var(--highlight-color);
    }

    nav a.active {
        border-left-color: transparent;
        border-bottom-color: var(--text-color);
        box-shadow: inset 0 -5px 10px -5px rgba(0, 255, 65, 0.3);
    }
}

/* =========================================
   LOGO HOLOGRAPHIQUE ANIMÉ (SVG+CSS)
   ========================================= */

.logo-container {
    position: fixed; /* Fixé à l'écran */
    top: 30px;       /* Ajustez la position selon vos goûts */
    right: 30px;     
    width: 80px;     /* Taille du logo */
    height: 80px;
    z-index: 1000;   /* Toujours au-dessus */
    opacity: 0.8;    /* Légèrement transparent par défaut */
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Structure du SVG */
.site-logo-svg {
    width: 100%;
    height: 100%;
}

/* Style des lignes du logo */
.logo-path {
    fill: none;
    /* La couleur des initiales : on utilise le Cyan Néon */
    stroke: var(--highlight-color); 
    stroke-width: 3px;
    stroke-linecap: round;
    stroke-linejoin: round;
    
    /* Effet néon de base */
    filter: drop-shadow(0 0 5px var(--highlight-color));
    
    /* On lance l'animation de scintillement */
    animation: flicker-hologram 4s linear infinite;
}

/* Interaction au survol */
.logo-container:hover {
    opacity: 1;
    transform: scale(1.1) rotate(-5deg); /* Grossit et tourne légèrement */
}

/* =========================================
   LOGO HOLOGRAPHIQUE Michel Quivront (QM)
   STYLE : GÉOMÉTRIQUE & PIXEL
   ========================================= */

.logo-container {
    position: fixed; /* Fixé à l'écran */
    top: 30px;       /* Ajustez la position selon vos goûts */
    left: 30px;     
    width: 80px;     /* Taille du logo */
    height: 80px;
    z-index: 1000;   /* Toujours au-dessus */
    opacity: 0.8;    /* Légèrement transparent par défaut */
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Structure du SVG */
.site-logo-svg {
    width: 100%;
    height: 100%;
}

/* Style des lignes du logo */
.logo-path {
    fill: rgba(0, 255, 65, 0.08);

    stroke: var(--text-color);
    stroke-width: 6px;

    stroke-linecap: round;
    stroke-linejoin: round;

    filter: drop-shadow(0 0 8px var(--text-color));

    animation: flicker-hologram 4s linear infinite;
}

/* Interaction au survol */
.logo-container:hover {
    opacity: 1;
    transform: scale(1.1) rotate(-5deg); /* Grossit et tourne légèrement */
}

/* L'ANIMATION : Scintillement d'Hologramme Instable */
@keyframes flicker-hologram {
    0%, 100% {
        opacity: 1;
        stroke: var(--text-color); /* Vert terminal de base */
        filter: drop-shadow(0 0 8px var(--text-color));
    }
    /* Micro-coupures aléatoires pour l'effet instable */
    5% { opacity: 0.2; filter: none; }
    6% { opacity: 1; filter: drop-shadow(0 0 8px var(--text-color)); }
    15% { opacity: 0.9; }
    16% { opacity: 0.1; filter: none; }
    17% { opacity: 1; filter: drop-shadow(0 0 8px var(--text-color)); }
    
    /* On introduit le cyan néon de manière subtile */
    25% { 
        filter: drop-shadow(0 0 12px var(--highlight-color)); 
        stroke: var(--highlight-color); 
    }
    
    /* Scintillement rapide */
    30% { opacity: 0.8; }
    31% { opacity: 1; }
    32% { opacity: 0.8; }
    33% { opacity: 1; }
    60% { filter: drop-shadow(0 0 8px var(--text-color)); stroke: var(--text-color); }
    
    /* Léger décalage horizontal (glitch) */
    80% { transform: translateX(0px); }
    81% { transform: translateX(2px); opacity: 0.6; }
    82% { transform: translateX(-2px); opacity: 1; }
    83% { transform: translateX(0px); }
}

/* ADAPTATION MOBILE */
@media (max-width: 1100px) {
    .logo-container {
        position: absolute; /* Ne flotte plus au défilement */
        top: 20px;
        right: 20px;
        width: 50px; /* Plus petit */
        height: 50px;
    }
    .logo-path {
        stroke-width: 10px; /* Lignes plus épaisses car plus petit */
    }
}

.project-status {
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    margin: 5px 0 10px 0;
    letter-spacing: 1px;
}

/* Projet terminé */
.status-done {
    color: #00ff41; /* vert terminal */
    text-shadow: 0 0 6px rgba(0,255,65,0.6);
}

/* Projet en cours */
.status-progress {
    color: #ffae00; /* orange warning */
    text-shadow: 0 0 6px rgba(255,174,0,0.6);
}

/* Option bonus : effet clignotant */
.status-progress::after {
    content: " █";
    animation: blink 1s infinite;
}

/* =========================================
   EFFETS PARASITES / TERMINAL VINTAGE
   ========================================= */

/* Grain animé (bruit de fond) */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.12'/%3E%3C/svg%3E");
    background-size: 180px 180px;
    mix-blend-mode: screen;
    animation: noiseFlicker 0.09s steps(1) infinite;
}

@keyframes noiseFlicker {
    0%   { opacity: 0;    background-position: 0px 0px; }
    8%   { opacity: 0.35; background-position: 40px 20px; }
    16%  { opacity: 0;    background-position: 80px 10px; }
    25%  { opacity: 0.2;  background-position: 10px 60px; }
    33%  { opacity: 0; }
    42%  { opacity: 0.3;  background-position: 90px 40px; }
    50%  { opacity: 0; }
    58%  { opacity: 0.15; background-position: 30px 90px; }
    66%  { opacity: 0; }
    75%  { opacity: 0.4;  background-position: 60px 5px; }
    83%  { opacity: 0; }
    91%  { opacity: 0.25; background-position: 20px 70px; }
    100% { opacity: 0; }
}

/* Ligne de balayage (tube cathodique) */
.glitch-bar {
    position: fixed;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to bottom,
        transparent,
        rgba(0, 255, 65, 0.12) 50%,
        transparent
    );
    pointer-events: none;
    z-index: 9997;
    animation: barSweep 7s linear infinite;
}

@keyframes barSweep {
    0%   { top: -6px; opacity: 0.8; }
    5%   { opacity: 0.8; }
    95%  { opacity: 0.3; }
    100% { top: 105vh; opacity: 0; }
}

/* Décalage chromatique RGB (glitch) */
.glitch-rgb {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    mix-blend-mode: screen;
    animation: rgbGlitch 8s linear infinite;
    box-shadow:
        inset 3px 0 0 rgba(255, 0, 60, 0.07),
        inset -3px 0 0 rgba(0, 229, 255, 0.07);
}

@keyframes rgbGlitch {
    0%, 87%, 89%, 91%, 93%, 100% {
        opacity: 0;
        transform: translateX(0);
    }
    88% {
        opacity: 1;
        transform: translateX(4px);
        box-shadow: inset 3px 0 0 rgba(255,0,60,0.12), inset -3px 0 0 rgba(0,229,255,0.12);
    }
    90% {
        opacity: 1;
        transform: translateX(-4px);
    }
    92% {
        opacity: 0.6;
        transform: translateX(2px);
    }
}