@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ========================================
   VARIABLES — Thème moderne, sobre et humain
======================================== */
:root {
    --fond:         #fafafa;
    --fond-clair:   #ffffff;
    --fond-survol:  #f4f4f5;
    --texte:        #27272a;
    --texte-gris:   #52525b;
    --bordure:      #e4e4e7;
    --accent:       #2563eb; /* Bleu pro */
    --accent-hover: #1d4ed8;
    --blanc:        #ffffff;
    --sidebar:      280px;
    --shadow-sm:    0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md:    0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius:       12px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fond:         #09090b;
        --fond-clair:   #18181b;
        --fond-survol:  #27272a;
        --texte:        #f4f4f5;
        --texte-gris:   #a1a1aa;
        --bordure:      #27272a;
        --accent:       #3b82f6;
        --accent-hover: #60a5fa;
        --blanc:        #ffffff;
        --shadow-sm:    0 1px 2px 0 rgb(0 0 0 / 0.5);
        --shadow-md:    0 4px 6px -1px rgb(0 0 0 / 0.5);
    }
}

/* ========================================
   RESET & BASE
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--texte);
    background-color: var(--fond);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--accent-hover); }

ul { list-style: none; }
strong { font-weight: 600; color: var(--texte); }

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background-color: var(--fond-survol);
    border: 1px solid var(--bordure);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--texte-gris);
}

/* ========================================
   ANIMATIONS FLUIDES
======================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Application d'un délai en cascade via nth-child pour les grilles */
.stat-card, .link-card, .comp-card, .certif-card, .project-card, .veille-card, .timeline-item {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.comp-grid > div:nth-child(1), .link-grid > a:nth-child(1) { animation-delay: 0.1s; }
.comp-grid > div:nth-child(2), .link-grid > a:nth-child(2) { animation-delay: 0.2s; }
.comp-grid > div:nth-child(3), .link-grid > a:nth-child(3) { animation-delay: 0.3s; }
.comp-grid > div:nth-child(4) { animation-delay: 0.4s; }
.comp-grid > div:nth-child(5) { animation-delay: 0.5s; }
.comp-grid > div:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   BARRE LATÉRALE
======================================== */
.sidebar {
    width: var(--sidebar);
    background-color: var(--fond-clair);
    border-right: 1px solid var(--bordure);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
}

.sidebar-header {
    padding: 32px 24px 24px;
    border-bottom: 1px solid var(--bordure);
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--texte);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo .dot { color: var(--accent); }

.role {
    font-size: 14px;
    color: var(--texte-gris);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.nav-panel {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--texte-gris);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-panel a:hover {
    color: var(--texte);
    background-color: var(--fond-survol);
}

.nav-panel a.active {
    color: var(--accent);
    background-color: var(--fond-survol);
}

.nav-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    opacity: 0.5;
    width: 20px;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--bordure);
    font-size: 12px;
}

.meta-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
.meta-line:last-child { margin-bottom: 0; }
.meta-key { color: var(--texte-gris); }
.meta-val { color: var(--texte); font-weight: 500; }

/* ========================================
   CONTENU PRINCIPAL
======================================== */
.main-content {
    margin-left: var(--sidebar);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-header {
    padding: 20px 48px;
    background-color: rgba(var(--fond-clair), 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bordure);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.breadcrumb {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--texte-gris);
}
.breadcrumb-current { color: var(--accent); }

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--texte);
    letter-spacing: -0.5px;
}

.container {
    padding: 48px;
    max-width: 1000px;
}

/* ========================================
   COMPOSANTS COMMUNS
======================================== */
.section-tag {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 500;
}

.section-headline {
    font-size: 32px;
    font-weight: 600;
    color: var(--texte);
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.section-desc {
    font-size: 16px;
    color: var(--texte-gris);
    max-width: 700px;
    margin-bottom: 40px;
}

/* Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--texte);
    color: var(--fond-clair);
    border: 1px solid var(--texte);
}
.btn-primary:hover {
    background-color: var(--texte-gris);
    border-color: var(--texte-gris);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: var(--fond-clair);
    color: var(--texte);
    border: 1px solid var(--bordure);
}
.btn-secondary:hover {
    background-color: var(--fond-survol);
    border-color: var(--texte-gris);
}

/* Cartes */
.card-base {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}
.card-base:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--texte-gris);
}

/* ========================================
   ACCUEIL
======================================== */
.hero-title {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
    color: var(--texte);
}
.hero-line { display: block; }
.hero-subtitle { color: var(--texte-gris); font-size: 32px; font-weight: 500; display: block; margin-top: 8px;}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 48px 0;
}
.stat-card {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 24px;
}
.stat-num {
    font-size: 32px;
    font-weight: 600;
    color: var(--texte);
    margin-bottom: 4px;
    letter-spacing: -1px;
}
.stat-label { font-size: 13px; color: var(--texte-gris); line-height: 1.5; }

