/* ==========================================================================
   Portfolio Loumsi Djekouane
   Mobile first : les styles de base sont pour téléphone,
   les @media (min-width) ajoutent la mise en page tablette / ordinateur.
   ========================================================================== */

/* ---------- 1. Variables ---------- */
:root {
    /* Couleurs reprises du CV : papier beige + bleu */
    --paper:       #ebe2cd;
    --paper-light: #f4eedf;
    --paper-dark:  #ddd1b5;
    --blue:        #4a6b8c;
    --blue-dark:   #2f4a66;
    --blue-light:  #8fa9c4;
    --ink:         #1f2e3d;
    --ink-soft:    #4b5866;
    --gold:        #c9a96a;
    --white:       #fffdf8;

    --font-display: "Syne", "Arial Black", sans-serif;
    --font-body:    "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius-s: 12px;
    --radius-m: 20px;
    --radius-l: 32px;
    --radius-pill: 999px;

    --gutter: clamp(1rem, 4vw, 2.5rem);
    --section-space: clamp(4rem, 10vw, 7.5rem);
    --header-h: 64px;

    --shadow: 0 1px 2px rgb(31 46 61 / .06), 0 8px 24px -8px rgb(31 46 61 / .18);
    --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--paper);
    /* grain papier, comme sur le CV */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
    margin: 0;
    font-family: var(--font-display);
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--ink);
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
strong { font-weight: 700; }

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

::selection { background: var(--blue); color: var(--white); }

/* Fond de particules (créé par main.js) */
.bg-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.icon { width: 1.1em; height: 1.1em; flex-shrink: 0; }

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 100;
    padding: .75rem 1rem;
    background: var(--ink);
    color: var(--white);
    border-radius: var(--radius-s);
}
.skip-link:focus { top: 1rem; }

/* ---------- 3. Typo et petits composants ---------- */
.display {
    font-size: clamp(2.75rem, 11vw, 6.5rem);
    font-weight: 800;
    line-height: .95;
    text-transform: uppercase;
    letter-spacing: -.03em;
}

.is-accent { color: var(--blue); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .9rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--blue);
}
.eyebrow::before {
    content: "✦";
    font-size: 1rem;
    color: var(--gold);
}
.eyebrow--light { color: var(--paper); }

.section-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
    font-weight: 800;
}

.prose p + p { margin-top: 1rem; }
.prose { color: var(--ink-soft); font-size: 1.05rem; max-width: 65ch; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1rem;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--blue-dark);
    background: var(--paper-light);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-pill);
}
.badge__dot {
    width: .6rem;
    height: .6rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: #3f9b62;
    box-shadow: 0 0 0 4px rgb(63 155 98 / .2);
}
.badge--light {
    color: var(--white);
    background: rgb(255 255 255 / .1);
    border-color: rgb(255 255 255 / .25);
}

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 48px;
    padding: .75rem 1.4rem;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    transition: transform .2s var(--ease), background-color .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper-light); }
.btn--light { background: var(--paper-light); color: var(--blue-dark); }
.btn--light:hover { background: var(--white); }

.chips, .tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li, .tags li {
    padding: .3rem .75rem;
    font-size: .82rem;
    font-weight: 500;
    border-radius: var(--radius-pill);
}
.chips li { background: var(--paper); color: var(--blue-dark); }
.tags li { border: 1px solid var(--paper-dark); color: var(--ink-soft); }

/* ---------- 4. En-tête ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(235 226 205 / .88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
    border-color: var(--paper-dark);
    box-shadow: 0 6px 20px -16px rgb(31 46 61 / .5);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-decoration: none;
}
/* La signature est beige : on la pose sur une pastille bleue pour qu'elle reste lisible */
.brand img {
    width: 44px;
    height: 44px;
    padding: 2px;
    background: var(--blue);
    border-radius: 50%;
    object-fit: cover;
    transform-origin: center;
}
.brand:hover img { background: var(--blue-dark); }
.brand__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.1;
}
.brand__name strong { color: var(--blue); font-weight: 800; }

