@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Bebas+Neue&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --bg-void: #000000;
    --bg-deep: #080808;
    --bg-panel: #0d0d0d;
    --bg-card: #111111;
    --bg-hover: #161616;
    --red: #cc0000;
    --red-bright: #ff1a1a;
    --red-dim: #660000;
    --red-glow: rgba(204, 0, 0, 0.15);
    --grey-100: #f0f0f0;
    --grey-200: #c8c8c8;
    --grey-300: #a0a0a0;
    --grey-400: #707070;
    --grey-500: #404040;
    --grey-600: #282828;
    --border: #1e1e1e;
    --border-accent: #cc0000;
    --scan-line: rgba(255,255,255,0.015);
    --font-display: 'Bebas Neue', sans-serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Rajdhani', sans-serif;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-void);
    color: var(--grey-200);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    cursor: default;
}

/* ── SCANLINES OVERLAY ─────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        var(--scan-line) 2px,
        var(--scan-line) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ── NOISE TEXTURE ──────────────────────────────────────── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9998;
    opacity: 0.4;
}

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--red-dim); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── NAV ────────────────────────────────────────────────── */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: 1px solid var(--grey-500);
    color: var(--grey-200);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px 12px;
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 1001;
    font-family: var(--font-mono);
    letter-spacing: 1px;
    transition: all 0.2s;
}
.mobile-menu-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: rgba(0,0,0,0.97);
    backdrop-filter: blur(20px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    padding: 0 24px;
    border-bottom: 1px solid var(--grey-600);
    height: 56px;
}

nav::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, var(--red) 0%, transparent 60%);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: stretch;
    height: 100%;
}

nav ul li {
    position: relative;
    display: flex;
    align-items: stretch;
}

nav ul li a {
    display: flex;
    align-items: center;
    padding: 0 18px;
    color: var(--grey-300);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    gap: 8px;
}

nav ul li a i { color: var(--grey-500); font-size: 0.7rem; transition: color 0.2s; }

nav ul li a:hover {
    color: var(--grey-100);
    border-bottom-color: var(--red);
}
nav ul li a:hover i { color: var(--red); }

/* Dropdown */
nav ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0,0,0,0.98);
    border: 1px solid var(--grey-600);
    border-top: 1px solid var(--red-dim);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s;
    z-index: 100;
}

nav ul li:hover > ul {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

nav ul li ul li {
    display: block;
    border-bottom: 1px solid var(--border);
    /* Correctif du menu transparent intégré ici */
    background-color: #1a1a1a; 
    opacity: 1 !important; 
}
nav ul li ul li:last-child { border-bottom: none; }

nav ul li ul li a {
    padding: 12px 20px;
    font-size: 0.72rem;
    border-bottom: none;
    color: var(--grey-400);
}

nav ul li ul li a:hover {
    background: var(--red-glow);
    color: var(--grey-100);
}

/* ── CONTAINER ──────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 56px auto 0;
    padding: 40px 24px 60px;
}

/* ── HEADER HERO ────────────────────────────────────────── */
.header-content {
    position: relative;
    padding: 60px 40px;
    background: var(--bg-deep);
    border: 1px solid var(--grey-600);
    border-left: 3px solid var(--red);
    margin-bottom: 40px;
    overflow: hidden;
    animation: fadeSlideIn 0.8s ease-out both;
}

.header-content::before {
    content: 'SYSTEM ONLINE';
    position: absolute;
    top: 16px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--red-dim);
    letter-spacing: 3px;
    animation: blink 2s step-end infinite;
}

.header-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--red-glow) 0%, transparent 70%);
    pointer-events: none;
}

.header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 20px;
}

.name {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 8vw, 5rem); 
    letter-spacing: 6px;
    color: var(--grey-100);
    line-height: 0.9;
    text-shadow: 0 0 40px rgba(204,0,0,0.3);
    position: relative;
    white-space: nowrap; 
}

.name::before {
    content: attr(data-text);
    position: absolute;
    left: 2px;
    top: 0;
    width: 100%;
    height: 100%;
    line-height: inherit;
    color: var(--red);
    clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%);
    opacity: 0.5;
    animation: glitch 4s infinite;
    pointer-events: none;
}

.title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--red);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 12px;
}

.tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--grey-400);
    margin-top: 20px;
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 600px;
}

.tagline span {
    color: var(--grey-200);
    font-weight: 600;
}

.status-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--grey-500);
    letter-spacing: 1px;
}

.status-badge .live {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--grey-300);
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--red);
    animation: pulse-red 1.5s infinite;
}

/* ── SECTION TITLES ─────────────────────────────────────── */
.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.section-label::before {
    content: '//';
    font-family: var(--font-mono);
    color: var(--red);
    font-size: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    letter-spacing: 4px;
    color: var(--grey-100);
    text-transform: uppercase;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--grey-600), transparent);
}

