:root {
    --bg: #020814;
    --bg-alt: #06101f;
    --bg-deep: #01060f;

    --panel: rgba(6, 14, 28, 0.86);
    --panel-strong: rgba(8, 18, 36, 0.94);
    --panel-soft: rgba(255, 255, 255, 0.03);

    --border: rgba(0, 247, 255, 0.16);
    --border-strong: rgba(255, 0, 212, 0.26);

    --text: #edf7ff;
    --muted: #9fb4ca;
    --muted-2: #7f93aa;

    --cyan: #00f7ff;
    --cyan-2: #7affff;
    --cyan-soft: rgba(0, 247, 255, 0.14);

    --magenta: #ff00d4;
    --magenta-soft: rgba(255, 0, 212, 0.14);

    --green: #00ff9c;
    --green-soft: rgba(0, 255, 156, 0.12);

    --danger: #ff4b5c;
    --warn: #ffb703;
    --ok: #00d26a;

    --shadow-sm: 0 10px 24px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.30);
    --shadow-lg: 0 26px 72px rgba(0, 0, 0, 0.45);

    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 26px;

    --max: 1180px;
    --nav-height: 78px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Sora", Arial, sans-serif;
    color: var(--text);
    line-height: 1.65;
    background:
        radial-gradient(circle at 12% 8%, rgba(0, 247, 255, 0.08), transparent 0, transparent 24%),
        radial-gradient(circle at 86% 10%, rgba(255, 0, 212, 0.08), transparent 0, transparent 20%),
        radial-gradient(circle at 50% 0%, rgba(0, 247, 255, 0.04), transparent 0, transparent 35%),
        linear-gradient(180deg, #01060f 0%, #020814 38%, #04101c 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, black 38%, transparent 100%);
    opacity: 0.08;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 247, 255, 0.04), transparent 25%),
        radial-gradient(circle at 80% 15%, rgba(255, 0, 212, 0.04), transparent 22%);
    filter: blur(40px);
    z-index: 0;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.18s ease;
}

a:hover {
    color: var(--cyan-2);
    text-decoration: none;
}

p {
    margin-top: 0;
}

.container {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* NAV */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    background: rgba(4, 10, 20, 0.72);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 247, 255, 0.07);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.24);
}

.nav-inner {
    width: min(100% - 32px, var(--max));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.brand {
    font-family: "JetBrains Mono", monospace;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--magenta);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(255, 0, 212, 0.24);
}

.brand span {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 247, 255, 0.24);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-links a {
    position: relative;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 10px;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-1px);
    box-shadow: 0 0 14px rgba(0, 247, 255, 0.05);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.2s ease;
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* HAMBURGER */

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 0, 212, 0.14);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.nav-toggle:hover {
    background: rgba(255, 0, 212, 0.05);
    border-color: rgba(255, 0, 212, 0.22);
    box-shadow:
        0 0 14px rgba(255, 0, 212, 0.08),
        0 0 10px rgba(0, 247, 255, 0.05);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* HERO */

.hero {
    padding: 84px 0 58px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 28%, rgba(0, 247, 255, 0.06), transparent 0, transparent 24%),
        radial-gradient(circle at 78% 20%, rgba(255, 0, 212, 0.06), transparent 0, transparent 18%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: min(900px, 90vw);
    height: 420px;
    transform: translateX(-50%);
    background: radial-gradient(circle at center, rgba(0, 247, 255, 0.08), transparent 60%);
    filter: blur(18px);
    pointer-events: none;
    opacity: 0.7;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.12fr 0.95fr;
    gap: 36px;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    border-radius: 999px;
    border: 1px solid rgba(0, 247, 255, 0.16);
    background: rgba(0, 247, 255, 0.08);
    color: #bffcff;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.02),
        0 0 16px rgba(0, 247, 255, 0.06);
}

.badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(0, 255, 156, 0.65);
}

h1,
h2,
h3,
h4 {
    margin: 0 0 14px;
    line-height: 1.15;
    font-family: "Sora", Arial, sans-serif;
}

