/* ==========================================================================
   Portfolio Louis Zoonekynd — direction artistique TSORA
   Papier clair, encre violette, angles nets, grotesque + serif italique + mono
   ========================================================================== */

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('fonts/bricolage.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}
@font-face {
    font-family: 'Instrument Serif';
    src: url('fonts/instrument-serif-italic.woff2') format('woff2');
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('fonts/jetbrains-mono.woff2') format('woff2');
    font-weight: 400 500;
    font-display: swap;
}

:root {
    --ink: #14132a;
    --ink-2: #2a2940;
    --muted: #4a485f;
    --quiet: #6b687e;
    --paper: #faf9fc;
    --lilac: #f1eef8;
    --lilac-2: #eee8fd;
    --mist: #d9d6e8;
    --lavender: #b9a4f5;
    --violet: #5a2bd8;
    --violet-ink: #4b22c4;
    --night: #0f0e1f;
    --line: rgba(20, 19, 42, .1);

    --font-sans: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    --font-serif: 'Instrument Serif', ui-serif, Georgia, serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

    --ease: cubic-bezier(.2, .7, .2, 1);
    --pad-x: clamp(20px, 4vw, 48px);
    --section-y: clamp(72px, 10vw, 140px);
}

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

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
a { color: inherit; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

::selection { background: var(--violet); color: #fff; }

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

.container {
    width: 100%;
    max-width: 1440px;
    margin-inline: auto;
    padding-inline: var(--pad-x);
}

.skip-link {
    position: absolute;
    top: 8px;
    left: -9999px;
    z-index: 200;
    background: var(--ink);
    color: #fff;
    padding: 10px 16px;
}
.skip-link:focus-visible { left: 8px; }

main:focus { outline: none; }

/* ── Typo utilitaire ─────────────────────────────────────────────────────── */

.eyebrow {
    font-family: var(--font-mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--muted);
}
.accent { color: var(--violet-ink); }
.accent-light { color: var(--lavender); }

.serif-accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -.02em;
    color: var(--violet);
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    font-size: .9375rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--violet); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: .875rem; }
.btn-lg { min-height: 56px; padding: 14px 28px; font-size: 1.0625rem; }

/* ── Bannière ────────────────────────────────────────────────────────────── */

#announcement-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 10px var(--pad-x);
    background: var(--violet);
    color: #fff;
    font-size: .9375rem;
    font-weight: 500;
    text-align: center;
}
#announcement-banner[hidden] { display: none; }
.banner-button {
    font-family: var(--font-mono);
    font-size: .75rem;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(250, 249, 252, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 68px;
}
.brand {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.03em;
    text-decoration: none;
    white-space: nowrap;
}
.brand-dot { color: var(--violet); }

.nav {
    display: flex;
    gap: 2px;
    margin-inline: auto;
    padding: 4px;
    background: var(--lilac);
}
.nav a {
    padding: 10px 16px;
    font-size: .9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.nav a:hover { background: #fff; color: var(--violet-ink); }
.nav a.is-active { background: var(--ink); color: #fff; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
}
.hero-mark {
    position: absolute;
    top: -6vw;
    right: -14vw;
    width: min(62vw, 860px);
    aspect-ratio: 1;
    opacity: .13;
    pointer-events: none;
    animation: spin 140s linear infinite;
}
.hero-inner {
    position: relative;
    padding-top: clamp(40px, 6vw, 88px);
    padding-bottom: clamp(40px, 5vw, 64px);
}
.hero-eyebrow {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: clamp(28px, 5vw, 64px);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: clamp(24px, 4vw, 64px);
}
.hero-title {
    font-size: clamp(3.25rem, 10vw, 10.5rem);
    line-height: .9;
    font-weight: 700;
    letter-spacing: -.05em;
}
.hero-title span { display: block; }
.hero-title .serif-accent { padding-right: .08em; letter-spacing: -.025em; }

.hero-photo {
    width: clamp(180px, 22vw, 320px);
    aspect-ratio: 4 / 5;
    background: var(--lilac);
    border: 1px solid var(--line);
    padding: 10px;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-bottom {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    align-items: end;
    gap: clamp(24px, 4vw, 64px);
    margin-top: clamp(40px, 5vw, 72px);
}
.hero-lead {
    max-width: 44ch;
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
    line-height: 1.45;
    color: var(--ink-2);
    text-wrap: pretty;
}
.hero-lead a { color: var(--violet-ink); font-weight: 600; text-underline-offset: 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* ── Bandeau défilant ────────────────────────────────────────────────────── */

.marquee {
    overflow: hidden;
    background: var(--ink);
    color: #fff;
    padding: 18px 0;
}
.marquee-track {
    display: flex;
    gap: 28px;
    width: max-content;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    font-weight: 600;
    letter-spacing: -.02em;
    white-space: nowrap;
    animation: marquee 60s linear infinite;
}
.marquee-dot { color: var(--lavender); }

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding-block: var(--section-y); }
.section-lilac { background: var(--lilac); }

.section-head {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: clamp(40px, 6vw, 80px);
}
.section-title {
    font-size: clamp(2.5rem, 6.5vw, 5.5rem);
    line-height: .95;
    font-weight: 700;
    letter-spacing: -.045em;
}

/* ── Timeline (expérience) ───────────────────────────────────────────────── */

.timeline { border-top: 1px solid var(--ink); }
.timeline-item {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 3fr;
    gap: 16px clamp(24px, 4vw, 64px);
    padding-block: clamp(24px, 3vw, 36px);
    border-bottom: 1px solid var(--line);
}
.timeline-date { padding-top: 8px; }
.timeline-role {
    font-size: clamp(1.375rem, 2.4vw, 2rem);
    line-height: 1.1;
    font-weight: 650;
    letter-spacing: -.03em;
}
.timeline-company {
    margin-top: 6px;
    font-weight: 600;
    color: var(--violet-ink);
}
.timeline-company a { text-decoration: none; }
.timeline-company a:hover { text-decoration: underline; text-underline-offset: 4px; }
.timeline-company .eyebrow { margin-left: 4px; }
.timeline-desc { margin-top: 12px; max-width: 65ch; color: var(--muted); }

.collapsible {
    position: relative;
    overflow: hidden;
    transition: max-height .6s var(--ease);
}
.collapsible::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 90px;
    background: linear-gradient(to bottom, rgba(250, 249, 252, 0), var(--paper));
    pointer-events: none;
    opacity: 0;
    transition: opacity .3s;
}
.collapsible.is-collapsed::after { opacity: 1; }
#experience-more { margin-top: 8px; }

/* ── Projets ─────────────────────────────────────────────────────────────── */

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
    gap: 24px;
}
.project {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.project:hover {
    border-color: var(--ink);
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -24px rgba(20, 19, 42, .35);
}
.project-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--lilac-2);
    border-bottom: 1px solid var(--line);
    display: grid;
    place-items: center;
}
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.project:hover .project-media img { transform: scale(1.03); }
.project-placeholder { font-size: clamp(4rem, 9vw, 7rem); line-height: 1; }

.project-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    padding: clamp(20px, 2.5vw, 32px);
}
.project-title {
    font-size: clamp(1.375rem, 2vw, 1.75rem);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.03em;
}
.project-desc { color: var(--ink-2); }
.project-learn {
    padding-left: 14px;
    border-left: 2px solid var(--lavender);
    color: var(--quiet);
    font-size: .9375rem;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
    padding: 4px 8px;
    font-family: var(--font-mono);
    font-size: .6875rem;
    text-transform: uppercase;
    background: var(--lilac);
    color: var(--ink-2);
}
.projects-more { display: flex; justify-content: center; margin-top: clamp(32px, 4vw, 48px); }
.projects-more[hidden], .project[hidden] { display: none; }

