/* Replics — portfolio statique
   Reprend l'esprit du thème WordPress « Most » + Elementor :
   Inter 900 pour les titres, coins arrondis 32px, violet #82479b du menu actif,
   hashtags orange #EF5D39, dégradé noir sur la vidéo d'accueil. */

:root {
  --bg: #0b0b0e;
  --bg-2: #131318;
  --surface: #1a1a21;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f4;
  --text-soft: #b9b9c2;
  --text-mute: #7e7e7e;
  --violet: #82479b;
  --violet-2: #6b4fa3;
  --teal: #2e9fb3;
  --orange: #ef5d39;
  --radius: 32px;
  --radius-sm: 16px;
  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 76px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* ---------- En-tête ---------- */

.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s, backdrop-filter .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled,
.header.is-solid {
  background: rgba(11, 11, 14, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.header__logo img { height: 34px; width: auto; }
.header__logo { transition: opacity .35s ease, transform .35s ease; }
/* Accueil : le petit logo n'apparaît qu'une fois le grand logo du hero sorti de l'écran */
.header--home .header__logo { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.header--home.show-logo .header__logo { opacity: 1; transform: none; pointer-events: auto; }

.header__right { display: flex; align-items: center; gap: 18px; }

/* Sélecteur de langue (même principe que le making-of Dark Messiah) :
   replié = drapeau actif + « Changer de langue ▾ » ; le survol ou le premier tap déplie les drapeaux. */
.langs { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.langs__flag { display: none; padding: 4px; line-height: 0; border-radius: 8px; opacity: .55; transition: opacity .2s; }
.langs__flag.on { display: block; opacity: 1; box-shadow: 0 0 0 2px var(--violet); }
.langs__flag:hover { opacity: .9; }
.langs__flag svg { width: 30px; height: 20px; border-radius: 3px; display: block; }
.langs__label { order: -1; font-size: 13px; color: var(--text-soft); padding: 0 4px; white-space: nowrap; }
.langs__label::after { content: " ▾"; }
.langs.open .langs__flag { display: block; }
.langs.open .langs__label { display: none; }
@media (hover: hover) {
  .langs:hover .langs__flag, .langs:focus-within .langs__flag { display: block; }
  .langs:hover .langs__label, .langs:focus-within .langs__label { display: none; }
}

.nav { display: flex; gap: 6px; }
.nav a {
  text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 8px 20px; border-radius: 25px;
  color: var(--text-soft);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { background: var(--violet); color: #fff; }

/* ---------- Accueil : vidéo YouTube en fond ---------- */

.hero {
  position: relative;
  min-height: min(100vh, 1200px); min-height: min(100svh, 1200px);
  display: flex; align-items: center;
  overflow: hidden;
  background: #000 url("../img/jupiter-1000-maquette.jpg") center / cover no-repeat;
  border-radius: 0 0 0 45px;
}

.hero__video {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero__video.is-ready { opacity: 1; }
/* iframe 16:9 toujours plus grande que l'écran = effet « cover » */
.hero__video iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;
  min-height: 100vh; min-width: 177.78vh;
  transform: translate(-50%, -50%);
  border: 0;
}

/* Dégradé d'origine Elementor : transparent → #000000F2 à 56 %, angle 0°, opacité 0.48 */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.95) 56%);
  opacity: 0.48;
}
/* Lisibilité du texte + fondu vers la suite de la page */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0) 100%),
    linear-gradient(180deg, rgba(11, 11, 14, 0) 70%, rgba(11, 11, 14, 0.9) 100%);
}

.hero__content {
  position: relative; z-index: 2;
  padding-top: calc(var(--header-h) + 40px); padding-bottom: 96px;
}
.hero__inner { max-width: 656px; }

.hero__logo { width: min(420px, 88%); height: auto; margin-bottom: 36px; }

.hero__title {
  margin: 0 0 24px;
  font-size: clamp(29px, 5vw, 50px);
  font-weight: 900; line-height: 1.12; letter-spacing: -0.01em;
  text-transform: uppercase; color: #fff;
}

.hero__text { color: #e9e9e9; font-size: 17px; max-width: 60ch; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, 0.5); border-radius: 14px;
}
.hero__scroll::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px;
  margin-left: -2px; border-radius: 2px; background: #fff;
  animation: scroll-hint 1.8s ease-in-out infinite;
}
@keyframes scroll-hint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px;
  font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s, background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(135deg, var(--violet) 0%, var(--teal) 100%); color: #fff; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: rgba(255, 255, 255, 0.04); }
