/* ==========================================================================
   Portfolio graphiste — direction éditoriale N&B
   Display: 'Fraunces' (serif à fort contraste) — utilisé avec retenue
   Body: 'Inter'
   Utilitaire / labels: 'JetBrains Mono' — clin d'oeil aux grilles d'impression
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --black: #0d0d0d;
    --white: #ffffff;
    --paper: #f7f6f4;
    --grey-1: #6b6b6b;
    --grey-2: #b8b8b4;
    --line: #d8d7d3;

    --font-display: 'Fraunces', serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --gap: clamp(1.25rem, 3vw, 2.5rem);
    --edge: clamp(1.25rem, 5vw, 4rem);

    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    background-color: var(--paper);
    background-image: radial-gradient(circle, rgba(13,13,13,0.09) 1px, transparent 1px);
    background-size: 15px 15px;
    color: var(--black);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    counter-reset: section-count;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--grey-1);
}

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

/* ---------------------------------------------------------------------
   Repères d'angle décoratifs (clin d'oeil aux marges d'impression)
   ------------------------------------------------------------------- */
.crop-marks span {
    position: fixed;
    width: 16px;
    height: 16px;
    z-index: 5;
    pointer-events: none;
}
.crop-marks span::before,
.crop-marks span::after {
    content: '';
    position: absolute;
    background: var(--grey-2);
}
.crop-marks span::before { width: 100%; height: 1px; top: 50%; left: 0; }
.crop-marks span::after { width: 1px; height: 100%; left: 50%; top: 0; }
.crop-marks .tl { top: 14px; left: 14px; }
.crop-marks .tr { top: 14px; right: 14px; }
.crop-marks .bl { bottom: 14px; left: 14px; }
.crop-marks .br { bottom: 14px; right: 14px; }
@media (max-width: 720px) {
    .crop-marks { display: none; }
}

/* ---------------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem var(--edge);
    mix-blend-mode: difference;
    color: var(--white);
}

.site-header .logo {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.logo-link { display: flex; align-items: center; }
.logo-image {
    max-height: 34px;
    width: auto;
    filter: grayscale(100%) contrast(1.1);
}

.site-nav {
    display: flex;
    gap: clamp(1rem, 3vw, 2.25rem);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.site-nav a {
    position: relative;
    padding-bottom: 2px;
}
.site-nav a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transition: right 0.35s var(--ease);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { right: 0; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: inherit;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ---------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--edge);
    border-bottom: 1px solid var(--line);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: clamp(14px, 3vw, 28px);
    border: 1px solid var(--line);
    pointer-events: none;
}
.hero-tag {
    display: inline-block;
    width: fit-content;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--black);
    padding: 0.3rem 0.6rem;
    background: var(--paper);
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}
.hero-ghost {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 600;
    font-size: clamp(6rem, 24vw, 22rem);
    line-height: 1;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px var(--line);
    letter-spacing: -0.02em;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.hero-name {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(3rem, 11vw, 8.5rem);
    line-height: 0.92;
    letter-spacing: -0.02em;
    margin: 0.4em 0 0.3em;
    max-width: 20ch;
    position: relative;
    z-index: 1;
}
.hero-name em {
    font-style: italic;
    font-weight: 500;
}

.hero-tagline {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    color: var(--grey-1);
    max-width: 42ch;
    margin: 0;
    position: relative;
    z-index: 1;
}

.hero-scroll {
    position: absolute;
    bottom: var(--edge);
    right: var(--edge);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.6em;
    color: var(--grey-1);
    z-index: 1;
}
.hero-scroll::after {
    content: '';
    width: 1px;
    height: 34px;
    background: var(--grey-2);
    display: block;
    animation: scrollline 2.2s ease-in-out infinite;
    transform-origin: top;
}
@keyframes scrollline {
    0% { transform: scaleY(0); opacity: 0; }
    40% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(1); opacity: 0; }
}

/* ---------------------------------------------------------------------
   Bandeau défilant (mots-clés / compétences)
   ------------------------------------------------------------------- */
.ticker {
    overflow: hidden;
    background: var(--black);
    color: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 0;
}
.ticker-track {
    display: flex;
    width: max-content;
    gap: 3rem;
    animation: ticker-scroll 26s linear infinite;
}
.ticker-track span {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--grey-2);
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
}