h1 {
    font-size: clamp(2.8rem, 5vw, 4.7rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.section-title {
    font-size: clamp(1.7rem, 2.5vw, 2.2rem);
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.hero-text,
.section-lead,
.card p,
.card li,
.repo-card p,
.loading-text,
.contact-box p,
.terminal-body p,
.mini-panel p {
    color: var(--muted);
}

.hero-text {
    max-width: 700px;
    font-size: 1.04rem;
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.96rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #04101c;
    background: linear-gradient(135deg, var(--cyan), var(--cyan-2));
    border: none;
    box-shadow:
        0 10px 24px rgba(0, 247, 255, 0.18),
        0 0 14px rgba(0, 247, 255, 0.08);
}

.btn-primary:hover {
    box-shadow:
        0 16px 34px rgba(0, 247, 255, 0.26),
        0 0 18px rgba(0, 247, 255, 0.12);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 0, 212, 0.12);
}

.btn-secondary:hover {
    border-color: rgba(255, 0, 212, 0.24);
    background: rgba(255, 0, 212, 0.05);
    box-shadow:
        0 0 14px rgba(255, 0, 212, 0.08),
        0 0 12px rgba(0, 247, 255, 0.05);
}

/* COMMON CARDS */

.terminal-card,
.card,
.repo-card {
    position: relative;
    overflow: hidden;
}

.card,
.repo-card {
    background: linear-gradient(180deg, rgba(7, 16, 30, 0.9), rgba(4, 11, 22, 0.97));
    border: 1px solid rgba(0, 247, 255, 0.12);
    border-radius: 20px;
    box-shadow:
        0 18px 44px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(0, 247, 255, 0.03),
        0 0 18px rgba(0, 247, 255, 0.04);
    padding: 24px;
    transition:
        transform 0.28s ease,
        border-color 0.28s ease,
        box-shadow 0.28s ease,
        background 0.28s ease;
}

.card::before,
.repo-card::before,
.terminal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 22%);
    pointer-events: none;
}

.card::after,
.repo-card::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at top left, rgba(0, 247, 255, 0.06), transparent 22%),
        radial-gradient(circle at bottom right, rgba(255, 0, 212, 0.05), transparent 24%);
    opacity: 0.8;
}

.card:hover,
.repo-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 0, 212, 0.22);
    box-shadow:
        0 24px 56px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(255, 0, 212, 0.05),
        0 0 20px rgba(0, 247, 255, 0.10),
        0 0 30px rgba(255, 0, 212, 0.08);
}

/* TERMINAL CARD */

.terminal-card {
    border-radius: 24px;
    border: 1px solid rgba(0, 247, 255, 0.18);
    background: linear-gradient(180deg, rgba(9, 18, 34, 0.96), rgba(3, 10, 22, 0.99));
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(0, 247, 255, 0.06),
        0 0 32px rgba(0, 247, 255, 0.08);
}

.terminal-card:hover {
    box-shadow:
        0 26px 62px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(0, 247, 255, 0.08),
        0 0 38px rgba(0, 247, 255, 0.12),
        0 0 24px rgba(255, 0, 212, 0.05);
}

.terminal-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-top span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-top span:nth-child(1) {
    background: var(--danger);
}

.terminal-top span:nth-child(2) {
    background: var(--warn);
}

.terminal-top span:nth-child(3) {
    background: var(--ok);
}

.terminal-body {
    padding: 28px 20px 24px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.98rem;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(255,255,255,0.01) 0px,
            rgba(255,255,255,0.01) 1px,
            transparent 2px,
            transparent 4px
        );
}

.terminal-body p {
    margin-bottom: 14px;
}

.prompt {
    font-family: "JetBrains Mono", monospace;
    color: var(--green);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(0, 255, 156, 0.18);
}

.terminal-body p:nth-child(odd) {
    color: #b9cae2;
}

/* SECTIONS */

section {
    padding: 34px 0;
    position: relative;
}

.section-lead {
    max-width: 840px;
    font-size: 1rem;
    margin-bottom: 24px;
}

