/* Importation des polices techniques */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;600&display=swap');

:root {
    --bg-color: #0b0c10;
    --card-bg: #111418;    /* Fond sombre type terminal */
    --sidebar-bg: #0d1013; /* Fond sidebar légèrement plus profond */
    --text-main: #c5c6c7;
    --highlight: #66fcf1;  /* Cyan Cyber */
    --secondary: #45a29e;  /* Bleu canard */
    --neon-green: #00ff41; /* Vert Matrix */
    --border-color: #2a2f35;
}

/* Base & Background Grid */
body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(102, 252, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 252, 241, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    pointer-events: none;
}

/* Navigation */
nav {
    background-color: rgba(11, 12, 16, 0.95);
    border-bottom: 1px solid var(--secondary);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
    backdrop-filter: blur(5px);
}

nav div {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav a:hover, nav a.active {
    color: var(--highlight);
    text-shadow: 0 0 8px rgba(102, 252, 241, 0.6);
}

/* Conteneurs */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    margin-top: 0;
}

h1 {
    font-size: 2.2em;
    border-left: 5px solid var(--highlight);
    padding-left: 15px;
}

/* --- STRUCTURE CV DASHBOARD --- */
.cv-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    min-height: 800px;
}

.cv-sidebar {
    background: var(--sidebar-bg);
    padding: 30px 20px;
    border-right: 1px solid var(--border-color);
}

.cv-main {
    padding: 40px;
    background: var(--card-bg);
}

/* Sidebar Elements */
.status-box {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8em;
    margin-bottom: 30px;
    padding: 10px;
    border: 1px solid #1a1d21;
    line-height: 1.8;
}

.online { color: var(--neon-green); font-weight: bold; }

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.sidebar-list li {
    font-size: 0.85em;
    margin-bottom: 8px;
    color: #888;
}

.sidebar-list li::before {
    content: "> ";
    color: var(--secondary);
}

.highlight-skill {
    color: var(--neon-green) !important;
    font-weight: bold;
}

.cv-sidebar h3 {
    font-size: 0.9em;
    color: var(--highlight);
    margin-bottom: 15px;
    border-bottom: 1px solid #1a1d21;
}

/* --- CARTES DE PROJETS & EXPERIENCES --- */
.project-card, .exp-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    transition: transform 0.2s;
}

.highlight-project {
    border-left: 4px solid var(--highlight) !important;
    background: linear-gradient(to right, rgba(102, 252, 241, 0.02), transparent);
}

.project-header, .exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2f35;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 15px;
}

.project-column h4 {
    font-size: 0.85em;
    color: var(--secondary);
    margin-bottom: 10px;
}

/* Listes & Tags */
.custom-list, .exp-list {
    list-style: none;
    padding: 0;
    font-size: 0.85em;
}

.custom-list li, .exp-list li {
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
}

.custom-list li::before, .exp-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--highlight);
}

.custom-list-block {
    background: #080a0c;
    padding: 15px;
    border: 1px solid #1a1d21;
    list-style: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    margin-top: 15px;
    color: #ccc;
}

.status-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7em;
    padding: 4px 10px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: bold;
}

.done { border: 1px solid var(--neon-green); color: var(--neon-green); }
.deployed { border: 1px solid var(--highlight); color: var(--highlight); }
.wip { border: 1px solid orange; color: orange; }

.tech-tag {
    background: #000;
    color: var(--secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75em;
    padding: 4px 10px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    border: 1px solid #1a1d21;
}

/* Boutons */
.btn {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 10px 25px;
    font-family: 'JetBrains Mono', monospace;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.85em;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--highlight);
    color: #000;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.4);
}

/* Footer & Formation */
.edu-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.9em;
    border-left: 2px solid #1a1d21;
    padding-left: 15px;
}

.edu-main strong { color: var(--highlight); display: block; }
.edu-meta { font-family: 'JetBrains Mono', monospace; color: var(--secondary); }

/* --- INTEGRATION PDF DIRECTE (Page CV) --- */
.pdf-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--highlight); /* Bordure Cyan Cyber pour coller au thème */
    padding: 5px;
    box-shadow: 0 0 15px rgba(102, 252, 241, 0.1); 
    height: 85vh; 
    min-height: 800px;
    display: flex;
}

.pdf-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #fff; /* Fond blanc au cas où le PDF met du temps à charger */
}

/* --- STYLE DE L'IMAGE DU CV --- */
.cv-image {
    width: 100%;
    max-width: 850px; /* Évite que le CV soit gigantesque sur un grand écran */
    height: auto;
    display: block;
    margin: 0 auto; /* Centre l'image */
    border: 1px solid var(--highlight); /* Petite bordure cyber */
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.15); /* Léger halo */
}

/* --- DASHBOARD GRID (Index) --- */
.dashboard-grid {
    margin-top: 80px;
    display: flex;
    flex-direction: column; /* Empile les éléments l'un en dessous de l'autre */
    gap: 30px;
    align-items: flex-start; /* Aligne la carte sur la gauche. Mets "center" si tu la veux au milieu */
    text-align: left;
}

.terminal-box {
    width: 100%; /* Le terminal prend toute la largeur dispo */
    box-sizing: border-box;
    background: #000;
    padding: 20px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    border: 1px solid #333;
}

/* --- CERTIFICATION CARD --- */
.cert-card {
    width: 100%;
    max-width: 350px;
    background: var(--card-bg);
    border: 1px solid var(--highlight);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(102, 252, 241, 0.2);
}

.cert-img-wrapper {
    height: 150px; /* Limite la hauteur de l'image pour que ce soit compact */
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cert-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Garde les proportions du diplôme */
}

.cert-title {
    background: var(--highlight);
    color: #000;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    text-align: center;
    font-size: 0.85em;
    padding: 12px;
    text-transform: uppercase;
}

/* Responsive (Toutes les adaptations mobile) */
@media (max-width: 850px) {
    .cv-wrapper { grid-template-columns: 1fr; }
    .cv-sidebar { border-right: none; border-bottom: 1px solid var(--border-color); }
    .project-grid { grid-template-columns: 1fr; }
    nav div { gap: 15px; }
    
    .dashboard-grid {
        grid-template-columns: 1fr; /* Les blocs s'empilent sur petit écran */
    }
}

/* --- MODAL (POP-UP CERTIFICATION) --- */
.modal {
    display: none; /* Caché par défaut */
    position: fixed; 
    z-index: 9999; /* Par-dessus tout le reste */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.85); /* Fond noir semi-transparent */
    backdrop-filter: blur(5px); /* Petit effet flou très cyber */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 80vh;
    border: 2px solid var(--highlight);
    box-shadow: 0 0 30px rgba(102, 252, 241, 0.3);
    animation: zoomIn 0.3s ease; /* Animation d'apparition */
}

.modal-caption {
    margin-top: 20px;
    color: var(--highlight);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2em;
    font-weight: bold;
    text-transform: uppercase;
    animation: zoomIn 0.3s ease;
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 50px;
    color: var(--text-main);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--highlight);
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}