/* ---------------------------------------------------------------------
   Section shell
   ------------------------------------------------------------------- */
.section {
    padding: clamp(3rem, 8vw, 6rem) var(--edge);
    border-bottom: 1px solid var(--line);
    counter-increment: section-count;
}
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
    flex-wrap: wrap;
    position: relative;
    padding-bottom: 1.1rem;
}
.section-head::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 4px;
    background:
        linear-gradient(var(--black), var(--black)) left / 2.5rem 1.5px no-repeat,
        linear-gradient(var(--line), var(--line)) left bottom / 100% 1px no-repeat;
}
.section-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.9rem, 4vw, 3rem);
    margin: 0;
}
.section-title::before {
    content: counter(section-count, decimal-leading-zero) ' — ';
    font-family: var(--font-mono);
    font-size: 0.42em;
    letter-spacing: 0.05em;
    color: var(--grey-2);
    vertical-align: middle;
}
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Travaux — grille de cartes illustrées
   ------------------------------------------------------------------- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(1.75rem, 3vw, 2.75rem);
}

.work-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1.5px solid var(--black);
    background: var(--white);
    text-decoration: none;
    color: var(--black);
    box-shadow: 6px 6px 0 var(--black);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.work-card:hover,
.work-card:focus-visible {
    transform: translate(-4px, -4px);
    box-shadow: 10px 10px 0 var(--black);
}

.work-card-num {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    z-index: 2;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.05em;
    background: var(--white);
    border: 1px solid var(--black);
    padding: 0.2rem 0.5rem;
}

.work-card-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-bottom: 1.5px solid var(--black);
    background: repeating-linear-gradient(45deg, var(--paper), var(--paper) 9px, var(--line) 9px, var(--line) 10px);
}
.work-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.05);
    transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}
.work-card:hover .work-card-media img {
    transform: scale(1.06);
    filter: grayscale(15%) contrast(1.1);
}
.work-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--grey-1);
}

.work-card-info {
    padding: 1.1rem 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.work-card-title {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1.15;
}
.work-card-meta {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-1);
}

.work-empty {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--grey-1);
    padding: 2rem 0;
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(13,13,13,0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--edge);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img {
    max-height: 82vh;
    max-width: 100%;
    filter: grayscale(100%);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.lightbox-caption {
    position: absolute;
    bottom: var(--edge);
    left: var(--edge);
    right: var(--edge);
    display: flex;
    justify-content: space-between;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.lightbox-close {
    position: absolute;
    top: var(--edge);
    right: var(--edge);
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    color: var(--white);
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.1); }

/* ---------------------------------------------------------------------
   Modale de détail projet
   ------------------------------------------------------------------- */
.project-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}
.project-modal.is-open { visibility: visible; opacity: 1; }

.project-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,13,13,0.55);
    backdrop-filter: blur(2px);
}

.project-modal-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(720px, 100%);
    background: var(--paper);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    box-shadow: -20px 0 60px rgba(0,0,0,0.15);
}
.project-modal.is-open .project-modal-panel { transform: translateX(0); }

.project-modal-close {
    position: sticky;
    top: 1.25rem;
    float: right;
    margin-right: 1.25rem;
    background: var(--white);
    border: 1px solid var(--line);
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.project-modal-close:hover { background: var(--black); color: var(--white); border-color: var(--black); }

.project-modal-content {
    padding: clamp(2rem, 6vw, 4rem);
    padding-top: 1rem;
    clear: both;
}

.pm-eyebrow { display: block; margin-bottom: 0.75rem; }
.pm-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin: 0 0 1.5rem;
    line-height: 1.05;
}
.pm-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #2a2a2a;
    max-width: 56ch;
    margin-bottom: 2.5rem;
    white-space: pre-line;
}

.pm-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.9rem;
    margin-bottom: 2.5rem;
}
.pm-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    cursor: zoom-in;
    filter: grayscale(100%);
    transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
}
.pm-gallery img:hover { filter: grayscale(40%); }