/* Bouton menu (mobile) */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    padding: .5rem 1rem;
    font-weight: 700;
    font-size: .9rem;
    background: var(--ink);
    color: var(--paper-light);
    border: 0;
    border-radius: var(--radius-pill);
}
.nav-toggle__bars,
.nav-toggle__bars::before {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .3s var(--ease);
}
.nav-toggle__bars { position: relative; transform: translateY(-3px); }
.nav-toggle__bars::before { content: ""; position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(-6px) rotate(-90deg); }

/* Menu : panneau déroulant sur mobile */
.site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--paper-light);
    border-bottom: 1px solid var(--paper-dark);
    box-shadow: 0 20px 30px -20px rgb(31 46 61 / .35);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.site-nav.is-open { visibility: visible; opacity: 1; transform: none; }
.site-nav a {
    display: block;
    padding: .9rem 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    text-decoration: none;
    border-bottom: 1px solid var(--paper-dark);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover { color: var(--blue); }
.site-nav .site-nav__cta { color: var(--blue); }

/* ---------- 5. Hero ---------- */
.hero { padding-block: 2rem var(--section-space); }

.hero__inner {
    display: grid;
    gap: 2rem;
    align-items: end;
    container-type: inline-size;
}

.hero__text > * + * { margin-top: 1.5rem; }
.hero__title {
    margin-top: 1.25rem;
    /* « DJEKOUANE » fait ~10,4 fois la taille de police : on la calcule sur la largeur dispo */
    font-size: 8.5vw;
    font-size: min(9.4cqi, 8.5rem);
}
.hero__lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; }
.hero__lead strong { color: var(--ink); }

.hero__visual {
    position: relative;
    width: min(100%, 420px);
    margin-inline: auto;
    aspect-ratio: 4 / 5;
}
.hero__pill {
    position: absolute;
    inset: 18% 0 0;
    background: var(--blue);
    border-radius: 999px 999px var(--radius-l) var(--radius-l);
}
.hero__photo {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
    padding-bottom: 6%;
    filter: drop-shadow(0 18px 18px rgb(20 30 40 / .25));
}
.hero__spark {
    position: absolute;
    color: var(--gold);
    line-height: 1;
    animation: twinkle 4s ease-in-out infinite;
}
.hero__spark--1 { top: 12%; left: 2%; font-size: 3rem; }
.hero__spark--2 { bottom: 10%; right: -2%; font-size: 2rem; animation-delay: -2s; }

@keyframes twinkle {
    0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
    50% { transform: scale(.75) rotate(20deg); opacity: .7; }
}

/* ---------- 6. Sections ---------- */
.section { padding-block: var(--section-space); }
.section--band {
    background: rgb(244 238 223 / .6); /* légèrement transparent pour laisser voir les particules */
    border-block: 1px solid var(--paper-dark);
}
.section-head { margin-bottom: 2.5rem; }
.section-head--row { display: grid; gap: 1.5rem; }

/* À propos */
.about { display: grid; gap: 2rem; }
.about .section-head { margin-bottom: 0; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}
.stats li {
    padding: 1.5rem;
    background: var(--blue);
    color: var(--white);
    border-radius: var(--radius-m);
}
.stats strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.stats span { display: block; margin-top: .4rem; font-size: .9rem; color: rgb(255 255 255 / .82); }

/* Parcours */
.journey { display: grid; gap: 2.5rem; }
.journey__heading {
    display: inline-block;
    margin-bottom: 1.5rem;
    padding: .45rem 1.1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--blue);
    color: var(--white);
    border-radius: var(--radius-pill);
}

.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
    content: "";
    position: absolute;
    left: .35rem;
    top: .4rem;
    bottom: .4rem;
    width: 2px;
    background: var(--paper-dark);
}
.timeline li { position: relative; color: var(--ink-soft); }
.timeline li + li { margin-top: 1.75rem; }
.timeline li::before {
    content: "";
    position: absolute;
    left: -1.75rem;
    top: .35rem;
    width: .8rem;
    height: .8rem;
    background: var(--paper-light);
    border: 3px solid var(--blue);
    border-radius: 50%;
}
.timeline__date {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--blue);
}
.timeline__title {
    margin: .15rem 0 .3rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

/* Compétences */
.skills { display: grid; gap: 1rem; }
.skill-card {
    padding: 1.5rem;
    background: var(--paper-light);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-m);
}
.skill-card h3 { font-size: 1.2rem; line-height: 1.2; }
.skill-card .level { margin: .35rem 0 1rem; font-size: .9rem; color: var(--ink-soft); }

