/* ═══════════════════════════════════
   ETHAN PORTFOLIO — style.css
   Shared across all pages
═══════════════════════════════════ */

:root {
    --bg:         #0d0d0f;
    --bg-alt:     #111115;
    --surface:    #18181d;
    --border:     #2a2a35;
    --text:       #e8e8ee;
    --text-muted: #7a7a8c;
    --accent:     #6ee7b7;
    --accent-2:   #818cf8;
    --danger:     #f472b6;

    --font-head: 'Syne', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --r-sm: 6px;
    --r-md: 12px;
    --r-lg: 20px;
    --nav-h: 64px;
    --max-w: 1120px;
    --trans: 0.2s ease;
}

[data-theme="light"] {
    --bg:         #f5f5f7;
    --bg-alt:     #ffffff;
    --surface:    #ebebf0;
    --border:     #d0d0dc;
    --text:       #1a1a24;
    --text-muted: #555565;
    --accent:     #0d9e6e;
    --accent-2:   #5b63e8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { padding-left: 1.5rem; }
li { margin-bottom: 0.4rem; }

/* ── Utility ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }

.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 1rem;
}
.section-desc {
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 3rem;
    font-size: 0.95rem;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(13,13,15,0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
[data-theme="light"] .navbar { background: rgba(245,245,247,0.88); }

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.nav-logo {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.05em;
}
.logo-dot { color: var(--accent); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-link {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    transition: color var(--trans);
}
.nav-link:hover, .nav-link.active { color: var(--accent); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: var(--r-sm);
    font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--trans);
}
.theme-btn:hover { color: var(--text); border-color: var(--accent); }

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.3s; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    border-top: 1px solid var(--border);
    gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mob-link {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color var(--trans);
}
.mob-link:hover { color: var(--accent); }

/* ── Hero (index only) ── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-h);
    text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-img {
    position: absolute;
    inset: 0;
    background: url('../assets/images/main_menu_portfolio3.jpg') center/cover no-repeat;
    opacity: 0.18;
}
[data-theme="light"] .hero-img { opacity: 0.12; }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, var(--bg) 100%);
}
.grid-lines {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.2;
}
.glow { position: absolute; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.glow-1 { width: 500px; height: 500px; background: rgba(110,231,183,0.08); top: 10%; left: -10%; }
.glow-2 { width: 400px; height: 400px; background: rgba(129,140,248,0.08); bottom: 10%; right: -5%; }

.hero-content { position: relative; z-index: 1; max-width: 760px; padding: 0 2rem; }
.hero-tag {
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
}
.hero-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 800;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}
.title-line.accent { color: var(--accent); }
.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}
.hero-sub strong { color: var(--text); }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stack { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.hero-stack span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.3rem 0.75rem;
    border-radius: var(--r-sm);
    color: var(--text-muted);
}
.scroll-arrow {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
    text-decoration: none;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--r-sm);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all var(--trans);
}
.btn-primary { background: var(--accent); color: #0d0d0f; }
.btn-primary:hover { background: #a7f3d0; text-decoration: none; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-full { width: 100%; justify-content: center; }

/* ── About ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.about-text p { margin-bottom: 1.25rem; color: var(--text-muted); font-size: 0.95rem; }
.about-text p strong { color: var(--text); }
.about-socials { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }
.social-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.4rem 1rem;
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    text-decoration: none;
    transition: all var(--trans);
}
.social-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--accent), var(--border));
}
.tl-item { position: relative; margin-bottom: 2rem; }
.tl-item::before {
    content: '';
    position: absolute;
    left: -1.6rem; top: 6px;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
}
.tl-date { font-size: 0.75rem; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.tl-body strong { display: block; font-family: var(--font-head); font-size: 1rem; margin-bottom: 0.25rem; }
.tl-body p { font-size: 0.85rem; color: var(--text-muted); }

.skills-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.skill-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    transition: border-color var(--trans), transform var(--trans);
}
.skill-block:hover { border-color: var(--accent); transform: translateY(-2px); }
.skill-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.skill-block h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; }
.skill-block p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; }

/* ── Filter / Projects ── */
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    padding: 0.4rem 1rem;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--trans);
}
.filter-btn:hover, .filter-btn.active { background: var(--accent); border-color: var(--accent); color: #0d0d0f; font-weight: 700; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.project-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color var(--trans), transform var(--trans);
}
.project-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.project-card.hidden { display: none; }
.project-card.featured { border-color: var(--accent-2); }
.project-card.featured:hover { border-color: var(--accent); }

