/* =========================================================
   CÉLIAN PHOTOGRAPHY — style.css
   Palette : blanc dominant, noir encre, accents très ponctuels
   Typo : General Sans (display) + Inter (texte / micro-labels)
   Signature : motif "viseur / obturateur" (aperture) repris
   dans le loader, le curseur et les cadres d'images.
   ========================================================= */

:root {
  --white: #ffffff;
  --surface: #f5f5f7;
  --ink: #111111;
  --ink-soft: #6e6e73;
  --accent: #007aff;
  --accent-2: #af52de;

  --font-display: "General Sans", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 0.84, 0.44, 1);

  --header-h: 84px;
  --edge: clamp(20px, 6vw, 72px);

  color-scheme: light;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Curseur custom actif -> masquer le curseur système sur cibles */
html.has-fine-pointer {
  cursor: none;
}
html.has-fine-pointer a,
html.has-fine-pointer button {
  cursor: none;
}

/* ---------- Typo scale ---------- */
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 10vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  display: block;
}
.body-lg {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin-top: 1.6rem;
  font-weight: 400;
}
.body-md {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-top: 1.1rem;
}

/* =========================================================
   LOADER — obturateur qui s'ouvre
   ========================================================= */
#loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.5s var(--ease),
    visibility 0.5s;
}
.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}
.loader-aperture {
  overflow: visible;
}
.loader-blades path {
  fill: var(--ink);
  transform-origin: 60px 60px;
  transition: transform 0.6s var(--ease-soft);
}
/* chaque lame se rétracte vers l'extérieur pour simuler l'ouverture */
#loader.opening .loader-blades path {
  transform: scale(2.4);
  opacity: 0;
}
#loader.opening .loader-aperture circle {
  opacity: 0;
}
.loader-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
#loader.show-word .loader-word {
  opacity: 1;
  transform: translateY(0);
}
.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(17, 17, 17, 0.15);
  overflow: hidden;
}
.loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 1s var(--ease);
}
#loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#loader.reveal-clip {
  clip-path: circle(0% at 50% 50%);
  transition: clip-path 0.9s var(--ease-soft);
}

/* =========================================================
   CURSEUR PERSONNALISÉ
   ========================================================= */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10001;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  mix-blend-mode: difference;
  transition:
    width 0.35s var(--ease-soft),
    height 0.35s var(--ease-soft),
    background 0.3s;
  will-change: transform;
}
#cursor.hidden {
  opacity: 0;
}
#cursor-label {
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
  white-space: nowrap;
}
#cursor.expand {
  width: 74px;
  height: 74px;
  background: var(--ink);
}
#cursor.expand #cursor-label {
  opacity: 1;
}

@media (pointer: coarse) {
  #cursor {
    display: none;
  }
}

/* =========================================================
   HEADER
   ========================================================= */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px var(--edge);
  transition:
    padding 0.45s var(--ease-soft),
    background 0.45s var(--ease-soft),
    box-shadow 0.45s;
}
#site-header .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.main-nav {
  display: flex;
  gap: 2.4rem;
}
.main-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding-bottom: 2px;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.35s var(--ease-soft);
}
.main-nav a:hover::after {
  width: 100%;
}
.header-cta {
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.header-cta span {
  transition: transform 0.3s var(--ease-soft);
}
.header-cta:hover span {
  transform: translateX(4px);
}

#site-header.scrolled {
  padding: 14px var(--edge);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.06);
}

#menu-toggle {
  display: none;
  width: 34px;
  height: 22px;
  position: relative;
}
#menu-toggle span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.4px;
  background: var(--ink);
  transition:
    transform 0.35s var(--ease-soft),
    opacity 0.3s;
}
#menu-toggle span:first-child {
  top: 2px;
}
#menu-toggle span:last-child {
  bottom: 2px;
}
#menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(9px) rotate(45deg);
}
#menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-9px) rotate(-45deg);
}

#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 490;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.6rem;
  padding: 0 var(--edge);
  transform: translateY(-100%);
  opacity: 0;
  transition:
    transform 0.5s var(--ease-soft),
    opacity 0.4s;
  pointer-events: none;
}
#mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
#mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
#mobile-menu nav a {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.mobile-menu-mail {
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* =========================================================
   LAYOUT COMMUN DES SECTIONS
   ========================================================= */
main section {
  padding: min(14vh, 140px) var(--edge);
  position: relative;
  scroll-margin-top: var(--header-h);
}
.section-inner {
  max-width: 1400px;
  margin: 0 auto;
}
.section-inner.narrow {
  max-width: 820px;
}

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-soft),
    transform 0.9s var(--ease-soft);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   PLACEHOLDERS "VISEUR" (motif signature)
   ========================================================= */