/* GRIDS */

.grid-2,
.grid-3,
.project-list,
.repo-grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.repo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* TYPO INSIDE CONTENT */

.card h3,
.repo-card h3,
.mini-panel h4 {
    color: var(--text);
}

.card ul {
    margin: 12px 0 0;
    padding-left: 18px;
}

.card li {
    margin-bottom: 8px;
}

.card li::marker {
    color: var(--cyan);
}

/* FEATURED PROJECT */

.project-card {
    padding: 28px;
}

.featured-project {
    border: 1px solid rgba(0, 247, 255, 0.22);
    background:
        radial-gradient(circle at top right, rgba(255, 0, 212, 0.10), transparent 22%),
        linear-gradient(180deg, rgba(8, 19, 36, 0.96), rgba(4, 11, 22, 0.98));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.36),
        0 0 0 1px rgba(0, 247, 255, 0.06),
        0 0 24px rgba(0, 247, 255, 0.10),
        0 0 36px rgba(255, 0, 212, 0.08);
}

.featured-project:hover {
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 247, 255, 0.08),
        0 0 28px rgba(0, 247, 255, 0.14),
        0 0 40px rgba(255, 0, 212, 0.12);
}

.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 10px;
}

.featured-label {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--magenta);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(255, 0, 212, 0.22);
}

.project-meta,
.repo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 20px;
}

.project-meta span,
.repo-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(0, 247, 255, 0.07);
    border: 1px solid rgba(0, 247, 255, 0.14);
    color: #c4f7ff;
    font-size: 0.88rem;
    font-weight: 600;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.mini-panel {
    position: relative;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 247, 255, 0.08);
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.mini-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 0, 212, 0.22);
    background: rgba(255, 0, 212, 0.05);
    box-shadow:
        0 0 14px rgba(255, 0, 212, 0.06),
        0 0 12px rgba(0, 247, 255, 0.05);
}

/* GITHUB */

.github-toolbar {
    margin-bottom: 20px;
    padding: 18px 22px;
}

.github-toolbar p {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.repo-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 290px;
}

.repo-card-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.repo-card h3 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.2;
    color: var(--text);
    word-break: break-word;
}

.repo-description {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
    min-height: 78px;
}

.repo-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 18px;
}

.repo-stat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(0, 247, 255, 0.10);
    color: #cfeeff;
    font-size: 0.84rem;
    font-weight: 600;
}

.repo-stat svg {
    width: 14px;
    height: 14px;
    opacity: 0.9;
}

.repo-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
}

.repo-language {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
}

.repo-language-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 10px currentColor;
}

.repo-updated {
    font-size: 0.84rem;
    color: var(--muted-2);
}

.repo-card .btn {
    width: auto;
}

.loading-text {
    grid-column: 1 / -1;
}

/* CV */

.cv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

/* CONTACT */