/* ---------- 7. Projets ---------- */
.filters {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
    flex-shrink: 0;
    min-height: 44px;
    padding: .5rem 1rem;
    font-size: .9rem;
    font-weight: 500;
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: var(--radius-pill);
    transition: background-color .2s, color .2s;
}
.filter span { opacity: .6; font-size: .8em; margin-left: .15rem; }
.filter:hover { background: var(--paper); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper-light); }

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.25rem;
}
.project-card[hidden] { display: none; }
.project-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-m);
    overflow: hidden;
    transition: transform .3s var(--ease), box-shadow .3s;
}
.project-card a:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.project-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--paper);
}
.project-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.project-card a:hover .project-card__media img { transform: scale(1.05); }
.project-card__media.is-empty {
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: var(--blue);
    background-image: radial-gradient(circle at 85% 15%, var(--blue-light) 0 12%, transparent 13%);
}
.project-card__media.is-empty span {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.6rem, 6vw, 2.2rem);
    text-transform: uppercase;
    text-align: center;
    line-height: 1;
    color: var(--paper-light);
}

.project-card__body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
    padding: 1.25rem 1.25rem 1.5rem;
}
.project-card__meta {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--blue);
}
.project-card__title { font-size: 1.3rem; line-height: 1.15; }
.project-card__summary { font-size: .95rem; color: var(--ink-soft); flex: 1; }
.project-card .tags { margin-top: .5rem; }

/* ---------- 8. Contact ---------- */
.contact {
    display: grid;
    gap: 2rem;
    padding: clamp(1.75rem, 6vw, 4rem);
    background: var(--blue);
    color: var(--white);
    border-radius: var(--radius-l);
    background-image: radial-gradient(circle at 100% 0, var(--blue-dark) 0 30%, transparent 31%);
}
.contact .section-title { color: var(--white); }
.contact__intro > * + * { margin-top: 1rem; }
.contact__intro p:not(.badge):not(.eyebrow) { color: rgb(255 255 255 / .85); font-size: 1.05rem; }

.contact__list { display: grid; gap: .5rem; align-content: start; }
.contact__list a:not(.btn),
.contact__static {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-height: 48px;
    padding: .6rem 0;
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
    border-bottom: 1px solid rgb(255 255 255 / .2);
}
.contact__list a:not(.btn):hover span { text-decoration: underline; text-underline-offset: 3px; }
.contact__list .btn { margin-top: 1rem; width: 100%; }

/* ---------- 9. Pied de page ---------- */
.site-footer {
    padding-block: 2rem;
    font-size: .9rem;
    color: var(--ink-soft);
    border-top: 1px solid var(--paper-dark);
}
.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.to-top { display: inline-flex; align-items: center; gap: .3rem; }

/* ---------- 10. Pages projet ---------- */
.project-hero { padding-block: 2rem 3rem; }
.back-link {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-decoration: none;
}
.back-link:hover { color: var(--blue); }

.project-hero__num {
    padding: .15rem .55rem;
    background: var(--blue);
    color: var(--white);
    border-radius: var(--radius-pill);
    letter-spacing: .05em;
    white-space: nowrap;
}
.project-hero .eyebrow::before { display: none; }

.project-hero__title {
    font-size: clamp(2.4rem, 10vw, 5.5rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: .95;
    letter-spacing: -.03em;
}
.project-hero__title span { display: block; }

.project-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1px;
    margin: 2.5rem 0 0;
    background: var(--paper-dark);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-m);
    overflow: hidden;
}
.project-meta div { padding: 1rem 1.25rem; background: var(--paper-light); }
.project-meta dt {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue);
}
.project-meta dd { margin: .25rem 0 0; font-weight: 500; line-height: 1.35; }