.ph {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background:
    radial-gradient(
      120% 140% at 20% 15%,
      rgba(0, 122, 255, 0.16),
      transparent 55%
    ),
    radial-gradient(
      120% 140% at 85% 90%,
      rgba(175, 82, 222, 0.14),
      transparent 55%
    ),
    linear-gradient(155deg, #141416 0%, #1d1d20 45%, #101012 100%);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.vf-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: rgba(255, 255, 255, 0.55);
  opacity: 0.8;
}
.vf-corner.tl {
  top: 14px;
  left: 14px;
  border-top: 1.4px solid;
  border-left: 1.4px solid;
}
.vf-corner.tr {
  top: 14px;
  right: 14px;
  border-top: 1.4px solid;
  border-right: 1.4px solid;
}
.vf-corner.bl {
  bottom: 14px;
  left: 14px;
  border-bottom: 1.4px solid;
  border-left: 1.4px solid;
}
.vf-corner.br {
  bottom: 14px;
  right: 14px;
  border-bottom: 1.4px solid;
  border-right: 1.4px solid;
}
.ph-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  font-weight: 500;
}

/* =========================================================
   HERO
   ========================================================= */
#hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--header-h);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}
.hero-text {
  max-width: 640px;
}
.hero-text h1 {
  font-size: clamp(2.4rem, 7.5vw, 6.2rem);
  margin: 0.4rem 0 1.6rem;
}
.hero-text h1 .line {
  display: block;
}
.hero-signature {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}
.hero-lede {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 38ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2.6rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.95rem 1.7rem;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 600;
  transition:
    transform 0.35s var(--ease-soft),
    background 0.3s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent);
}
.btn-primary span {
  transition: transform 0.3s var(--ease-soft);
}
.btn-primary:hover span {
  transform: translateX(4px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(17, 17, 17, 0.25);
  padding-bottom: 2px;
  transition:
    color 0.3s,
    border-color 0.3s;
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.hero-image-wrap {
  position: relative;
  height: min(72vh, 720px);
}
.hero-image {
  position: absolute;
  inset: 0;
  transform: rotate(-4.5deg) translateX(4%);
  box-shadow: 0 40px 80px -30px rgba(17, 17, 17, 0.35);
  will-change: transform;
}

.scroll-hint {
  position: absolute;
  bottom: 2.6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 52px;
  background: rgba(17, 17, 17, 0.2);
  overflow: hidden;
}
.scroll-hint span {
  display: block;
  width: 100%;
  height: 40%;
  background: var(--ink);
  animation: scrollhint 2.2s var(--ease) infinite;
}
@keyframes scrollhint {
  0% {
    transform: translateY(-100%);
  }
  60% {
    transform: translateY(180%);
  }
  100% {
    transform: translateY(180%);
  }
}

/* =========================================================
   INTRO (01)
   ========================================================= */
#intro {
  background: var(--surface);
}

/* =========================================================
   DERNIER PROJET (02)
   ========================================================= */
.project-frame {
  display: block;
  aspect-ratio: 16/8.2;
  margin-top: 2.6rem;
  transition: transform 0.6s var(--ease-soft);
}
.project-frame:hover {
  transform: scale(1.012);
}
.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.4rem;
}
.project-place {
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.link-underline span {
  transition: transform 0.3s var(--ease-soft);
}
.link-underline:hover span {
  transform: translateX(4px);
}

/* =========================================================
   À PROPOS (03)
   ========================================================= */
.apropos-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}
.apropos-portrait {
  aspect-ratio: 4/5;
}
.more-text {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  margin-top: 0;
  transition:
    max-height 0.6s var(--ease-soft),
    opacity 0.5s,
    margin-top 0.6s var(--ease-soft);
}
.apropos-text.open .more-text {
  max-height: 220px;
  opacity: 1;
  margin-top: 1.1rem;
}
.more-toggle {
  margin-top: 1.6rem;
}
.more-toggle span {
  display: inline-block;
  transition: transform 0.35s var(--ease-soft);
}
.apropos-text.open .more-toggle span {
  transform: rotate(90deg);
}

/* =========================================================
   PRESTATIONS (04)
   ========================================================= */
.services-list {
  margin-top: 2.6rem;
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}
.service-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 1.7rem 1rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
}
.service-row::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--service-bg);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%);
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.45s var(--ease-soft),
    transform 0.45s var(--ease-soft);
  z-index: 0;
}
.service-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.45s var(--ease-soft);
  z-index: 0;
}
.service-index {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
  width: 2.4rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: color 0.3s;
}
.service-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -0.01em;
  transition:
    transform 0.45s var(--ease-soft),
    color 0.3s;
  position: relative;
  z-index: 1;
}
.service-thumb {
  display: none;
  width: 120px;
  height: 76px;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 2px;
  opacity: 0;
  transform: scale(0.92) translateX(10px);
  transition:
    opacity 0.4s var(--ease-soft),
    transform 0.4s var(--ease-soft);
}
.service-thumb .ph-label {
  font-size: 0.55rem;
}