.card-header { display: flex; align-items: center; justify-content: space-between; }
.card-icon { font-size: 1.4rem; }
.card-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: var(--text-muted); }
.badge { background: var(--accent-2); color: white; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.68rem; font-weight: 700; }
.badge-green { background: var(--accent); color: #0d0d0f; }
.project-card h3 { font-size: 1rem; font-weight: 700; }
.project-card p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.65; flex: 1; }
.project-card p a { color: var(--accent); }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.card-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    color: var(--text-muted);
}
.card-links { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.card-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.35rem 0.85rem;
    background: var(--accent);
    color: #0d0d0f;
    border-radius: var(--r-sm);
    text-decoration: none;
    font-weight: 700;
    transition: all var(--trans);
}
.card-link:hover { background: #a7f3d0; text-decoration: none; }
.card-link.outline { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.card-link.outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── Blog ── */
.blog-filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: border-color var(--trans), transform var(--trans);
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.blog-card.hidden { display: none; }
.blog-card.soon { opacity: 0.65; }
.blog-top { display: flex; align-items: center; justify-content: space-between; }
.blog-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
}
.cat-tutoriel { background: rgba(110,231,183,0.15); color: var(--accent); }
.cat-veille { background: rgba(129,140,248,0.15); color: var(--accent-2); }
.cat-experience { background: rgba(244,114,182,0.15); color: var(--danger); }
.blog-time { font-size: 0.72rem; color: var(--text-muted); }
.blog-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.35; }
.blog-card p { font-size: 0.82rem; color: var(--text-muted); flex: 1; line-height: 1.65; }
.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.blog-date { font-size: 0.72rem; color: var(--text-muted); }
.blog-link { font-size: 0.78rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.blog-link:hover { opacity: 0.7; text-decoration: none; }
.blog-soon { font-size: 0.78rem; color: var(--text-muted); }

/* ── Resources ── */
.resources-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 4rem; }
.resource-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    transition: border-color var(--trans);
}
.resource-card:hover { border-color: var(--accent); }
.res-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.resource-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; }
.resource-card ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.resource-card li { display: flex; flex-direction: column; gap: 0.15rem; }
.resource-card a { font-size: 0.85rem; font-weight: 700; color: var(--text); text-decoration: none; transition: color var(--trans); }
.resource-card a:hover { color: var(--accent); }
.resource-card span { font-size: 0.7rem; color: var(--text-muted); }

.faq-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.5rem; max-width: 760px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.faq-q {
    width: 100%;
    background: var(--surface);
    border: none;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    transition: background var(--trans);
}
.faq-q:hover { background: var(--bg); }
.faq-arrow { font-size: 1.2rem; color: var(--accent); transition: transform 0.3s; flex-shrink: 0; }
.faq-item.open .faq-arrow { transform: rotate(45deg); }
.faq-a { display: none; padding: 0 1.25rem 1.25rem; background: var(--surface); border-top: 1px solid var(--border); }
.faq-item.open .faq-a { display: block; }
.faq-a p { font-size: 0.85rem; color: var(--text-muted); padding-top: 1rem; line-height: 1.75; }
.faq-a strong { color: var(--text); }

/* ── Contact ── */
.contact-layout { display: grid; grid-template-columns: 1fr minmax(0, 380px); gap: 3rem; align-items: start; }
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.form-field input, .form-field textarea {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    padding: 0.8rem 1rem;
    border-radius: var(--r-sm);
    outline: none;
    transition: border-color var(--trans);
    resize: vertical;
}
.form-field input:focus, .form-field textarea:focus { border-color: var(--accent); }
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-muted); opacity: 0.5; }
.contact-info { display: flex; flex-direction: column; gap: 1rem; }
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.25rem;
    transition: border-color var(--trans);
}
.contact-card:hover { border-color: var(--accent); }
.cc-icon { font-size: 1.3rem; margin-bottom: 0.5rem; }
.contact-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.25rem; }
.contact-card p { font-size: 0.82rem; color: var(--text-muted); }
.contact-card a { font-size: 0.82rem; color: var(--accent); }
.contact-card small { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.25rem; }
.status-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
}
.status-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── Footer ── */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 2rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }
.back-top {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 0.35rem 0.85rem;
    border-radius: var(--r-sm);
    transition: all var(--trans);
}
.back-top:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 2rem; right: 2rem;
    background: var(--accent);
    color: #0d0d0f;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 1rem 1.5rem;
    border-radius: var(--r-sm);
    z-index: 999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ══════════════════════════════════
   PROJECT / BLOG DETAIL PAGES