.project-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }

/* ── Parcours ────────────────────────────────────────────────────────────── */

.two-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: clamp(40px, 5vw, 80px);
}
.list-title { margin-bottom: 16px; }
.rows { border-top: 1px solid var(--ink); }
.row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-block: 22px;
    border-bottom: 1px solid var(--line);
}
.row-text { flex: 1; }
.row-title { font-size: 1.1875rem; font-weight: 650; letter-spacing: -.02em; }
.row-detail { color: var(--muted); font-size: .9375rem; }
.row-date { white-space: nowrap; }

.logo {
    width: 72px;
    height: 56px;
    flex: none;
    object-fit: contain;
    padding: 4px;
    background: var(--lilac);
    border: 1px solid var(--line);
}
.logo-white { background: #fff; }
.logo-dark { background: var(--ink); padding: 8px; }

/* ── Engagements ─────────────────────────────────────────────────────────── */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 24px;
}
.card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(20px, 2.5vw, 32px);
    background: #fff;
    border: 1px solid var(--line);
    transition: border-color .25s var(--ease);
}
.card:hover { border-color: var(--violet); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-size: 1.375rem; line-height: 1.15; font-weight: 700; letter-spacing: -.03em; }
.card-text { color: var(--muted); font-size: .9375rem; }

/* ── Contact ─────────────────────────────────────────────────────────────── */