/* Le survol n'est activé que sur les appareils qui ont un vrai pointeur
   fin (souris/trackpad). Sur tactile, ":hover" peut rester "collé" sur
   une ligne après un tap : on isole donc entièrement l'effet derrière
   ce media query, et seule la classe .tapped (pilotée en JS, exclusive)
   gère l'interaction sur mobile. */
@media (hover: hover) and (pointer: fine) {
  .service-row:hover::before,
  .service-row:hover::after {
    opacity: 1;
  }
  .service-row:hover::before {
    transform: scale(1);
  }
  .service-row:hover .service-index {
    color: rgba(255, 255, 255, 0.72);
  }
  .service-row:hover .service-name {
    transform: translateX(18px);
    color: var(--white);
  }
}

/* Mobile : tap ouvre l’aperçu au lieu du hover */
.service-row.tapped::before,
.service-row.tapped::after {
  opacity: 1;
}
.service-row.tapped::before {
  transform: scale(1);
}
.service-row.tapped .service-index {
  color: rgba(255, 255, 255, 0.72);
}
.service-row.tapped .service-name {
  transform: translateX(10px);
  color: var(--white);
}

/* =========================================================
   CTA FINAL / CONTACT
   ========================================================= */
#contact {
  background: var(--ink);
  color: var(--white);
  text-align: center;
  padding-top: min(20vh, 200px);
  padding-bottom: min(20vh, 200px);
}
.cta-final {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-title {
  color: var(--white);
  font-size: clamp(2.6rem, 8vw, 6rem);
  max-width: none;
}
.cta-sub {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.3rem;
  margin-top: 0.8rem;
}
.btn-inverse {
  background: var(--white);
  color: var(--ink);
  margin-top: 2.6rem;
}
.btn-inverse:hover {
  background: var(--accent-2);
  color: var(--white);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  padding: 5rem var(--edge) 2rem;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(17, 17, 17, 0.1);
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.footer-signature {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-links a,
.footer-contact a {
  color: var(--ink-soft);
  font-size: 0.9rem;
  transition: color 0.25s;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--ink);
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
  text-align: right;
}
.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}
.footer-legal {
  display: flex;
  gap: 1.4rem;
}
.footer-legal a:hover {
  color: var(--ink);
}

/* =========================================================
   NAV MOBILE FLOTTANTE (Liquid Glass)
   ========================================================= */
#mobile-tabbar {
  display: none;
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 400;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 100px;
  padding: 0.5rem 0.6rem;
  box-shadow: 0 8px 32px rgba(17, 17, 17, 0.12);
  gap: 0.2rem;
  max-width: 95vw;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}
#mobile-tabbar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}
#mobile-tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  padding: 0.4rem 0.65rem;
  border-radius: 100px;
  transition:
    color 0.3s,
    background 0.3s;
}
#mobile-tabbar a .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.3s;
}
#mobile-tabbar a.active {
  color: var(--ink);
}
#mobile-tabbar a.active .dot {
  background: var(--accent);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .main-nav,
  .header-cta {
    display: none;
  }
  #menu-toggle {
    display: block;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-image-wrap {
    height: 52vh;
    margin-top: 2.4rem;
    order: 3;
  }
  .hero-image {
    transform: rotate(-4.5deg);
  }
  .hero-text {
    order: 2;
    max-width: none;
  }
  .apropos-grid {
    grid-template-columns: 1fr;
  }
  .apropos-portrait {
    aspect-ratio: 16/10;
  }
  #mobile-tabbar {
    display: flex;
  }
  footer {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
  #cursor {
    display: none;
  }
  html.has-fine-pointer {
    cursor: auto;
  }
  html.has-fine-pointer a,
  html.has-fine-pointer button {
    cursor: pointer;
  }
}

@media (max-width: 640px) {
  main section {
    padding: 5.4rem var(--edge);
  }
  #hero {
    padding-top: calc(var(--header-h) - 20px);
  }
  .hero-actions {
    gap: 1.4rem;
    flex-wrap: wrap;
  }
  .service-thumb {
    width: 74px;
    height: 50px;
  }
  .service-name {
    font-size: 1.5rem;
  }
  .footer-contact {
    align-items: flex-start;
    text-align: left;
  }
  #contact {
    padding-top: 5.4rem;
    padding-bottom: 6.5rem;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    transform: none;
  }
  .hero-image {
    transform: none !important;
  }
}

