/* =========================================================
   Mickapixs — urban photography, Paris
   Palette « Fête foraine » · Big Shoulders Display + IBM Plex Mono
   ========================================================= */

:root {
  --accent: #FF3E8A;      /* rose néon : mascotte, nom, accents */
  --accent-2: #5FE1FF;    /* cyan : masque, signature */
  --bg: #000000;          /* fond du site */
  --text: #F2F2EE;        /* texte */
  --muted: #9a9a96;
  --line: #1f1f1f;

  --display: 'Big Shoulders Display', 'Arial Narrow', 'Helvetica Neue Condensed', Impact, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1320px;
  --header-h: 72px;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

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

/* ---------- Titres : Big Shoulders 900, majuscules, ombre décalée rose ---------- */
.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .88;
  letter-spacing: .005em;
  margin: 0;
  color: var(--text);
  text-shadow: .045em .045em 0 var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top, 0px);
  margin-top: calc(-1 * env(safe-area-inset-top, 0px));
  background: rgba(0, 0, 0, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* Logo néon (code du brief) */
.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  font-family: var(--display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: .02em;
  text-decoration: none;
  line-height: 1;
}
/* Lettres en rose plein + lueur. (Avant : lettres transparentes avec contour,
   que Safari sur iPhone transformait en tache rose floue.) */
.logo-word {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent), 0 0 24px var(--accent);
}
.logo-mark {
  height: 1.25em;
  width: auto;
  filter: drop-shadow(0 0 4px var(--accent)) drop-shadow(0 0 12px var(--accent));
}

/* L'enseigne s'allume au chargement : un seul moment animé sur tout le site */
/* L'enseigne reste éteinte tant que la police n'est pas chargée, puis s'allume.
   (Avant : le mot apparaissait dans une police de secours et changeait de forme
   en plein clignotement.) */
@media (prefers-reduced-motion: no-preference) {
  .js .logo-word, .js .logo-mark { opacity: .08; }
  .js.fonts-ready .logo-word, .js.fonts-ready .logo-mark { animation: neon-on 1.4s steps(1, end) both; }
  .js.fonts-ready .logo-mark { animation-delay: .1s; }
}
@keyframes neon-on {
  0%   { opacity: .08; }
  12%  { opacity: 1; }
  16%  { opacity: .15; }
  30%  { opacity: 1; }
  34%  { opacity: .3; }
  38%  { opacity: 1; }
  100% { opacity: 1; }
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 36px);
}
.nav a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }

.header-meta {
  justify-self: end;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 72px) var(--gutter) clamp(56px, 8vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.hero-kicker {
  margin: 0 0 20px;
  font-size: 12px;
  color: var(--muted);
}
.hero .display {
  font-size: clamp(60px, 7.2vw, 116px);
}
.hero-intro {
  max-width: 42ch;
  margin: 32px 0 0;
  color: var(--text);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-photo {
  margin: 0;
  position: relative;
}
.hero-photo img {
  width: 100%;
  aspect-ratio: 800 / 534;
  object-fit: cover;
}

/* ---------- Boutons arrondis ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1.5px solid var(--accent);
}
.btn-primary:hover { background: var(--text); border-color: var(--text); }
.btn-ghost {
  border: 1.5px solid #3a3a3a;
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

/* ---------- Work ---------- */
.work {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 34ch);
  gap: 24px 48px;
  align-items: end;
}
.section-head .display { font-size: clamp(56px, 8vw, 120px); }
.section-lede {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0 28px;
}
.filter {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid #2c2c2c;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, background-color .15s, color .15s;
}
.filter:hover { border-color: var(--accent-2); }
.filter-count { color: var(--muted); font-weight: 400; }
.filter[aria-selected="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #000;
}
.filter[aria-selected="true"] .filter-count { color: #555; }

/* Mosaïque 3 / 2 / 1 colonnes */
.gallery {
  column-count: 3;
  column-gap: 10px;
}
.tile {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: #0d0d0d;
  cursor: zoom-in;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
}
.tile img {
  width: 100%;
  height: auto;
  transition: opacity .25s, transform .4s;
}
.tile:hover img { opacity: .82; }
.tile:focus-visible { outline-offset: -3px; }

/* ---------- About ---------- */
.about {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 120px) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  border-top: 1px solid var(--line);
}
.about-photo { margin: 0; }
.about-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.about-kicker {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.about-body {
  max-width: 54ch;
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  color: #d8d8d4;
}
.about-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 62ch;
  margin: 36px 0 0;
  padding-top: 32px;
  border-top: 1px solid #2a2a2a;
}
.about-facts dt {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(36px, 3.6vw, 52px);
  line-height: 1;
  color: var(--text);
}
.about-facts dd {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-mascot {
  display: block;
  width: min(100%, 420px);
  margin: 0 auto;
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 22px var(--accent));
}
.about-mascot[hidden] { display: none; }
.about .display {
  font-size: clamp(52px, 7vw, 104px);
  margin-bottom: 28px;
}

/* ---------- Contact : aplat rose, texte noir ---------- */
.contact {
  background: var(--accent);
  color: #000;
  padding: clamp(64px, 10vw, 140px) var(--gutter);
  text-align: left;
}
.contact-inner {
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin: 0 auto;
}
.contact-title {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: .88;
  font-size: clamp(56px, 9vw, 140px);
  max-width: 12ch;
  margin: 0 0 32px;
  text-shadow: .045em .045em 0 #fff;
}
.contact-text {
  max-width: 52ch;
  margin: 0 0 36px;
}
.contact-mail {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 64px);
  line-height: 1;
  text-decoration: none;
  border-bottom: 4px solid #000;
  padding-bottom: 6px;
  overflow-wrap: anywhere;
}
.contact-mail:hover { color: #fff; border-color: #fff; }
.contact-mail:focus-visible { outline-color: #000; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--text);
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }

.lb-figure {
  margin: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: calc(56px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px));
  min-width: 0;
}
.lb-picture { display: contents; }
.lb-picture img {
  max-width: 100%;
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
}
.lb-caption {
  font-size: 12px;
  color: var(--muted);
}
.lb-close, .lb-nav {
  appearance: none;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1;
}
.lb-close {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 40px;
  z-index: 2;
}
.lb-nav {
  height: 100%;
  font-size: 64px;
  opacity: .7;
}
.lb-close:hover, .lb-nav:hover { color: var(--accent); opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .gallery { column-count: 2; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; margin: 0 calc(-1 * var(--gutter)); }
  .section-head { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 520px; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .site-header { grid-template-columns: auto 1fr; }
  .header-meta { display: none; }
  .nav { justify-self: end; gap: 16px; }
  .logo { font-size: 24px; }
  .gallery { column-count: 1; }
  .lightbox[open] { grid-template-columns: minmax(0, 1fr); }
  .lb-figure { padding-left: 8px; padding-right: 8px; }
  .lb-nav { display: none; }
  .lb-picture img { max-height: calc(100dvh - 110px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