.btn--ghost:hover { border-color: #fff; }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 10vw, 128px) 0; }

.section__head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 24px; margin-bottom: 48px;
}
.section__title {
  margin: 0; font-size: clamp(36px, 6vw, 64px); font-weight: 900;
  line-height: 1.05; text-transform: uppercase; letter-spacing: -0.01em;
}
.section__kicker {
  display: block; margin-bottom: 12px;
  color: var(--text-mute); font-size: 14px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}

/* ---------- Filtres ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: 600 14px/1 var(--font); color: var(--text-soft);
  background: transparent; border: 1px solid var(--line);
  padding: 10px 18px; border-radius: 25px; cursor: pointer;
  transition: color .2s, background-color .2s, border-color .2s;
}
.filters button:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.25); }
.filters button[aria-pressed="true"] { background: var(--violet); border-color: var(--violet); color: #fff; }

/* ---------- Grille de projets (ratio 3:4, rayon 24pt comme ms_projects) ---------- */

.grid {
  display: grid; gap: clamp(16px, 2.2vw, 32px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative; display: block; text-decoration: none;
  aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); isolation: isolate;
}
.card[hidden] { display: none; }

.card__media { position: absolute; inset: 0; z-index: -2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img { transform: scale(1.05); }

/* Visuel de remplacement quand le projet n'a pas encore d'image */
.card__placeholder {
  position: absolute; inset: 0; z-index: -2;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 80% at 0% 0%, hsla(var(--h1), 55%, 42%, 0.85) 0%, transparent 60%),
    radial-gradient(100% 80% at 100% 100%, hsla(var(--h2), 60%, 40%, 0.75) 0%, transparent 60%),
    #15151b;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__placeholder { transform: scale(1.05); }
.card__placeholder span {
  font-size: clamp(64px, 9vw, 120px); font-weight: 900; line-height: 1;
  color: rgba(255, 255, 255, 0.1); text-transform: uppercase; letter-spacing: -0.04em;
}

.card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
}

.card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.card__tags span {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card__title { margin: 0 0 6px; font-size: 26px; font-weight: 900; line-height: 1.15; text-transform: uppercase; color: #fff; }
.card__client { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 15px; }
.card__arrow {
  position: absolute; top: 24px; right: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: #000;
  opacity: 0; transform: scale(.7) rotate(-45deg);
  transition: opacity .3s, transform .3s;
}
.card:hover .card__arrow, .card:focus-visible .card__arrow { opacity: 1; transform: scale(1) rotate(-45deg); }

/* ---------- Page projet ---------- */

.project-hero {
  position: relative;
  padding: calc(var(--header-h) + 8vh) 0 8vh;
  background: var(--bg-2);
  border-radius: 0 0 0 45px;
  overflow: hidden;
}
/* lignes verticales du thème Most */
.project-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 4) 100%;
  mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}
.project-hero .wrap { position: relative; }