.contact-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-box p {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.contact-box strong {
    min-width: 90px;
    display: inline-block;
    color: var(--muted);
}

.contact-box a {
    word-break: break-word;
}

.contact-value {
    color: var(--cyan);
    font-weight: 500;
}

/* FOOTER */

footer {
    padding: 38px 0 52px;
    text-align: center;
    color: var(--muted-2);
    font-size: 0.95rem;
}

/* RESPONSIVE */

@media (min-width: 901px) {
    .nav-links {
        display: flex !important;
    }
}

@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .repo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 900px) {
    .nav {
        height: auto;
        padding: 12px 0;
    }

    .nav-toggle {
        display: inline-flex;
        flex-shrink: 0;
    }

    .nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        padding: 14px;
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(8, 18, 36, 0.98), rgba(4, 11, 22, 0.98));
        border: 1px solid rgba(0, 247, 255, 0.12);
        box-shadow:
            0 18px 44px rgba(0, 0, 0, 0.32),
            0 0 0 1px rgba(0, 247, 255, 0.03),
            0 0 18px rgba(0, 247, 255, 0.04);
        z-index: 120;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .nav-links.show {
        display: grid;
    }

    .nav-links a {
        width: 100%;
        text-align: left;
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 0.95rem;
    }

    .nav-links a::after {
        display: none;
    }

    .grid-2,
    .grid-3,
    .project-list,
    .repo-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero {
        padding-top: 42px;
    }

    .hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn,
    .cv-actions .btn {
        width: 100%;
    }

    .project-card,
    .card,
    .repo-card {
        padding: 22px;
    }

    .github-toolbar p,
    .contact-box p {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .contact-box strong {
        min-width: auto;
    }

    .repo-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .repo-card .btn {
        width: 100%;
    }

    .repo-description {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 20px, var(--max));
    }

    .brand {
        font-size: 0.9rem;
        max-width: calc(100% - 60px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .nav-toggle {
        width: 42px;
        height: 42px;
    }

    .card,
    .repo-card,
    .project-card {
        padding: 20px;
    }

    .terminal-body {
        font-size: 0.9rem;
        padding: 22px 16px 18px;
    }

    .badge {
        font-size: 0.84rem;
    }

    .nav-links {
        padding: 12px;
    }

    .nav-links a {
        font-size: 0.92rem;
        padding: 11px 12px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    h1 {
        font-size: 2.1rem;
    }
}
/* DOCUMENTS : boutons alignés en bas des cartes */

#documents .card {
    display: flex;
    flex-direction: column;
}

#documents .card .cv-actions {
    margin-top: auto;
    padding-top: 18px;
}

/* PROJETS : cartes en longueur, une sous l'autre */

#avenir .repo-grid,
#autres-projets .repo-grid {
    grid-template-columns: 1fr;
    gap: 16px;
}

#avenir .repo-card,
#autres-projets .repo-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 0;
    padding: 22px 26px;
}

#avenir .repo-card:hover,
#autres-projets .repo-card:hover {
    transform: translateY(-3px);
}

#avenir .repo-card-top,
#autres-projets .repo-card-top {
    flex: 1;
    gap: 8px;
}

#avenir .repo-description,
#autres-projets .repo-description {
    min-height: 0;
    margin: 0;
    max-width: 780px;
}

#avenir .repo-meta,
#autres-projets .repo-meta {
    margin: 8px 0 0;
}

#avenir .repo-footer,
#autres-projets .repo-footer {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    width: 190px;
    flex-shrink: 0;
    margin-top: 0;
}

#avenir .repo-footer .btn,
#autres-projets .repo-footer .btn {
    width: 100%;
}

@media (max-width: 900px) {
    #avenir .repo-card,
    #autres-projets .repo-card {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    #avenir .repo-footer,
    #autres-projets .repo-footer {
        width: 100%;
    }
}

/* ================================================================
   AMÉLIORATIONS : CTA, chiffres clés, parcours, vignettes, animations
   ================================================================ */

/* Barre de progression de lecture */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 200;
    transform-origin: left;
    transform: scaleX(0);
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.5);
    pointer-events: none;
}

/* Lien actif dans le menu */
.nav-links a.active {
    color: var(--text);
    background: rgba(0, 247, 255, 0.07);
}

.nav-links a.active::after {
    transform: scaleX(1);
}

/* Hero : boutons */
.hero-actions .btn {
    min-width: 0;
}

/* Terminal animé */
.terminal-body .caret {
    display: inline-block;
    width: 9px;
    height: 1.05em;
    vertical-align: text-bottom;
    background: var(--green);
    box-shadow: 0 0 8px rgba(0, 255, 156, 0.6);
    animation: blink 1.05s steps(1) infinite;
}

.terminal-body .cmd {
    color: var(--text);
}

.terminal-body .out.ok {
    color: var(--green);
}

.terminal-body.typing p {
    visibility: hidden;
}

.terminal-body.typing p.shown {
    visibility: visible;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Chiffres clés */
.stats {
    padding: 8px 0 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat {
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(7, 16, 30, 0.9), rgba(4, 11, 22, 0.97));
    border: 1px solid rgba(0, 247, 255, 0.12);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26);
}

