/* ═══════════════════════════════════════════════
   ydriss.blend — CSS
   Funnel Sans · Grille · Scroll infini
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Funnel+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

/* ─── TOKENS ─── */
:root {
  --font:     'Funnel Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --black:    #0a0a0a;
  --white:    #f0ede8;
  --grey:     #888880;
  --nav-h:    72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  cursor: none;
}
a { color: inherit; text-decoration: none; }

/* ─── SELECTION ─── */
::selection { background: #FF2A2A; color: #fff; }

/* ─── CURSOR ─── */
#cursor {
  position: fixed;
  top: 0; left: 0;
  width: 7px; height: 7px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease-out), height .25s var(--ease-out);
  mix-blend-mode: difference;
  will-change: left, top;
}
#cursor.hover { width: 30px; height: 30px; }

/* ─── NAV ─── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: difference;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: all;
}

.nav-logo, .nav-about-btn, .nav-lang-btn {
  pointer-events: all;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--white);
  background: none;
  border: none;
  cursor: none;
  line-height: 1;
  mix-blend-mode: difference;
  transition: color .25s, opacity .25s, mix-blend-mode 0s;
}

.nav-about-btn:hover, .nav-lang-btn:hover {
  color: #FF2A2A;
  opacity: 1;
  mix-blend-mode: normal;
}

/* Séparateur entre "À propos" et "EN" */
.nav-lang-btn {
  opacity: .45;
  position: relative;
  padding-left: 18px;
}
.nav-lang-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 10px;
  background: #FF2A2A;
  opacity: .5;
}

/* ─── ABOUT ─── */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  padding: 80px 24px 44px;
  gap: 0 80px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .55s var(--ease-out);
}
.about-overlay.open { opacity: 1; pointer-events: all; }

.about-left { display: flex; flex-direction: column; gap: 28px; }

.about-tagline {
  font-size: clamp(22px, 3.5vw, 42px);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.about-body {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--grey);
  max-width: 340px;
}

.about-contact { display: flex; flex-direction: column; gap: 10px; }
.about-contact-email {
  font-size: clamp(16px, 1.8vw, 24px);
  font-weight: 300;
  letter-spacing: -.01em;
  color: var(--white);
  cursor: none;
  width: fit-content;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,.25);
  transition: border-color .2s;
}
.about-contact-email:hover { border-bottom-color: #FF2A2A; }

.about-links { display: flex; flex-direction: row; gap: 20px; }
.about-link {
  font-size: clamp(14px, 1.4vw, 18px);
  color: var(--grey);
  cursor: none;
  width: fit-content;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.about-link:hover { color: var(--white); border-bottom-color: #FF2A2A; }
.about-credentials {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .06em;
  color: var(--grey);
  opacity: .7;
  line-height: 1.6;
}
.about-meta { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); }

.about-right { display: flex; flex-direction: column; gap: 16px; }
.about-section-title {
  font-size: 10px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey);
}

/* Grille clients 2×2 */
.about-clients-grid {
  display: grid;
  grid-template-columns: 160px 160px;
  grid-template-rows: 160px 160px;
  gap: 1px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  width: fit-content;
}
.about-client-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 160px;
  height: 160px;
  background: var(--black);
  transition: background .2s;
  cursor: none;
  text-decoration: none;
}
.about-client-cell:hover { background: #141414; }
.about-client-logo {
  height: auto;
  width: 40%;
  max-width: 100px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .5;
  transition: opacity .2s;
}
.about-client-cell:hover .about-client-logo { opacity: .85; }
.about-client-label {
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--white);
  opacity: .35;
  transition: opacity .2s;
}
.about-client-cell:hover .about-client-label { opacity: .6; }

.about-close {
  position: fixed;
  top: 18px; right: 22px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: .05em;
  color: var(--white);
  background: none; border: none; cursor: none;
  opacity: .55;
  transition: opacity .2s;
  z-index: 201;
}
.about-close:hover { opacity: 1; }

/* ═══════════════════════════════════════════════
   SCROLL CONTAINER
═══════════════════════════════════════════════ */
#scroll-outer {
  /* position/inset/overflow appliqués par JS au init */
}
#scroll-inner {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  will-change: transform;
}

/* ═══════════════════════════════════════════════
   GRILLE
═══════════════════════════════════════════════ */
.row {
  display: flex;
  gap: 0;
  width: 100%;
}

.cell {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background: #111;
}