.project-layout {
    display: grid;
    gap: 2.5rem;
    padding-bottom: var(--section-space);
}
.project-content { min-width: 0; }
.project-section + .project-section { margin-top: 3rem; }
.project-section h2 { margin-bottom: 1rem; font-size: clamp(1.4rem, 4vw, 1.9rem); }

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: .75rem;
}
.gallery__item { margin: 0; }
.gallery__item.is-wide { grid-column: 1 / -1; }
.gallery__zoom {
    display: block;
    width: 100%;
    padding: 0;
    background: var(--paper-light);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-s);
    overflow: hidden;
    cursor: zoom-in;
}
.gallery__zoom img { width: 100%; transition: transform .5s var(--ease); }
.gallery__item:not(.is-wide):not(.has-mockup) .gallery__zoom img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__zoom:hover img { transform: scale(1.03); }

.pdf .btn-row { margin-bottom: 1rem; }
.pdf__frame {
    display: none;
    width: 100%;
    height: 80vh;
    max-height: 900px;
    background: var(--white);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-m);
}

.project-aside { display: grid; gap: 1rem; align-content: start; }
.info-card {
    padding: 1.25rem 1.4rem;
    background: var(--paper-light);
    border: 1px solid var(--paper-dark);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius-s);
}
.info-card__title {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .4rem;
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue);
}
.info-card p { font-size: .95rem; color: var(--ink-soft); }

.project-pager {
    display: grid;
    gap: 1rem;
    padding-bottom: var(--section-space);
}
.project-pager__link {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    background: var(--paper-light);
    border: 1px solid var(--paper-dark);
    border-radius: var(--radius-m);
    transition: background-color .2s, color .2s;
}
.project-pager__link:hover { background: var(--blue); color: var(--white); }
.project-pager__link:hover .project-pager__dir { color: var(--paper); }
.project-pager__dir {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--blue);
}
.project-pager__title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; }
.project-pager__link.is-next { text-align: right; align-items: flex-end; }

/* ---------- Mockups (faits en CSS, aucune image en plus) ---------- */
.mockup {
    container-type: size;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 50% 30%, rgb(255 255 255 / .55), transparent 65%),
        linear-gradient(180deg, var(--paper-light), var(--paper-dark));
}
.mockup img {
    display: block;
    width: 100%;
    height: auto;
    transform: none !important;
}
.mockup__device, .mockup__screen { display: block; position: relative; }