══════════════════════════════════ */
.page-content {
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 5rem;
    min-height: 100vh;
}

.page-header {
    max-width: var(--max-w);
    margin: 0 auto 3rem;
    padding: 0 2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--text-muted); }

.page-hero-img {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto 3rem;
    padding: 0 2rem;
}
.page-hero-img img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
}

.page-title { font-size: clamp(1.6rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 0.75rem; }
.page-subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.page-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}
.meta-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.35rem 0.85rem;
    border-radius: var(--r-sm);
}
.meta-chip strong { color: var(--accent); }

.tech-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.5rem 0; }
.tech-pill {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(110,231,183,0.1);
    border: 1px solid rgba(110,231,183,0.3);
    color: var(--accent);
    padding: 0.35rem 0.9rem;
    border-radius: var(--r-sm);
}

/* Page body content */
.page-body {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr minmax(0, 300px);
    gap: 3rem;
    align-items: start;
}

.page-main h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text);
    border-left: 3px solid var(--accent);
    padding-left: 0.75rem;
}
.page-main h2:first-child { margin-top: 0; }
.page-main h3 { font-size: 1.05rem; font-weight: 700; margin: 1.5rem 0 0.5rem; color: var(--text); }
.page-main p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.page-main p strong { color: var(--text); }
.page-main ul { margin-bottom: 1rem; }
.page-main li { font-size: 0.88rem; color: var(--text-muted); line-height: 1.8; }
.page-main a { color: var(--accent); }

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}
.feature-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.25rem;
    transition: border-color var(--trans);
}
.feature-item:hover { border-color: var(--accent); }
.feature-item .fi-icon { font-size: 1.4rem; margin-bottom: 0.5rem; }
.feature-item h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.3rem; }
.feature-item p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.steps-list { display: flex; flex-direction: column; gap: 1rem; margin: 1.5rem 0; }
.step-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.step-num {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(110,231,183,0.1);
    border: 1px solid rgba(110,231,183,0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
}
.step-item h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.25rem; }
.step-item p { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.65; }

/* Sidebar */
.page-sidebar { position: sticky; top: calc(var(--nav-h) + 2rem); }
.sidebar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}
.sidebar-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 1rem; color: var(--accent); border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.sidebar-meta { display: flex; flex-direction: column; gap: 0.75rem; }
.sm-row { display: flex; flex-direction: column; gap: 0.15rem; }
.sm-label { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); }
.sm-value { font-size: 0.88rem; font-weight: 700; }
.sidebar-links { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.7rem 1rem;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: all var(--trans);
}
.sidebar-link.primary { background: var(--accent); color: #0d0d0f; }
.sidebar-link.primary:hover { background: #a7f3d0; text-decoration: none; }
.sidebar-link.secondary { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); }
.sidebar-link.secondary:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Blog Article ── */
.article-body { max-width: 780px; margin: 0 auto; padding: 0 2rem; }
.article-intro { font-size: 1.1rem; color: var(--text-muted); line-height: 1.9; margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border); }
.article-section { margin-bottom: 3rem; }
.article-section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem; }
.article-section h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: var(--accent); }
.article-section p { font-size: 0.93rem; color: var(--text-muted); line-height: 1.9; margin-bottom: 1rem; }
.article-section p strong { color: var(--text); }
.article-section ul, .article-section ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.article-section li { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; }
.article-section li strong { color: var(--text); }

.ref-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.ref-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.75rem; }
.ref-card h4 a { color: var(--text); text-decoration: underline; }
.ref-card h4 a:hover { color: var(--accent); }
.ref-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 0.75rem; }
.ref-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ref-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    background: rgba(110,231,183,0.1);
    border: 1px solid rgba(110,231,183,0.25);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.article-back {
    max-width: 780px;
    margin: 3rem auto 0;
    padding: 0 2rem;
}