.contact {
    position: relative;
    overflow: hidden;
    background: var(--night);
    color: #fff;
    padding-block: var(--section-y);
}
.contact .eyebrow { color: rgba(255, 255, 255, .6); }
.contact-mark {
    position: absolute;
    bottom: -20vw;
    left: -10vw;
    width: min(70vw, 900px);
    opacity: .18;
    pointer-events: none;
    animation: spin 160s linear infinite reverse;
}
.contact-inner { position: relative; display: flex; flex-direction: column; gap: clamp(32px, 4vw, 56px); }
.contact-title {
    font-size: clamp(2.75rem, 8vw, 7.5rem);
    line-height: .92;
    font-weight: 700;
    letter-spacing: -.05em;
}
.contact-title .serif-accent { color: var(--lavender); }

.contact-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    border-top: 1px solid rgba(255, 255, 255, .2);
}
.contact-link {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 16px;
    padding: 24px 20px 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    text-decoration: none;
    transition: color .2s, padding-left .25s var(--ease);
}
.contact-link .eyebrow { grid-column: 1 / -1; }
.contact-value { font-size: clamp(1.125rem, 1.8vw, 1.5rem); font-weight: 600; letter-spacing: -.02em; }
.arrow { font-size: 1.25rem; transition: transform .25s var(--ease); }
.contact-link:hover { color: var(--lavender); padding-left: 10px; }
.contact-link:hover .arrow { transform: translateX(4px); }
.contact .btn-violet:hover { background: #fff; color: var(--ink); }
.contact .btn-lg { align-self: flex-start; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-block: 56px;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.socials a {
    padding: 8px 14px;
    border: 1px solid var(--line);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .15s, color .15s;
}
.socials a:hover { border-color: var(--ink); color: var(--violet-ink); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    padding-block: 20px 28px;
    border-top: 1px solid var(--line);
}
.legal-link { text-decoration: none; }
.legal-link:hover { color: var(--violet-ink); }

/* Badge éco */
#eco-badge {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(100%, 340px);
    padding: 20px;
    background: #fff;
    border: 1px solid var(--line);
}
.eco-header { display: flex; align-items: center; gap: 14px; }
.eco-grade {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: none;
    background: #1d9e75;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}
.eco-value { font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.eco-unit { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.eco-rank { font-size: .875rem; color: var(--muted); }
.eco-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eco-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: .6875rem;
    text-transform: uppercase;
    background: #e6f5ef;
    color: #146c51;
}
.eco-pill-violet { background: var(--lilac); }
.eco-tsora { height: 14px; width: auto; }
.eco-link { font-size: .8125rem; font-weight: 600; color: var(--violet-ink); text-underline-offset: 4px; }

/* ── Animations ──────────────────────────────────────────────────────────── */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-mark, .contact-mark, .marquee-track { animation: none; }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .nav { display: none; }
    .header-inner { justify-content: space-between; }
}

@media (max-width: 720px) {
    .header-cta { padding: 8px 12px; font-size: .8125rem; min-height: 38px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-photo { order: -1; width: 160px; }
    .hero-actions { justify-content: flex-start; }
    .timeline-item { grid-template-columns: 1fr; gap: 8px; }
    .timeline-date { padding-top: 0; }
    .row { flex-wrap: wrap; }
}