/* Ordinateur portable */
.mockup--laptop .mockup__device {
    width: min(84cqw, 125cqh);
    filter: drop-shadow(0 14px 18px rgb(31 46 61 / .28));
}
.mockup--laptop .mockup__screen {
    padding: 2.4% 2.4% 3.2%;
    background: #161b21;
    border: 1px solid #2c343d;
    border-radius: 3.5% 3.5% 0 0 / 5.5% 5.5% 0 0;
}
.mockup--laptop .mockup__screen::before { /* caméra */
    content: "";
    position: absolute;
    top: 1%;
    left: 50%;
    width: .8%;
    aspect-ratio: 1;
    background: #3a434d;
    border-radius: 50%;
}
.mockup--laptop img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 1px; }
.mockup--laptop .mockup__device::after { /* clavier */
    content: "";
    display: block;
    margin: 0 -8%;
    padding-top: 3.6%;
    background: linear-gradient(180deg, #e3e6ea 0 30%, #b9c0c8 70%, #8d959e);
    border-radius: 0 0 50% 50% / 0 0 100% 100%;
}

/* Affiche au mur */
.mockup--poster {
    background:
        radial-gradient(ellipse at 50% 20%, rgb(255 255 255 / .5), transparent 60%),
        linear-gradient(180deg, #e4d9c1 0 82%, #cbbd9d 82% 100%);
}
.mockup--poster .mockup__device {
    transform: rotate(-1.2deg);
    filter: drop-shadow(0 16px 16px rgb(31 46 61 / .3));
}
.mockup--poster .mockup__screen {
    padding: 2.5cqmin;
    background: var(--white);
}
.mockup--poster .mockup__screen::before { /* scotch */
    content: "";
    position: absolute;
    top: -2.5cqmin;
    left: 50%;
    z-index: 1;
    width: 16cqmin;
    height: 5cqmin;
    background: rgb(255 255 255 / .6);
    box-shadow: 0 1px 2px rgb(0 0 0 / .08);
    transform: translateX(-50%) rotate(-3deg);
}
.mockup--poster img {
    width: auto;
    max-width: 70cqw;
    max-height: 72cqh;
}

/* Smartphone */
.mockup--phone .mockup__device {
    height: 84cqh;
    aspect-ratio: 9 / 19;
    padding: 2.2cqh 1.4cqh;
    background: #161b21;
    border-radius: 5cqh;
    filter: drop-shadow(0 14px 18px rgb(31 46 61 / .3));
}
.mockup--phone .mockup__screen { height: 100%; border-radius: 3.6cqh; overflow: hidden; }
.mockup--phone img { height: 100%; object-fit: cover; }

/* Les mockups dans les galeries ont leur propre format */
.gallery__item.has-mockup .gallery__zoom { aspect-ratio: 4 / 3; }
.gallery__item.has-mockup.is-wide .gallery__zoom { aspect-ratio: 16 / 10; }
.gallery__item.has-mockup.is-wide .mockup--poster img { max-height: 80cqh; }

/* 404 */
.not-found { padding-block: var(--section-space); }
.not-found > * + * { margin-top: 1.5rem; }

/* ---------- 11. Visionneuse d'images ---------- */
.lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 4rem var(--gutter) var(--gutter);
    background: rgb(20 30 40 / .94);
    border: 0;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img {
    max-width: 100%;
    max-height: calc(100vh - 6rem);
    max-height: calc(100dvh - 6rem);
    object-fit: contain;
    border-radius: var(--radius-s);
}
.lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background: var(--paper-light);
    color: var(--ink);
    border: 0;
    border-radius: 50%;
}

/* ---------- 12. Animations d'apparition ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Tablette (≥ 640px)
   ========================================================================== */
@media (min-width: 640px) {
    .skills { grid-template-columns: repeat(2, 1fr); }
    .project-pager { grid-template-columns: 1fr 1fr; }
    .site-footer__inner { flex-direction: row; justify-content: space-between; align-items: center; }
    .contact__list .btn { width: auto; justify-self: start; }
    .pdf__frame { display: block; }
}

/* ==========================================================================
   Ordinateur (≥ 900px)
   ========================================================================== */
@media (min-width: 900px) {
    :root { --header-h: 76px; }

    /* Menu horizontal, plus de bouton */
    .nav-toggle { display: none; }
    .site-nav {
        position: static;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        transform: none;
    }
    .site-nav ul { display: flex; align-items: center; gap: .25rem; }
    .site-nav a {
        padding: .55rem 1rem;
        font-family: var(--font-body);
        font-size: .95rem;
        font-weight: 500;
        border: 0;
        border-radius: var(--radius-pill);
    }
    .site-nav a:hover { background: var(--paper-light); }
    .site-nav .site-nav__cta { margin-left: .5rem; background: var(--ink); color: var(--paper-light); }
    .site-nav .site-nav__cta:hover { background: var(--blue); color: var(--white); }

    .hero { padding-top: 3rem; }
    .hero__inner {
        grid-template-columns: 1.3fr 1fr;
        grid-template-areas: "head head" "text visual";
        column-gap: 3rem;
        row-gap: 1rem;
    }
    .hero__head { grid-area: head; }
    .hero__text { grid-area: text; padding-bottom: 2rem; }
    .hero__visual { grid-area: visual; width: 100%; max-width: 400px; margin-right: 0; }

    .about { grid-template-columns: 1fr 1.4fr; column-gap: 4rem; }
    .about .section-head { grid-row: span 2; }

    .journey { grid-template-columns: 1fr 1fr; gap: 4rem; }

    .section-head--row { grid-template-columns: auto 1fr; align-items: end; }
    .filters { justify-content: flex-end; flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }

    .contact { grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }

    .project-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; }
    .project-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

@media (min-width: 1100px) {
    .skills { grid-template-columns: repeat(4, 1fr); }
}
