/* =============================================================================
   Titalium — Site personnel
   Palette inspirée du logo : noir profond, jaune doré, rouge cravate.
   ============================================================================= */

:root {
    /* Surfaces */
    --bg:           #0A0E1A;
    --bg-soft:      #0F1626;
    --bg-card:      #141B2D;
    --bg-card-hover:#1A2440;
    --border:       #1F2A44;
    --border-hl:    #2D3D5F;

    /* Accents — palette du logo (canard à lunettes) */
    --accent:       #FFD700;        /* Jaune doré, corps du canard */
    --accent-2:     #FFB300;        /* Jaune-orange, gradient */
    --accent-soft:  rgba(255, 215, 0, .08);
    --accent-glow:  rgba(255, 215, 0, .25);
    --danger:       #FF4757;        /* Rouge cravate */
    --success:      #21D07A;

    /* Texte */
    --text:         #E8EDF6;
    --text-dim:     #9AA8C7;
    --text-faded:   #6B7894;

    /* Typo */
    --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', 'Consolas', monospace;

    /* Layout */
    --container:    1180px;
    --radius:       12px;
    --radius-sm:    8px;
    --radius-lg:    20px;
    --shadow:       0 8px 32px rgba(0, 0, 0, .4);
    --shadow-glow:  0 0 40px rgba(255, 215, 0, .15);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color .2s ease; }

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

/* ==================== Particules en fond ==================== */
#particles-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: .55;
    pointer-events: none;
}

/* ==================== Conteneur ==================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==================== Navbar ==================== */
.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: rgba(10, 14, 26, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transition: background .3s ease, border-color .3s ease;
}

.navbar.scrolled {
    background: rgba(10, 14, 26, .96);
    border-bottom-color: var(--border-hl);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}
.brand-logo {
    width: 40px; height: 40px;
    border-radius: 10px;
    box-shadow: 0 0 12px var(--accent-glow);
    transition: transform .3s ease, box-shadow .3s ease;
}
.brand:hover .brand-logo {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 0 24px var(--accent-glow);
}
.brand-name {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: .5px;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}
.nav-links a {
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: color .2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-links a::after {
    content: '';
    position: absolute;
    inset: auto 0 -8px 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform .3s ease;
    transform-origin: center;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.bmc-button img {
    height: 40px;
    border-radius: 8px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.bmc-button:hover img {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all .3s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==================== Hero ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
}

.hero-eyebrow {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 14px;
    margin-bottom: 24px;
    letter-spacing: 1px;
    opacity: 0;
    animation: fadeUp .8s ease forwards;
}

.hero-title {
    font-size: clamp(64px, 12vw, 160px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeUp .8s ease .15s forwards;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 45%, var(--danger) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 60px rgba(255, 215, 0, .25);
}

.hero-tagline {
    font-size: clamp(18px, 2.4vw, 24px);
    color: var(--text-dim);
    max-width: 720px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp .8s ease .3s forwards;
}
.hero-tagline strong { color: var(--text); font-weight: 600; }
.hl {
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0 6px;
    border-radius: 4px;
}

.hero-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 56px;
    opacity: 0;
    animation: fadeUp .8s ease .45s forwards;
}

.hero-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp .8s ease .6s forwards;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-dim);
    transition: all .25s ease;
}
.hero-badge:hover {
    border-color: var(--accent);
    color: var(--text);
    transform: translateY(-2px);
}
.hero-badge-icon { font-size: 16px; }

.hero-scroll {
    position: absolute;
    inset: auto 50% 32px auto;
    transform: translateX(50%);
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-faded);
    border-radius: 12px;
    overflow: hidden;
}
.hero-scroll span {
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 8px;
    background: var(--accent);
    border-radius: 2px;
    animation: scrollDot 2s ease infinite;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0A0E1A;
    box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-hl);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

/* ==================== Sections génériques ==================== */
.section {
    padding: 100px 0;
    position: relative;
}
.section-alt { background: rgba(15, 22, 38, .6); }

.section-eyebrow {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 200%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    color: var(--text-dim);
    font-size: 17px;
    max-width: 640px;
    margin-bottom: 56px;
}

/* ==================== À propos ==================== */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 56px;
    align-items: start;
    margin-top: 32px;
}