/* ── Code blocks ── */
.code-block {
    background: #0a0a0c;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}
.code-block pre {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    color: var(--accent);
    white-space: pre;
}

/* ── Reveal animations ── */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .skills-grid { grid-template-columns: repeat(2,1fr); }
    .resources-grid { grid-template-columns: repeat(2,1fr); }
    .projects-grid { grid-template-columns: repeat(2,1fr); }
    .blog-grid { grid-template-columns: repeat(2,1fr); }
    .contact-layout { grid-template-columns: 1fr; }
    .page-body { grid-template-columns: 1fr; }
    .page-sidebar { position: static; }
    .features-list { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .burger { display: flex; }
    .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .projects-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
    .resources-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 70px 0; }
    .hero-title { font-size: clamp(2.5rem,15vw,5rem); }
    .page-meta { gap: 0.5rem; }
}
@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: center; }
}

/* ══════════════════════════════════
   NEW COMPONENTS — E4 additions
══════════════════════════════════ */

/* ── Annexe 8.1 banner ── */
.annexe-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(110,231,183,0.08), rgba(129,140,248,0.06));
    border: 1px solid var(--accent);
    border-radius: var(--r-md);
    padding: 1.25rem 1.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.annexe-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.annexe-icon { font-size: 2rem; }
.annexe-info strong { display: block; font-family: var(--font-head); font-size: 1rem; margin-bottom: 0.2rem; }
.annexe-info p { font-size: 0.82rem; color: var(--text-muted); margin: 0; }
.annexe-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* ── Stage section ── */
.stage-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.stage-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 2rem;
    transition: border-color var(--trans);
}
.stage-card.featured-stage { border-color: var(--accent-2); }
.stage-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.stage-logo {
    font-size: 2.5rem;
    width: 64px; height: 64px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stage-header h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.2rem; }
.stage-period {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent);
    letter-spacing: 0.06em;
}
.stage-body { display: grid; grid-template-columns: 1fr minmax(0, 280px); gap: 2rem; margin-bottom: 1.5rem; }
.stage-missions h4, .stage-skills h4 {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.missions-list { display: flex; flex-direction: column; gap: 1.25rem; }
.mission-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.mission-icon { font-size: 1.4rem; flex-shrink: 0; }
.mission-item strong { display: block; font-size: 0.95rem; margin-bottom: 0.3rem; }
.mission-item p { font-size: 0.82rem; color: var(--text-muted); margin: 0; line-height: 1.65; }
.stage-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: rgba(129,140,248,0.06);
    border: 1px dashed var(--accent-2);
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
}
@media (max-width: 768px) {
    .stage-body { grid-template-columns: 1fr; }
    .annexe-banner { flex-direction: column; align-items: flex-start; }
}

/* ── Skills with levels ── */
.skills-level-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
.skill-level-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1.25rem;
    transition: border-color var(--trans), transform var(--trans);
}
.skill-level-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.slc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.slc-name { font-size: 0.9rem; font-weight: 700; }
.slc-icon { font-size: 1.3rem; }
.slc-bar { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; margin-bottom: 0.4rem; }
.slc-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.slc-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
@media (max-width: 768px) { .skills-level-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .skills-level-grid { grid-template-columns: 1fr; } }

/* ── Projet pro banner ── */
.projetpro-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, rgba(129,140,248,0.08), rgba(110,231,183,0.06));
    border: 1px solid var(--accent-2);
    border-radius: var(--r-md);
    padding: 1.5rem 1.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.pp-content { display: flex; align-items: flex-start; gap: 1rem; }
.pp-icon { font-size: 2rem; flex-shrink: 0; }
.pp-content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.pp-content p { font-size: 0.85rem; color: var(--text-muted); margin: 0; line-height: 1.7; }
.pp-content strong { color: var(--text); }
@media (max-width: 768px) { .projetpro-banner { flex-direction: column; } }

/* ── Stage context block ── */
.stage-context {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.stage-context-item { display: flex; flex-direction: column; gap: 0.15rem; min-width: min(180px, 100%); }
.ctx-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
}
.stage-context-item span:last-child { font-size: 0.85rem; }

/* ── Rapport de stage banner ── */
.stage-rapport {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(110,231,183,0.07), rgba(129,140,248,0.05));
    border: 1px solid var(--accent);
    border-radius: var(--r-md);
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.rapport-info { display: flex; align-items: center; gap: 1rem; }
.rapport-icon { font-size: 2rem; flex-shrink: 0; }
.rapport-info strong { display: block; font-size: 0.95rem; margin-bottom: 0.2rem; }
.rapport-info p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
.rapport-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
@media (max-width: 600px) {
    .stage-rapport { flex-direction: column; align-items: flex-start; }
}

