/* MEJI — thème sombre. Couleurs de la marque : rouge #ff0d0d, gris #262626 */
:root {
  --red: #ff2a2a;
  --red-deep: #e00b0b;
  --bg: #0b0b0c;
  --bg-2: #141416;
  --card: #18181b;
  --ink: #f4f2ef;
  --muted: #a3a09b;
  --line: #2a2a2e;
  --radius: 14px;
  --wrap: 1180px;
  --head: "Archivo", system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
html:not(.lenis) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:not(.lenis) { scroll-behavior: auto; } }
body { margin: 0; font: 18px/1.6 var(--body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.05; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.2vw, 5.2rem); font-weight: 800; max-width: 11em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); font-weight: 700; }
h2.big { font-size: clamp(2.4rem, 6vw, 4.8rem); }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
.hidden { display: none; }
.muted { color: var(--muted); }
::selection { background: var(--red); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; position: relative; }

/* Canvas 3D derrière le contenu */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s; }
#gl.is-ready { opacity: 1; }
.header, main, .footer { position: relative; z-index: 1; }

/* Intro */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: none; place-items: center; align-content: center; gap: 22px; }
.js .intro { display: grid; }
.intro img { width: 56px; height: auto; }
.intro__bar { width: 120px; height: 2px; background: var(--line); position: relative; overflow: hidden; }
.intro__bar::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; animation: bar .9s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes bar { to { transform: scaleX(1); } }
.intro.is-done { opacity: 0; visibility: hidden; transition: opacity .5s, visibility .5s; }
@media (prefers-reduced-motion: reduce) { .js .intro { display: none; } }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 15px 26px; border-radius: 999px;
  background: var(--red); color: #fff; font-family: var(--head); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 1.5px solid var(--red); cursor: pointer; transition: background .2s, color .2s, border-color .2s;
  will-change: transform;
}
.btn:hover { background: #fff; border-color: #fff; color: var(--bg); }
.btn--ghost { background: transparent; color: var(--ink); border-color: #4a4a50; }
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--small { padding: 10px 18px; font-size: .95rem; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* En-tête */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.header.is-scrolled { background: rgba(11,11,12,.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.header__logo img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { text-decoration: none; font-weight: 600; font-size: 1rem; color: var(--muted); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--ink); }
.header__toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font: 600 .95rem var(--body); color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .header__toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 24px; }
  .nav.is-open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 18px; }
}

/* Hero */
.hero { min-height: 100svh; display: flex; align-items: center; padding: 110px 0 80px; position: relative; }
.eyebrow { font-family: var(--head); font-weight: 600; font-size: .85rem; color: var(--red); text-transform: uppercase; letter-spacing: .14em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__fallback { display: none; position: absolute; right: 24px; top: 50%; width: 220px; transform: translateY(-50%); opacity: .9; }
.no-gl .hero__fallback { display: block; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; border: 1.5px solid #4a4a50; border-radius: 14px; transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; background: var(--red); border-radius: 2px; animation: hint 1.8s infinite; }
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (max-width: 860px) {
  .hero { align-items: flex-start; padding-top: 46svh; min-height: auto; }
  .hero h1 { font-size: 2.3rem; }
  .hero__fallback { position: static; transform: none; width: 110px; margin-top: 40px; }
  .hero h1, .hero .lead { text-shadow: 0 2px 24px rgba(11,11,12,.9); }
}

/* Services en étapes */
.stage { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; max-width: 520px; padding: 80px 0; }
.stage__num { font-family: var(--head); font-weight: 600; color: var(--red); margin-bottom: 18px; font-size: 1rem; }
.stage p { color: var(--muted); font-size: 1.15rem; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags li { border: 1px solid var(--line); background: rgba(20,20,22,.7); border-radius: 999px; padding: 6px 14px; font-size: .95rem; }
@media (max-width: 860px) {
  .stage { min-height: 100svh; justify-content: flex-start; padding-top: 50svh; }
  .stage h2, .stage p { text-shadow: 0 2px 24px rgba(11,11,12,.95); }
}

/* Bande de logos */
.logos { padding: 56px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.logos__title { text-align: center; color: var(--muted); font-size: .9rem; margin-bottom: 26px; }
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; align-items: center; gap: 72px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track img { height: 36px; width: auto; max-width: 140px; object-fit: contain; filter: grayscale(1) brightness(2.2); opacity: .55; transition: filter .3s, opacity .3s; }
.marquee__track img:hover { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; } }

/* Réalisations */
.work { background: var(--bg); padding: 110px 0; overflow: hidden; }
.work__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.work__head p { margin: 0; }
.work__track { display: flex; gap: 28px; padding: 0 max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); width: max-content; }
.project { width: min(460px, 82vw); flex: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s; }
.project:hover { border-color: #3d3d43; }
.project__media { aspect-ratio: 4 / 3; overflow: hidden; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.project:hover .project__media img { transform: scale(1.05); }
.project__media--logo { display: grid; place-items: center; background: #f4f2ef; }
.project__media--logo img { width: 50%; height: auto; object-fit: contain; }
.project__body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.project__body p { color: var(--muted); font-size: 1.02rem; }
.project__tags { font-size: .85rem !important; font-weight: 600; color: var(--red) !important; margin-bottom: .5em; }
.project__body a { margin-top: auto; font-weight: 600; text-decoration: none; }
.project__body a:hover { color: var(--red); }
.project--cta { justify-content: space-between; padding: 32px; background: var(--red); border-color: var(--red); text-decoration: none; color: #fff; font-family: var(--head); font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.05; }
.project--cta:hover { border-color: #fff; }
.project__arrow { align-self: flex-end; font-size: 3rem; transition: transform .3s; }
.project--cta:hover .project__arrow { transform: translateX(10px); }
@media (max-width: 860px) {
  .work__track { flex-direction: column; width: auto; padding: 0 24px; }
  .project { width: 100%; }
  .project--cta { min-height: 220px; }
}

/* Sections */
.section { padding: 110px 0; background: var(--bg); }
.section__intro { max-width: 36em; margin-bottom: 44px; }
@media (max-width: 860px) { .section, .work { padding: 72px 0; } }

/* Tarifs */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.price { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.price--main { border-color: var(--red); box-shadow: 0 0 0 1px var(--red) inset; }
.price__amount { font-family: var(--head); font-size: 2.4rem; font-weight: 700; margin-bottom: 20px; }
.price__amount span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 1rem; color: #d6d3ce; }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; max-width: 480px; } }

/* Équipe */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 40px; }
.team li { display: flex; flex-direction: column; gap: 2px; }
.team span:last-child { color: var(--muted); font-size: 1rem; }
.avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--red); display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 1.2rem; margin-bottom: 14px; }
@media (max-width: 860px) { .team { grid-template-columns: repeat(2, 1fr); } }

/* Contact */
.contact-section { border-top: 1px solid var(--line); }
.contact { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: start; }
.contact__info { display: grid; grid-template-columns: auto 1fr; gap: 12px 28px; margin: 0; }
.contact__info dt { font-weight: 600; }
.contact__info dd { margin: 0; color: var(--muted); }
.contact__info a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 4px; }
.form { display: grid; gap: 16px; background: var(--card); border: 1px solid var(--line); padding: 32px; border-radius: var(--radius); }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 1rem; }
.form small { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea {
  font: 400 1rem var(--body); padding: 13px 14px; border: 1px solid #36363b; border-radius: 10px; background: var(--bg); color: var(--ink); width: 100%;
  transition: border-color .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--red); outline: none; }
.form textarea { resize: vertical; }
.form .btn { justify-self: start; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .contact__info { grid-template-columns: 1fr; gap: 2px; }
  .contact__info dd { margin-bottom: 12px; }
}

/* Pied de page */
.footer { background: #070708; border-top: 1px solid var(--line); color: var(--muted); padding: 40px 0; font-size: .95rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer p { margin: 0; }
.footer a { color: var(--ink); text-decoration: none; }
.footer img { height: 32px; width: auto; }

/* Animations d'apparition (préparées seulement si GSAP est chargé) */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; will-change: transform; }

/* Page de remerciement / 404 */
.thanks { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 60px 24px; }
.thanks p { color: var(--muted); }
.thanks h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-left: auto; margin-right: auto; }