.link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.link-card {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 24px;
    display: block;
}
.link-card h4 { font-size: 16px; font-weight: 600; color: var(--texte); margin-bottom: 8px; }
.link-card p { font-size: 14px; color: var(--texte-gris); margin: 0; }
.link-card:hover { transform: translateY(-3px); }

/* ========================================
   PROFIL & BIO
======================================== */
.bio-facts {
    list-style: none;
    margin-bottom: 24px;
}
.bio-facts li {
    padding: 12px 0;
    border-bottom: 1px solid var(--bordure);
    font-size: 15px;
    color: var(--texte-gris);
}
.bio-facts li:last-child { border-bottom: none; }
.bio-facts strong { color: var(--texte); width: 140px; display: inline-block; }

/* Compétences */
.comp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.comp-card {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 24px;
}
.comp-header { margin-bottom: 20px; }
.comp-title { font-size: 16px; font-weight: 600; color: var(--texte); }
.comp-desc { font-size: 13px; color: var(--texte-gris); }

.tech-list li {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tech-name { font-size: 14px; color: var(--texte); font-weight: 500; }
.tech-badge {
    font-size: 12px;
    background-color: var(--fond-survol);
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--texte-gris);
}

/* Certifications */
.certif-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.certif-card {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.certif-card h4 { font-size: 16px; margin-bottom: 4px; }
.certif-issuer { font-size: 13px; color: var(--texte-gris); margin-bottom: 12px; font-family: 'JetBrains Mono', monospace;}
.certif-desc { font-size: 14px; color: var(--texte-gris); flex: 1; margin-bottom: 16px; }

/* ========================================
   PROJETS (Liste)
======================================== */
.project-card {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.project-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
}
.project-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background-color: var(--fond-survol);
    color: var(--texte);
}

.project-title { font-size: 22px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.5px;}
.project-org { font-size: 14px; color: var(--texte-gris); margin-bottom: 24px; }

.project-summary {
    font-size: 15px;
    color: var(--texte-gris);
    margin-bottom: 24px;
}

/* ========================================
   PROJET DÉTAILLÉ (Détail)
======================================== */
.project-detail-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--bordure);
}

.detail-block {
    margin-bottom: 48px;
}
.detail-block h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--texte);
}
.detail-block p, .detail-block ul {
    font-size: 15px;
    color: var(--texte-gris);
    margin-bottom: 16px;
}
.detail-block ul {
    padding-left: 20px;
    list-style: disc;
}
.detail-block ul li { margin-bottom: 8px; }

.screenshot-container {
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--bordure);
    background-color: var(--fond-survol);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}
.screenshot-container img {
    width: 100%;
    height: auto;
    display: block;
}
.screenshot-caption {
    font-size: 13px;
    color: var(--texte-gris);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* ========================================
   TIMELINE
======================================== */
.timeline {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--bordure);
}
.timeline-item {
    position: relative;
    margin-bottom: 40px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--fond-clair);
    border: 2px solid var(--bordure);
}
.timeline-current::before {
    border-color: var(--accent);
    background-color: var(--accent);
}
.timeline-period { font-size: 13px; color: var(--texte-gris); font-weight: 500; display: block; margin-bottom: 4px; }
.timeline-title { font-size: 18px; font-weight: 600; color: var(--texte); }
.timeline-school { font-size: 14px; color: var(--texte-gris); margin-bottom: 8px; }

/* ========================================
   VEILLE
======================================== */
.veille-card {
    background-color: var(--fond-clair);
    border: 1px solid var(--bordure);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
}
.veille-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 16px; }

.rss-list li {
    padding: 16px 0;
    border-bottom: 1px solid var(--bordure);
    display: flex;
    gap: 16px;
}
.rss-list li:last-child { border-bottom: none; }
.rss-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--texte-gris);
    white-space: nowrap;
}
.rss-list a { color: var(--texte); font-weight: 500; }
.rss-list a:hover { color: var(--accent); }

/* ========================================
   FOOTER
======================================== */
.site-footer {
    padding: 32px 48px;
    border-top: 1px solid var(--bordure);
    background-color: var(--fond-clair);
    margin-top: auto;
    font-size: 13px;
    color: var(--texte-gris);
    display: flex;
    justify-content: space-between;
}

@media (max-width: 900px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; border-right: none; border-bottom: 1px solid var(--bordure); }
    .main-content { margin-left: 0; }
    .nav-panel { flex-direction: row; flex-wrap: wrap; }
    .container { padding: 24px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .comp-grid, .certif-grid { grid-template-columns: 1fr; }
}