/* ── Light mode overrides — code & article elements ── */
[data-theme="light"] .code-block { background: #1e1e2e; border-color: #3a3a5a; }
[data-theme="light"] .code-block pre { color: #e8e8ee; }
[data-theme="light"] .ref-card { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .ref-card h4 a { color: var(--accent); }
[data-theme="light"] .ref-tag { background: rgba(13,158,110,0.12); color: var(--accent); border-color: rgba(13,158,110,0.3); }
[data-theme="light"] .annexe-banner { background: linear-gradient(135deg, rgba(13,158,110,0.08), rgba(91,99,232,0.06)); }
[data-theme="light"] .projetpro-banner { background: linear-gradient(135deg, rgba(91,99,232,0.08), rgba(13,158,110,0.06)); border-color: var(--accent-2); }
[data-theme="light"] .stage-card { background: var(--surface); }
[data-theme="light"] .stage-rapport { background: linear-gradient(135deg, rgba(13,158,110,0.07), rgba(91,99,232,0.05)); border-color: var(--accent); }
[data-theme="light"] .stage-context { background: var(--bg); }
[data-theme="light"] .skill-level-card { background: var(--surface); }
[data-theme="light"] .slc-fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
[data-theme="light"] .section-label { color: var(--accent); }
[data-theme="light"] .filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="light"] .filter-btn:hover { color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .page-header { background: var(--bg-alt); }
[data-theme="light"] .tech-pill { background: rgba(13,158,110,0.1); color: var(--accent); border-color: rgba(13,158,110,0.3); }
[data-theme="light"] .meta-chip { background: var(--surface); }
[data-theme="light"] .badge { background: rgba(13,158,110,0.15); color: var(--accent); }
[data-theme="light"] .badge-green { background: rgba(13,158,110,0.15); color: var(--accent); }
[data-theme="light"] .sidebar-link.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="light"] .sidebar-link.primary:hover { background: #0b8a5f; }
[data-theme="light"] .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
[data-theme="light"] .btn-primary:hover { background: #0b8a5f; }
[data-theme="light"] .btn-outline { color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .btn-outline:hover { background: rgba(13,158,110,0.08); }
[data-theme="light"] .card-link { background: var(--accent); color: #ffffff; border-color: var(--accent); }
[data-theme="light"] .card-link:hover { background: #0b8a5f; color: #ffffff; }
[data-theme="light"] .card-link.outline { background: transparent; color: var(--accent); border-color: var(--accent); }
[data-theme="light"] .card-link.outline:hover { background: rgba(13,158,110,0.08); color: var(--accent); }
[data-theme="light"] .tl-dot { background: var(--accent); }
[data-theme="light"] .tl-line { background: linear-gradient(180deg, var(--accent) 0%, transparent 100%); }
[data-theme="light"] .hero { background: var(--bg); }
[data-theme="light"] .footer { background: var(--bg-alt); border-color: var(--border); }
[data-theme="light"] .concept-card { background: var(--surface); border-color: var(--border); }
[data-theme="light"] .concept-card h4 { color: var(--accent); }

/* ══════════════════════════════════
   ANIMATIONS
══════════════════════════════════ */

/* ── Fade + slide up (sections, cards) ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Fade in only (hero text, labels) ── */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Gentle scale in (badges, pills) ── */
@keyframes popIn {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── Slide in from left (timeline) ── */
@keyframes slideLeft {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Underline grow (nav active indicator) ── */
@keyframes underlineGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ── Accent glow pulse (dot in status badge) ── */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(110,231,183,0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(110,231,183,0); }
}

/* ── Hero section ── */
.hero-content .section-label  { animation: fadeIn  0.5s ease both; }
.hero-content .hero-title      { animation: fadeUp  0.6s ease 0.1s both; }
.hero-content .hero-sub        { animation: fadeUp  0.6s ease 0.2s both; }
.hero-content .hero-stack      { animation: fadeUp  0.6s ease 0.3s both; }
.hero-content .hero-cta        { animation: fadeUp  0.6s ease 0.4s both; }
.hero-img-wrap                 { animation: fadeIn  0.8s ease 0.2s both; }

/* ── Section titles ── */
.section-label { animation: fadeIn 0.5s ease both; }

/* ── Tech pills pop in ── */
.tech-pills .tech-pill,
.card-tags span {
    animation: popIn 0.3s ease both;
}

/* ── Status dot pulse ── */
.status-dot { animation: glowPulse 2s ease-in-out infinite; }

/* ── Card hover lift ── */
.project-card,
.blog-card,
.resource-card,
.skill-block,
.skill-level-card,
.stage-card,
.sidebar-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.2s ease;
}
.project-card:hover,
.blog-card:not(.soon):hover,
.resource-card:hover,
.skill-block:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    border-color: var(--accent);
}
.skill-level-card:hover  { transform: translateY(-3px); }
.sidebar-card:hover      { border-color: var(--accent-2); }

/* ── Timeline items slide in ── */
.tl-item {
    animation: slideLeft 0.5s ease both;
}
.tl-item:nth-child(1) { animation-delay: 0.05s; }
.tl-item:nth-child(2) { animation-delay: 0.12s; }
.tl-item:nth-child(3) { animation-delay: 0.19s; }
.tl-item:nth-child(4) { animation-delay: 0.26s; }
.tl-item:nth-child(5) { animation-delay: 0.33s; }

/* ── Blog / project cards stagger (handled by JS IntersectionObserver) ── */
/* override base opacity so reveal works cleanly */
.project-card.revealed,
.blog-card.revealed {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ── Filter button active transition ── */
.filter-btn {
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.filter-btn:active { transform: scale(0.95); }

/* ── Nav link underline animate ── */
.nav-link::after {
    content: '';
    display: block;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
    border-radius: 2px;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* ── Annexe & rapport banners entrance ── */
.annexe-banner,
.projetpro-banner,
.stage-rapport {
    animation: fadeUp 0.5s ease 0.1s both;
}

/* ── Veille source badge ── */
.veille-source {
    margin: 0.6rem 0 0.2rem;
}
.veille-tool {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    background: rgba(110,231,183,0.08);
    border: 1px solid rgba(110,231,183,0.2);
    color: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
}
[data-theme="light"] .veille-tool {
    background: rgba(13,158,110,0.08);
    border-color: rgba(13,158,110,0.25);
    color: var(--accent);
}


/* ══════════════════════════════════
   ANIMATIONS — BATCH 2
══════════════════════════════════ */

/* ── Skill bar fill animation ── */
@keyframes barGrow {
    from { width: 0%; }
}
.slc-fill {
    transition: width 0s; /* override inline, handled by JS */
    animation: none;
}
/* JS will trigger .bar-animated class on scroll */
.slc-fill.bar-animated {
    animation: barGrow 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Scroll arrow bounce ── */
@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}
.scroll-arrow {
    animation: arrowBounce 1.8s ease-in-out infinite;
    display: inline-block;
}

/* ── Meta chips stagger pop ── */
.page-meta .meta-chip,
.hero .meta-chip {
    opacity: 0;
    animation: popIn 0.3s ease both;
}
.page-meta .meta-chip:nth-child(1) { animation-delay: 0.05s; }
.page-meta .meta-chip:nth-child(2) { animation-delay: 0.12s; }
.page-meta .meta-chip:nth-child(3) { animation-delay: 0.19s; }
.page-meta .meta-chip:nth-child(4) { animation-delay: 0.26s; }
.page-meta .meta-chip:nth-child(5) { animation-delay: 0.33s; }

/* ── Tech pills stagger (sub-pages) ── */
.tech-pills .tech-pill {
    opacity: 0;
    animation: popIn 0.3s ease both;
}
.tech-pills .tech-pill:nth-child(1) { animation-delay: 0.08s; }
.tech-pills .tech-pill:nth-child(2) { animation-delay: 0.14s; }
.tech-pills .tech-pill:nth-child(3) { animation-delay: 0.20s; }
.tech-pills .tech-pill:nth-child(4) { animation-delay: 0.26s; }
.tech-pills .tech-pill:nth-child(5) { animation-delay: 0.32s; }
.tech-pills .tech-pill:nth-child(6) { animation-delay: 0.38s; }

/* ── Page header entrance (sub-pages) ── */
.page-header .breadcrumb    { animation: fadeIn  0.4s ease 0.05s both; }
.page-header .section-label { animation: fadeIn  0.4s ease 0.1s  both; }
.page-header .page-title    { animation: fadeUp  0.55s ease 0.15s both; }
.page-header .page-subtitle { animation: fadeUp  0.5s ease 0.22s  both; }

/* ── Sidebar cards slide in from right ── */
@keyframes slideRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.sidebar-card {
    animation: slideRight 0.5s ease both;
}
.sidebar-card:nth-child(1) { animation-delay: 0.1s; }
.sidebar-card:nth-child(2) { animation-delay: 0.2s; }
.sidebar-card:nth-child(3) { animation-delay: 0.3s; }

/* ── Sidebar links hover ── */
.sidebar-link {
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    display: block;
}
.sidebar-link:hover {
    transform: translateX(4px);
}

/* ── Buttons hover scale ── */
.btn {
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.btn:active {
    transform: translateY(0);
}

/* ── Card links hover ── */
.card-link {
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.card-link:hover {
    transform: translateY(-2px);
}

/* ── Feature items stagger (sub-pages) ── */
.feature-item {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature-item:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* ── Step items left border pulse on hover ── */
.step-item {
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.step-item:hover {
    border-left-color: var(--accent);
    transform: translateX(3px);
}

/* ── Step number pop on hover ── */
.step-num {
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.step-item:hover .step-num {
    background: var(--accent);
    color: #0d0d0f;
    transform: scale(1.08);
}

/* ── Logo glitch flicker (subtle, on hover) ── */
@keyframes logoFlicker {
    0%   { opacity: 1; }
    92%  { opacity: 1; }
    93%  { opacity: 0.6; }
    94%  { opacity: 1; }
    96%  { opacity: 0.8; }
    100% { opacity: 1; }
}
.nav-logo {
    transition: color 0.2s ease;
}
.nav-logo:hover {
    animation: logoFlicker 0.6s ease;
}

/* ── Back to top hover ── */
.back-top {
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
}
.back-top:hover {
    transform: translateY(-3px);
    color: var(--accent);
}

/* ── Burger lines animate ── */
.burger span {
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Ref cards (blog articles) ── */
.ref-card {
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.ref-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ── FAQ item smooth open ── */
.faq-a {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), padding 0.2s ease;
}
.faq-item.open .faq-a {
    max-height: 300px;
}

/* ── Smooth page load ── */
body { animation: fadeIn 0.3s ease both; }

/* ── Respect prefers-reduced-motion ── */

/* ══════════════════════════════════
   MOBILE — RESPONSIVE COMPLET
   Breakpoints : 768px · 480px · 360px
══════════════════════════════════ */

@media (max-width: 768px) {

    /* ── Globals ── */
    :root { --nav-h: 56px; }

    .container { padding: 0 1.25rem; }

    .section { padding: 56px 0; }

    .section-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }

    /* ── Navbar ── */
    .nav-inner { padding: 0 1.25rem; gap: 0.75rem; }
    .nav-links  { display: none; }
    .burger     { display: flex; }

    /* ── Hero ── */
    .hero { min-height: 100svh; padding: 0 1.25rem; padding-top: var(--nav-h); }
    .hero-content { padding: 0; max-width: 100%; }
    .hero-title { font-size: clamp(2.2rem, 12vw, 3.5rem); line-height: 1.1; }
    .hero-sub { font-size: 0.95rem; }
    .hero-stack { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
    .hero-cta { flex-direction: column; align-items: center; gap: 0.75rem; }
    .hero-cta .btn { width: 100%; max-width: 280px; justify-content: center; }
    .social-chips { flex-wrap: wrap; justify-content: center; }

    /* ── About ── */
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .skills-grid { grid-template-columns: 1fr 1fr; }
    .skills-level-grid { grid-template-columns: 1fr 1fr; }
    .tl-item { padding-left: 1.5rem; }

    /* ── Projects ── */
    .projects-grid { grid-template-columns: 1fr; }
    .filter-bar { gap: 0.4rem; flex-wrap: wrap; }
    .filter-btn { font-size: 0.75rem; padding: 0.35rem 0.75rem; }
    .card-links { flex-wrap: wrap; gap: 0.4rem; }

    /* ── Blog ── */
    .blog-grid { grid-template-columns: 1fr; }
    .blog-filters { flex-wrap: wrap; gap: 0.4rem; }

    /* ── Stage ── */
    .stage-card { padding: 1.25rem; }
    .stage-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .stage-logo { width: 48px; height: 48px; font-size: 1.8rem; }
    .stage-header h3 { font-size: 1rem; }
    .stage-period { font-size: 0.72rem; }
    .stage-body { grid-template-columns: 1fr; gap: 1.5rem; }
    .stage-context { grid-template-columns: 1fr; }
    .stage-context-item { flex-direction: column; gap: 0.2rem; }
    .mission-item { flex-direction: row; gap: 0.75rem; }
    .mission-item p { font-size: 0.8rem; }
    .stage-rapport {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .rapport-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .rapport-actions .btn { width: 100%; justify-content: center; text-align: center; }

    /* ── Annexe banner ── */
    .annexe-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .annexe-actions { flex-direction: column; width: 100%; }
    .annexe-actions .btn { width: 100%; justify-content: center; }

    /* ── Projet pro banner ── */
    .projetpro-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .pp-content { flex-direction: column; gap: 0.75rem; }
    .projetpro-banner .btn { width: 100%; justify-content: center; }

    /* ── Resources ── */
    .resources-grid { grid-template-columns: 1fr; }

    /* ── Contact ── */
    .contact-layout { grid-template-columns: 1fr; }
    .contact-cards { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    /* ── Footer ── */
    .footer-inner { flex-direction: column; gap: 0.5rem; text-align: center; }

    /* ── Sub-pages ── */
    .page-header { padding: 5rem 1.25rem 2rem; }
    .page-title { font-size: clamp(1.5rem, 7vw, 2rem); }
    .page-body { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.25rem; }
    .page-meta { gap: 0.4rem; flex-wrap: wrap; }
    .meta-chip { font-size: 0.75rem; padding: 0.25rem 0.6rem; }
    .tech-pills { gap: 0.4rem; }
    .tech-pill { font-size: 0.72rem; padding: 0.25rem 0.6rem; }
    .features-list { grid-template-columns: 1fr; }
    .steps-list { gap: 1rem; }
    .step-item { gap: 0.75rem; }
    .step-num { font-size: 0.7rem; padding: 0.3rem 0.5rem; min-width: 42px; }
    .sidebar-card { padding: 1.25rem; }
    .sidebar-links { gap: 0.5rem; }
    .sidebar-link { font-size: 0.82rem; padding: 0.6rem 0.85rem; }
    .code-block pre { font-size: 0.72rem; overflow-x: auto; }

    /* ── Article pages ── */
    .article-body { padding: 1.5rem 1.25rem; }
    .article-intro { font-size: 1rem; }
    .ref-card { padding: 1rem; }
    .article-back { padding: 1rem 1.25rem 2rem; }
}

@media (max-width: 480px) {

    /* ── Hero ── */
    .hero-title { font-size: clamp(1.9rem, 10vw, 2.8rem); }
    .hero-tag { font-size: 0.7rem; letter-spacing: 0.12em; }

    /* ── Skills ── */
    .skills-grid { grid-template-columns: 1fr; }
    .skills-level-grid { grid-template-columns: 1fr; }
    .skill-block { padding: 1rem; }

    /* ── Stage ── */
    .stage-card { padding: 1rem; }
    .mission-item { padding: 0.75rem; }
    .stage-badge-row { flex-wrap: wrap; }

    /* ── Cards ── */
    .project-card { padding: 1.25rem; }
    .blog-card { padding: 1.25rem; }
    .resource-card { padding: 1.25rem; }

    /* ── Filter buttons ── */
    .filter-bar { gap: 0.3rem; }
    .filter-btn { font-size: 0.7rem; padding: 0.3rem 0.6rem; }

    /* ── Annexe ── */
    .annexe-icon { font-size: 1.5rem; }

    /* ── Section label ── */
    .section-label { font-size: 0.7rem; }

    /* ── Page sub ── */
    .breadcrumb { font-size: 0.75rem; flex-wrap: wrap; gap: 0.2rem; }
    .page-body { padding: 1.5rem 1rem; }
    .page-header { padding: 4.5rem 1rem 1.5rem; }

    /* ── Contact form ── */
    .contact-form { padding: 1.25rem; }
    #contactForm input,
    #contactForm textarea { font-size: 0.9rem; }
}

@media (max-width: 360px) {

    .container { padding: 0 1rem; }
    .hero-title { font-size: 1.75rem; }
    .nav-logo { font-size: 1rem; }
    .section { padding: 44px 0; }

    .btn { font-size: 0.78rem; padding: 0.55rem 1rem; }
    .card-link { font-size: 0.7rem; padding: 0.3rem 0.65rem; }

    .stage-card { padding: 0.85rem; }
    .mission-icon { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