.pm-videos { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 2.5rem; }
.pm-video-item .eyebrow { display: block; margin-bottom: 0.5rem; }
.video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--black);
}
.video-frame iframe,
.video-frame video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
}
.pm-video-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--black);
}

.pm-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.pm-link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.1rem;
    border: 1.5px solid var(--black);
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    box-shadow: 4px 4px 0 var(--black);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.pm-link:hover {
    background: var(--black);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 var(--black);
}

@media (max-width: 640px) {
    .project-modal-panel { width: 100%; }
}

/* ---------------------------------------------------------------------
   About
   ------------------------------------------------------------------- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gap);
    align-items: start;
}
.about-main { grid-column: span 6; }
.about-side {
    grid-column: span 6;
    display: flex;
    flex-direction: column;
    gap: 2.75rem;
}

.about-text {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    line-height: 1.4;
    max-width: 34ch;
    margin: 0;
    position: relative;
    padding-left: 1.5rem;
}
.about-text::before {
    content: '“';
    position: absolute;
    left: -0.75rem;
    top: -1.4rem;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 6rem;
    color: var(--line);
    line-height: 1;
    z-index: -1;
}

.about-skills {
    margin-top: 2.75rem;
    border: 1.5px solid var(--black);
    padding: 1.6rem 1.3rem 1.3rem;
    position: relative;
}
.about-skills .eyebrow {
    position: absolute;
    top: -0.65rem;
    left: 1.1rem;
    background: var(--paper);
    padding: 0 0.5rem;
}
.skill-tags {
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.skill-tags li {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--black);
    padding: 0.5rem 0.85rem;
    background: var(--white);
    box-shadow: 3px 3px 0 var(--black);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.skill-tags li:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--black);
}

.timeline-block .eyebrow { display: block; margin-bottom: 0.9rem; }
.timeline-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--black);
    counter-reset: tl-count;
}
.timeline-list li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem 0 1rem 1.6rem;
    border-bottom: 1px dashed var(--line);
    position: relative;
    counter-increment: tl-count;
}
.timeline-list li::before {
    content: counter(tl-count, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 1.05rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--grey-2);
}
.timeline-period {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--grey-1);
}
.timeline-title {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
}
.timeline-detail {
    font-size: 0.85rem;
    color: var(--grey-1);
}

.about-meta {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-self: start;
}
.about-meta dt {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey-1);
}
.about-meta dd {
    margin: 0.25rem 0 0;
    font-size: 0.95rem;
}

/* ---------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------- */
.contact-block { display: flex; flex-direction: column; gap: 1.75rem; align-items: flex-start; }
.contact-email {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.5rem, 4vw, 3rem);
    word-break: break-word;
    display: inline-block;
    width: fit-content;
    border: 1.5px solid var(--black);
    padding: 1.1rem 1.6rem;
    box-shadow: 8px 8px 0 var(--black);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-email:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 var(--black);
}

.social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.social-list a {
    border: 1px solid var(--black);
    padding: 0.55rem 0.9rem;
    box-shadow: 3px 3px 0 var(--black);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}
.social-list a:hover {
    background: var(--black);
    color: var(--white);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 var(--black);
}

/* ---------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.site-footer {
    padding: 1.5rem var(--edge);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--grey-1);
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}
.site-footer a { text-decoration: underline; }
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------------
   Pages légales (mentions, CGU)
   ------------------------------------------------------------------- */
.legal-back-link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid currentColor;
    padding: 0.5rem 0.9rem;
}
.legal-text {
    font-size: 0.98rem;
    line-height: 1.75;
    max-width: 68ch;
    color: #2a2a2a;
}
.legal-empty {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--grey-1);
}

/* ---------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */
@media (max-width: 860px) {
    .about-main, .about-side { grid-column: span 12; }
}

@media (max-width: 620px) {
    .site-nav {
        position: fixed;
        top: 0; right: 0;
        height: 100svh;
        width: min(78vw, 320px);
        background: var(--black);
        color: var(--white);
        flex-direction: column;
        justify-content: center;
        padding: var(--edge);
        transform: translateX(100%);
        transition: transform 0.4s var(--ease);
        mix-blend-mode: normal;
    }
    .site-nav.is-open { transform: translateX(0); }
    .nav-toggle { display: block; }
}