/* Fallback : FX réduits appliqués via JS sur devices peu puissants.
   On coupe uniquement la transition (le JS n'attache alors plus le
   parallaxe dynamique), en conservant l'inclinaison éditoriale statique
   de l'image, qui doit rester visible sur tous les appareils. */
html.reduced-fx .hero-image {
  transition: none;
}

/* =========================================================
   PAGES LÉGALES (mentions-legales.html / confidentialite.html)
   ========================================================= */
.legal-main {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 4rem) var(--edge) 8rem;
}
.legal-main h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2.4rem;
  max-width: none;
}
.legal-main h2 {
  font-size: 1.3rem;
  max-width: none;
  margin-top: 2.6rem;
  margin-bottom: 0.8rem;
}
.legal-main p,
.legal-main li {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.7;
  margin-top: 0.6rem;
}
.legal-main a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.legal-back:hover {
  color: var(--ink);
}

/* ============ PROJECTS CAROUSEL ============ */
.projects-list-container {
  margin-top: 2rem;
  overflow: visible; /* était: hidden */
}

.projects-carousel {
  position: relative;
  width: 100%;
  overflow: visible; /* était: hidden */
}

.projects-carousel-viewport {
  width: 100%;
  overflow: hidden;
  contain: layout paint;
}

.projects-carousel-track {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0); /* crée sa propre couche de composition */
}

.projects-carousel[aria-busy="true"] .projects-carousel-btn {
  pointer-events: none;
}

.projects-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.14);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transform: translateY(-50%);
}
#tous-mes-projets .section-inner {
  overflow: visible; /* au cas où un overflow hidden parent couperait les flèches */
}
.projects-carousel-btn.prev {
  left: -60px;
}
.projects-carousel-btn.next {
  right: -60px;
}
@media (max-width: 1100px) {
  .projects-carousel-btn.prev {
    left: 0.75rem;
  }
  .projects-carousel-btn.next {
    right: 0.75rem;
  }
}
.projects-carousel-btn:hover {
  background: var(--white);
  transform: translateY(-50%) scale(1.04);
}
.projects-carousel-btn:disabled {
  opacity: 0.38;
  pointer-events: none;
}
.projects-carousel-btn[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .projects-carousel-track {
    transition: none;
  }
}

.project-item {
  display: flex;
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.project-item:hover {
  background: rgba(0, 0, 0, 0.04);
  transform: translateY(-2px);
}

.project-item-image {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  overflow: hidden;
  align-self: center;
  position: relative;
}

.project-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-item-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-item-title {
  font-size: clamp(1.1rem, 1.7vw, 1.4rem);
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.project-title-link {
  text-decoration: none;
  display: inline-block;
  width: fit-content;
}
.project-title-link:hover .project-item-title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-item-date {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0;
}

.project-item-desc {
  font-size: 0.95rem;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
  max-width: none;
}

.project-item-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .project-item {
    flex: 0 0 85%;
  }
}

/* ============ PROJECT MODAL ============ */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.project-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 0;
}

.project-modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  z-index: 1;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 3rem;
}

.project-modal.is-open .project-modal-content {
  transform: translateY(0);
}

.project-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.project-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.project-modal-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.project-modal-content h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.project-modal-date {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.project-modal-text {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 2rem;
}

.project-modal-actions {
  display: flex;
  gap: 1rem;
}

@media (max-width: 640px) {
  .project-modal {
    align-items: stretch;
    padding: 0;
  }

  .project-modal-content {
    width: 100%;
    height: 100svh;
    max-height: none;
    padding: 4.4rem 1rem calc(6.5rem + env(safe-area-inset-bottom, 0px));
    border-radius: 0;
    box-shadow: none;
    background: var(--white);
  }

  .project-modal-close {
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.82);
  }

  .project-modal-image {
    aspect-ratio: 16 / 10;
    max-height: 260px;
    margin-bottom: 1.2rem;
  }

  .project-modal-content h2 {
    font-size: clamp(1.45rem, 9vw, 2rem);
    line-height: 1.05;
  }

  .project-modal-text {
    font-size: 1rem;
  }

  .project-modal-actions {
    flex-direction: column;
  }
}

/* ============ IMAGES REELLES (Remplaçant les fausses images .ph) ============ */
.real-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1; /* En dessous du ::before de .ph s'il y a un effet d'overlay, ou au-dessus selon le rendu désiré */
}

/* ============ IMAGE ZOOM MODAL ============ */
.image-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  cursor: zoom-out;
}

.image-zoom-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.image-zoom-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
}

.image-zoom-content {
  position: relative;
  z-index: 10003;
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-zoom-modal.is-open .image-zoom-content {
  transform: scale(1);
}