/* Largeurs */
.cell.full       { width: 100%; }
.cell.half       { width: 50%; }
.cell.third      { width: 33.333%; }
.cell.two-thirds { width: 66.666%; }
.cell.quarter    { width: 25%; }
.cell.three-q    { width: 75%; }

/* Ratios */
.cell::before {
  content: '';
  display: block;
  width: 100%;
}
.cell.r-16-9::before  { padding-bottom: 56.25%; }
.cell.r-9-16::before  { padding-bottom: 177.77%; }
.cell.r-4-5::before   { padding-bottom: 125%; }
.cell.r-3-4::before   { padding-bottom: 134.25%; }
.cell.r-1-1::before   { padding-bottom: 100%; }
.cell.r-3-2::before   { padding-bottom: 66.66%; }
.cell.r-2-3::before   { padding-bottom: 150%; }

/* Media */
.cell img,
.cell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
  transform: translateZ(0);
  transition: transform 0.6s var(--ease-out);
}
.cell:hover img,
.cell:hover video {
  transform: scale(1.03) translateZ(0);
}

/* ── VIMEO EMBED ── */
.vimeo-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%) scale(1.01);
  border: none;
  pointer-events: none;
  background: var(--black);
}

.vimeo-cell:hover .vimeo-bg {
  transform: translate(-50%, -50%) scale(1.04);
  transition: transform 0.6s var(--ease-out);
}

/* Poster Vimeo — fade out quand la vidéo joue */
.vimeo-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--thumb);
  background-size: cover;
  background-position: center;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.8s ease;
  pointer-events: none;
}
.vimeo-cell.playing::after { opacity: 0; }
.vimeo-cell .vimeo-bg { z-index: 1; }
.vimeo-cell .cell-label { z-index: 3; }

/* ── Label projet ── */
.cell-label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 10;
  font-size: 9.5px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: white;
  opacity: 1;
  mix-blend-mode: exclusion;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════
   INTRO
═══════════════════════════════════════════════ */
#intro {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: all;
  transition: opacity .8s var(--ease-out);
}
#intro.hidden {
  opacity: 0;
  pointer-events: none;
}
.intro-name {
  font-size: clamp(48px, 9vw, 130px);
  font-weight: 300;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--white);
  white-space: nowrap;
}
.intro-name .accent {
  font-weight: 700;
  color: #FF2A2A;
}
.intro-sub {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--grey);
}
#intro-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  background: #FF2A2A;
  width: 0%;
  transition: width linear;
}

/* ── Scroll hint ── */
#scroll-hint {
  position: fixed;
  bottom: 40px;
  left: 0;
  right: 0;
  text-align: center;
  pointer-events: none;
  z-index: 9999;
  font-size: clamp(48px, 9vw, 130px);
  letter-spacing: .2em;
  text-transform: uppercase;
  font-family: var(--font);
  font-weight: 300;
  line-height: 1;
  color: #555;
  mix-blend-mode: difference;
  transition: color 1s var(--ease-out);
}
#scroll-hint.hidden { color: #000; }
#scroll-hint-inner { display: contents; }

/* ── CTA Bubble ── */
#cta-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 8000;
  background: var(--black);
  border: 1px solid rgba(240,237,232,.12);
  padding: 40px 36px;
  text-align: center;
  width: 280px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}
#cta-bubble.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.cta-title {
  font-size: 22px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: -.01em;
  margin: 0 0 20px;
  line-height: 1.2;
  transition: color .2s;
}
#cta-bubble:hover .cta-title { color: #FF2A2A; }
.cta-email {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(240,237,232,.35);
  transition: color .2s, text-decoration-color .2s;
  margin-bottom: 28px;
}
.cta-email:hover {
  color: #FF2A2A;
  text-decoration-color: #FF2A2A;
}
.cta-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.cta-link {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(240,237,232,.45);
  transition: color .2s;
}
.cta-link:hover { color: #FF2A2A; }
.cta-link:hover { color: var(--white); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  body { cursor: auto; }
  #cursor { display: none; }
  #nav { padding: 0 16px; }

  .cell.half,
  .cell.third,
  .cell.two-thirds,
  .cell.quarter,
  .cell.three-q { width: 100%; }

  .row { flex-direction: column; }

  .about-overlay {
    grid-template-columns: 1fr;
    padding: 72px 16px 36px;
    gap: 36px 0;
    overflow-y: auto;
    align-items: start;
  }
  .about-links { flex-wrap: wrap; }
  .about-close { right: 16px; }
}