/* ── PANEL / CARD ───────────────────────────────────────── */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--grey-600);
    position: relative;
    margin-bottom: 24px;
    transition: border-color 0.2s, transform 0.2s;
}

.panel:hover {
    border-color: var(--grey-500);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--red-dim);
    transition: background 0.2s;
}

.panel:hover::before {
    background: var(--red);
}

.panel-inner {
    padding: 28px 32px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--grey-500);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.panel-header .panel-id { color: var(--red-dim); }

/* ── ITEM CARDS (experience, education) ─────────────────── */
.item-card {
    padding: 20px 24px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    margin-bottom: 16px;
    position: relative;
    transition: all 0.2s;
    border-left: 2px solid var(--grey-500);
}

.item-card:hover {
    border-left-color: var(--red);
    background: var(--bg-hover);
    transform: translateX(4px);
}

/* Rendre les cartes cliquables esthétiquement interactives */
.item-card.clickable:hover {
    border-color: var(--red-dim);
    background: rgba(204, 0, 0, 0.05);
}

.item-card-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 2px;
    color: var(--grey-100);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.item-card-title i { color: var(--red); font-size: 0.9rem; }

.item-card-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--grey-400);
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-card-meta i { color: var(--grey-600); }
.item-card-meta a { color: var(--grey-400); text-decoration: none; }
.item-card-meta a:hover { color: var(--red); }

.item-card-desc {
    font-size: 0.9rem;
    color: var(--grey-300);
    line-height: 1.7;
    font-weight: 300;
}

/* ── SKILL GRID ─────────────────────────────────────────── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2px;
}

.skill-cell {
    background: var(--bg-card);
    padding: 28px 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.skill-cell::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--red-dim);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.skill-cell:hover::after { transform: scaleX(1); }

.skill-cell:hover {
    background: var(--bg-hover);
    transform: translateY(-3px);
}

.skill-cell i {
    font-size: 2rem;
    color: var(--red-dim);
    margin-bottom: 16px;
    display: block;
    transition: color 0.2s;
}

.skill-cell:hover i { color: var(--red); }

.skill-cell h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: var(--grey-200);
    margin-bottom: 10px;
}

.skill-cell p {
    font-size: 0.82rem;
    color: var(--grey-400);
    line-height: 1.5;
}

.skill-cell a { text-decoration: none; color: inherit; }

/* ── TAGS ───────────────────────────────────────────────── */
.tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 2px;
    padding: 3px 10px;
    border: 1px solid var(--grey-500);
    color: var(--grey-300);
    text-transform: uppercase;
    margin: 3px;
    transition: all 0.2s;
}

.tag:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 28px;
    border: 1px solid var(--grey-500);
    color: var(--grey-200);
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--red);
    transition: width 0.3s;
}

.btn:hover {
    border-color: var(--red);
    color: var(--red);
    text-shadow: 0 0 10px rgba(204,0,0,0.5);
}

.btn:hover::before { width: 100%; }

.btn-primary {
    border-color: var(--red-dim);
    color: var(--grey-100);
    background: rgba(204,0,0,0.08);
}

.btn-primary:hover {
    background: rgba(204,0,0,0.2);
    border-color: var(--red);
}

/* ── NAV BUTTONS (slides) ───────────────────────────────── */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 32px 0;
}

/* ── SLIDE INDICATORS ───────────────────────────────────── */
.slide-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.slide-indicator {
    width: 24px;
    height: 2px;
    background: var(--grey-600);
    cursor: pointer;
    transition: all 0.3s;
}

.slide-indicator.active {
    background: var(--red);
    width: 40px;
}

/* ── SLIDES CONTAINER ───────────────────────────────────── */
.slides-container {
    position: relative;
    height: auto;
    min-height: 440px;
    overflow: hidden;
    border: 1px solid var(--grey-600);
    background: var(--bg-deep);
    margin-bottom: 8px;
}

.slide {
    position: absolute;
    inset: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.5s cubic-bezier(0.4,0,0.2,1);
    z-index: 1;
    overflow-y: auto;
}

.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

/* ── CONTACT ────────────────────────────────────────────── */
.contact-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2px;
    margin: 32px 0;
}

.contact-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.contact-item:hover {
    background: var(--bg-hover);
    border-color: var(--grey-500);
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--red-dim);
    width: 20px;
}

.contact-item a {
    color: var(--grey-300);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.contact-item a:hover { color: var(--red); }

/* ── DIVIDER ────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: linear-gradient(90deg, var(--red-dim), var(--grey-600) 40%, transparent);
    margin: 40px 0;
}

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px;
    background: var(--bg-void);
    border-top: 1px solid var(--grey-600);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--grey-500);
    letter-spacing: 3px;
    text-transform: uppercase;
}

footer::before {
    content: '[ ';
    color: var(--red-dim);
}
footer::after {
    content: ' ]';
    color: var(--red-dim);
}

/* ── PROJECT CARD ───────────────────────────────────────── */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--grey-600);
    padding: 32px;
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--red-dim);
    transition: background 0.2s;
}