.project-hero__top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  margin-bottom: 5em;
}
.project-hero__title {
  margin: 0; font-size: clamp(36px, 6vw, 64px); font-weight: 900;
  line-height: 1.05; text-transform: uppercase; letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.project-hero__lead { font-size: clamp(18px, 2vw, 24px); line-height: 1.66; color: var(--text); }
.project-hero__lead p { margin: 0; }

.project-hero__meta { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.meta-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.meta__label {
  margin: 0 0 8px; color: var(--text-mute);
  font-size: 16px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.meta__value { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.5; }

.hashtags {
  margin: 0; color: var(--orange); font-size: 16px; line-height: 31px;
  text-transform: lowercase; word-spacing: 18px;
  text-shadow: 12px 0 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 900px) {
  .project-hero__top, .project-hero__meta { grid-template-columns: 1fr; }
  .project-hero__top { margin-bottom: 3em; }
}
@media (max-width: 480px) { .meta-cols { grid-template-columns: 1fr; } }

.project-body { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.project-body--single { grid-template-columns: minmax(0, 760px); }
@media (max-width: 900px) { .project-body { grid-template-columns: 1fr; } }

.gallery { display: grid; gap: 32px; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gallery img, .gallery video { width: 100%; height: auto; }
.gallery a { display: block; cursor: zoom-in; }

.gallery .embed { aspect-ratio: 16 / 9; }
.gallery .embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.project-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.project-desc { position: sticky; top: calc(var(--header-h) + 32px); }
.project-desc h2 { margin: 0 0 20px; font-size: 28px; font-weight: 900; text-transform: uppercase; }
.project-desc__text { color: var(--text-soft); line-height: 32px; }
.project-desc__text strong { color: var(--text); }

.project-empty {
  border: 1px dashed rgba(255, 255, 255, 0.18); border-radius: var(--radius);
  padding: 40px; color: var(--text-mute); text-align: center;
}

.project-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: clamp(56px, 8vw, 96px); padding-top: 32px; border-top: 1px solid var(--line);
}
.project-nav a { text-decoration: none; }
.project-nav__back { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.project-nav__back svg { width: 28px; height: 28px; fill: currentColor; }
.project-nav__next { text-align: right; }
.project-nav__next small { display: block; color: var(--text-mute); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }
.project-nav__next strong { font-size: 22px; font-weight: 900; text-transform: uppercase; }

/* ---------- Contact ---------- */

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact__title { margin: 0 0 20px; font-size: clamp(30px, 4vw, 42px); font-weight: 900; line-height: 1.4; }
.contact__text { color: var(--text-soft); line-height: 28px; margin-bottom: 28px; }
.contact__map {
  border-radius: 24px; overflow: hidden; height: 45vh; min-height: 300px; background: var(--surface);
}
.contact__map iframe { width: 100%; height: 100%; border: 0; filter: saturate(0) invert(.92) hue-rotate(180deg) contrast(.9); }

/* ---------- Pied de page ---------- */

.footer { padding: 40px 0; border-top: 1px solid var(--line); color: var(--text-mute); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer img { height: 26px; width: auto; opacity: .8; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

.footer__mail {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
}
.footer__mail:hover { color: var(--text); }
button.btn { font-family: var(--font); }

/* ---------- Vérification avant affichage de l'e-mail ---------- */

.mail-gate {
  width: min(440px, calc(100vw - 32px)); padding: 0;
  border: 1px solid var(--line); border-radius: 24px;
  background: var(--surface); color: var(--text);
}
.mail-gate::backdrop { background: rgba(0, 0, 0, 0.75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.mail-gate__form { position: relative; padding: 32px; }
.mail-gate h2 { margin: 0 0 12px; font-size: 24px; font-weight: 900; text-transform: uppercase; }
.mail-gate p { color: var(--text-soft); font-size: 15px; line-height: 1.6; }
.mail-gate__close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08);
  color: var(--text); font-size: 20px; line-height: 1; cursor: pointer;
}
.mail-gate__close:hover { background: rgba(255, 255, 255, 0.16); }
.mail-gate__label { display: block; margin: 20px 0 16px; font-weight: 700; }
.mail-gate__label input {
  display: block; width: 100%; margin-top: 10px; padding: 12px 16px;
  font: 600 18px var(--font); color: var(--text);
  background: var(--bg); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px;
}
.mail-gate__label input:focus { outline: 2px solid var(--violet); outline-offset: 1px; border-color: transparent; }
.mail-gate__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mail-gate__error { color: var(--orange) !important; margin: -4px 0 16px; }
.mail-gate__address { margin: 16px 0 24px; font-size: 20px !important; font-weight: 700; }
.mail-gate__address a { color: var(--text); text-decoration-color: var(--violet); text-underline-offset: 4px; }
.mail-gate__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.mail-gate [hidden] { display: none; }

/* ---------- Visionneuse d'images ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(0, 0, 0, 0.92);
}
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 90vh; width: auto; border-radius: 12px; }
.lightbox button {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px;
  border-radius: 50%; border: 0; background: #fff; color: #000; font-size: 24px; cursor: pointer;
}

/* ---------- Apparition au défilement ---------- */

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll::after { animation: none; }
  .hero__video { display: none; }
}

@media (max-width: 860px) {
  .langs__label { display: none; }
  .header__right { gap: 10px; }
}
@media (max-width: 600px) {
  .nav a { padding: 8px 10px; font-size: 14px; }
  .nav { gap: 2px; }
  .langs__flag svg { width: 26px; height: 17px; }
  .header__logo img { height: 26px; }
  .hero { border-radius: 0 0 0 28px; }
  .project-hero { border-radius: 0 0 0 28px; }
  .card__body { padding: 22px; }
}