.about-text .lead {
    font-size: 20px;
    color: var(--text);
    line-height: 1.55;
    margin-bottom: 20px;
    border-left: 3px solid var(--accent);
    padding-left: 18px;
}
.about-text p { color: var(--text-dim); margin-bottom: 16px; }
.about-text strong { color: var(--accent); font-weight: 600; }

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 18px;
    transition: all .3s ease;
}
.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, .1);
}
.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
    font-family: var(--font-mono);
    letter-spacing: -.02em;
}
.stat-label {
    color: var(--text-dim);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ==================== Compétences ==================== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all .35s ease;
    position: relative;
    overflow: hidden;
}
.skill-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, var(--accent-soft));
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}
.skill-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3), 0 0 0 1px var(--accent-glow);
}
.skill-card:hover::before { opacity: 1; }
.skill-card.highlight {
    background: linear-gradient(135deg, var(--bg-card), rgba(255, 215, 0, .04));
    border-color: var(--accent);
}
.skill-icon {
    font-size: 36px;
    margin-bottom: 16px;
    display: inline-block;
    filter: drop-shadow(0 4px 12px var(--accent-glow));
}
.skill-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text);
}
.skill-card p {
    color: var(--text-dim);
    font-size: 14px;
    margin-bottom: 18px;
    line-height: 1.55;
}
.skill-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.skill-tags li {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-dim);
}

/* ==================== Projets ==================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}
.project-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    transition: all .35s ease;
    position: relative;
    overflow: hidden;
}
.project-card::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--danger));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}
.project-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.project-card:hover::after { transform: scaleX(1); }

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}
.project-icon {
    font-size: 36px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35));
}
.project-badge {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-glow);
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 999px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.project-title {
    font-size: 22px;
    margin-bottom: 10px;
}
.project-desc {
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin-bottom: 18px;
}
.project-tech {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}
.project-tech li {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 9px;
    background: var(--bg);
    border-radius: 4px;
    color: var(--text-dim);
}
.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    transition: all .2s ease;
}
.project-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.project-link.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #0A0E1A;
    border-color: transparent;
}
.project-link.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--accent-glow);
}

.project-placeholder {
    border-style: dashed;
    background: transparent;
    align-items: flex-start;
}
.project-placeholder:hover {
    background: var(--bg-card);
}

/* ==================== Contact ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 32px;
}
.contact-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    transition: all .3s ease;
    text-align: left;
}
.contact-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}
.contact-icon {
    width: 56px; height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 28px;
    margin-bottom: 18px;
    transition: transform .3s ease;
}
.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
}
.contact-card h3 { font-size: 22px; margin-bottom: 8px; }
.contact-card p { color: var(--text-dim); font-size: 14px; margin-bottom: 16px; }
.contact-link-label {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 600;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    padding: 48px 0 24px;
    position: relative;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 40px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}
.footer-logo {
    width: 56px; height: 56px;
    border-radius: 14px;
}
.footer-brand strong { font-size: 18px; display: block; margin-bottom: 4px; }
.footer-brand p { color: var(--text-dim); font-size: 13px; max-width: 320px; }

.footer-badges {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.footer-badges a { transition: transform .2s ease; }
.footer-badges a:hover { transform: translateY(-2px); }
.footer-badges img {
    border-radius: 6px;
    height: 50px;
    width: auto;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--text-faded);
    font-size: 13px;
}
.footer-meta a { color: var(--accent); }
.footer-meta a:hover { color: var(--accent-2); }

/* ==================== Animations ==================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollDot {
    0%   { transform: translate(-50%, 0); opacity: 1; }
    50%  { transform: translate(-50%, 12px); opacity: .6; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

/* Reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        inset: 70px 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-soft);
        border-bottom: 1px solid var(--border);
        padding: 20px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all .3s ease;
    }
    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-links a {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }
    .bmc-button img { height: 32px; }

    .about-grid { grid-template-columns: 1fr; gap: 32px; }
    .about-stats { grid-template-columns: repeat(2, 1fr); }

    .footer-top { flex-direction: column; align-items: flex-start; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 540px) {
    .container { padding: 0 18px; }
    .section { padding: 70px 0; }
    .hero { padding: 100px 0 60px; }
    .hero-cta .btn { width: 100%; justify-content: center; }
    .about-stats { grid-template-columns: 1fr; }
    .footer-badges { width: 100%; }
}