.project-card:hover {
    border-color: var(--grey-500);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(204,0,0,0.15);
}

.project-card:hover::after { background: var(--red); }

.project-icon {
    font-size: 2.5rem;
    color: var(--red-dim);
    margin-bottom: 20px;
    display: block;
}

.project-name {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--grey-100);
    margin-bottom: 12px;
}

.project-description {
    color: var(--grey-400);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.project-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--red);
    text-decoration: none;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    transition: all 0.2s;
}

.project-link:hover { color: var(--red-bright); text-shadow: 0 0 10px rgba(255,26,26,0.4); }

/* ── TP CONTENT ─────────────────────────────────────────── */
.content-section {
    background: var(--bg-panel);
    border: 1px solid var(--grey-600);
    border-left: 3px solid var(--red-dim);
    padding: 32px 36px;
    margin-bottom: 24px;
    position: relative;
}

.content-section h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 3px;
    color: var(--grey-100);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-section h2 i { color: var(--red); font-size: 1.2rem; }

.content-section h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--grey-200);
    margin: 20px 0 10px;
}

.content-section p {
    color: var(--grey-300);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.content-section ul {
    list-style: none;
    margin-bottom: 16px;
}

.content-section ul li {
    color: var(--grey-300);
    font-size: 0.9rem;
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
    margin-bottom: 6px;
}

.content-section ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--red-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.content-section code {
    background: var(--bg-void);
    border: 1px solid var(--grey-600);
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 2px 8px;
}

.content-section pre {
    background: var(--bg-void);
    border: 1px solid var(--grey-600);
    border-left: 2px solid var(--red-dim);
    padding: 20px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--grey-300);
    line-height: 1.6;
}

.info-box {
    background: rgba(204,0,0,0.06);
    border: 1px solid var(--red-dim);
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 0.88rem;
    color: var(--grey-300);
}

.info-box::before {
    content: '! ';
    color: var(--red);
    font-family: var(--font-mono);
    font-weight: bold;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--grey-400);
    border: 1px solid var(--grey-600);
    padding: 10px 24px;
    transition: all 0.2s;
    margin-bottom: 32px;
    margin-top: 16px;
}

.back-btn:hover {
    color: var(--red);
    border-color: var(--red);
}

/* ── COMING SOON ────────────────────────────────────────── */
.coming-soon {
    text-align: center;
    padding: 48px;
    background: var(--bg-deep);
    border: 1px solid var(--grey-600);
    border-style: dashed;
    margin-top: 32px;
}

.coming-soon-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 4px;
    color: var(--grey-500);
    margin-bottom: 12px;
}

/* ── ANIMATIONS ─────────────────────────────────────────── */
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(204,0,0,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(204,0,0,0); }
}

@keyframes glitch {
    0%, 90%, 100% { clip-path: polygon(0 30%, 100% 30%, 100% 50%, 0 50%); transform: translate(0); }
    91% { clip-path: polygon(0 10%, 100% 10%, 100% 25%, 0 25%); transform: translate(-2px); }
    93% { clip-path: polygon(0 60%, 100% 60%, 100% 75%, 0 75%); transform: translate(2px); }
    95% { clip-path: polygon(0 45%, 100% 45%, 100% 55%, 0 55%); transform: translate(-1px); }
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }

    nav {
        flex-direction: column;
        height: auto;
        padding: 0;
    }
    nav ul {
        flex-direction: column;
        display: none;
        width: 100%;
    }
    nav ul.show { display: flex; }
    nav ul li { width: 100%; border-bottom: 1px solid var(--border); }
    nav ul li a { padding: 14px 20px; }
    nav ul li ul {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        display: none; box-shadow: none;
        border: none; width: 100%;
        background: var(--bg-deep);
    }
    nav ul li.active > ul { display: block; }

    .header-content { padding: 40px 24px; }
    
    .header-grid { 
        display: flex !important;
        flex-direction: column;
        gap: 20px;
    }

    .title { font-size: 0.8rem; }
    
    .status-badge { 
        display: flex;
        align-self: flex-start;
        width: 100%;
        box-sizing: border-box;
    }
    
    .slide { padding: 24px; }
    .panel-inner { padding: 20px; }
    .panel { padding: 20px 15px !important; }

    .skills-grid {
        grid-template-columns: 1fr !important;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }
    .nav-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 15px;
    }

    .contact-section {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start !important;
    }
    .contact-item {
        width: 100%;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .container { padding: 24px 16px; }
}