.stat-num {
    display: block;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(90deg, var(--cyan), var(--magenta));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

/* Parcours : frise */
.timeline {
    list-style: none;
    margin: 8px 0 34px;
    padding: 0 0 0 28px;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--cyan), var(--magenta));
    opacity: 0.55;
}

.tl-item {
    position: relative;
    padding: 0 0 26px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: -28px;
    top: 7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--cyan);
    box-shadow: 0 0 12px rgba(0, 247, 255, 0.45);
}

.tl-item.tl-now::before {
    border-color: var(--green);
    background: var(--green);
    box-shadow: 0 0 14px rgba(0, 255, 156, 0.7);
    animation: pulse 2s ease-in-out infinite;
}

.tl-date {
    display: inline-block;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--magenta);
    margin-bottom: 2px;
}

.tl-item h3 {
    margin: 0 0 4px;
    font-size: 1.12rem;
}

.tl-item p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0, 255, 156, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 156, 0.95); }
}

/* Vignettes des projets (schémas / captures) */
.shot {
    position: relative;
    flex-shrink: 0;
    width: 250px;
    aspect-ratio: 10 / 7;
    padding: 0;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(0, 247, 255, 0.18);
    background: #040c18;
    cursor: zoom-in;
    z-index: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.5s ease;
}

.shot-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(2, 8, 20, 0.82);
    border: 1px solid rgba(0, 247, 255, 0.28);
    color: var(--cyan-2);
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.shot:hover,
.shot:focus-visible {
    border-color: rgba(255, 0, 212, 0.4);
    box-shadow: 0 0 18px rgba(0, 247, 255, 0.14), 0 0 22px rgba(255, 0, 212, 0.1);
}

.shot:hover img,
.shot:focus-visible img {
    transform: scale(1.05);
}

.shot:hover .shot-hint,
.shot:focus-visible .shot-hint {
    opacity: 1;
    transform: none;
}

.shot:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
}

/* Les cartes projets contiennent maintenant une vignette */
#avenir .repo-card .repo-card-top,
#autres-projets .repo-card .repo-card-top {
    min-width: 0;
}

@media (max-width: 900px) {
    .shot {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .stat {
        padding: 14px 14px;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(1, 6, 15, 0.9);
    backdrop-filter: blur(6px);
    cursor: zoom-out;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: min(1100px, 100%);
    max-height: 88vh;
    border-radius: 14px;
    border: 1px solid rgba(0, 247, 255, 0.25);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 247, 255, 0.12);
    background: #040c18;
    animation: zoomin 0.25s ease;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 0, 212, 0.3);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

@keyframes zoomin {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: none; }
}

/* Lumière qui suit la souris sur les cartes */
.card::before,
.repo-card::before {
    background:
        radial-gradient(380px circle at var(--mx, 50%) var(--my, -40%), rgba(0, 247, 255, 0.11), transparent 55%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%);
}

/* Apparition au défilement (uniquement si JS actif) */
.js .reveal:not(.in) {
    opacity: 0;
    transform: translateY(14px);
}

.js .reveal.in {
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
    animation-delay: var(--d, 0ms);
}

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

/* Respect du réglage « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal:not(.in) {
        opacity: 1;
        transform: none;
    }

    .js .reveal.in,
    .lightbox img,
    .tl-item.tl-now::before,
    .terminal-body .caret {
        animation: none;
    }

    .scroll-progress {
        display: none;
    }
}

.shot img[src$=".svg"],
.shot img[src*="scanner"] {
    object-fit: contain;
    object-position: center;
}

/* Portrait hero */
.hero-id {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.hero-id .badge {
    margin-bottom: 0;
}

.avatar {
    width: 112px;
    height: 112px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cyan);
    box-shadow: 0 0 0 5px rgba(0, 247, 255, 0.08), 0 0 26px rgba(0, 247, 255, 0.35), 0 0 46px rgba(255, 0, 212, 0.18);
}

@media (max-width: 560px) {
    .avatar {
        width: 92px;
        height: 92px;
    }
}
