/* ===========================================================
   PESTAKLE — Carte de visite digitale
   Plat, minimal, sans dégradé. Noir, blanc cassé, un rouge.
   Mobile-first. Zéro dépendance.
   =========================================================== */

:root {
  color-scheme: dark;

  --bg:       #0A0A0B;
  --surface:  #101012;
  --surface-2:#16161A;
  --ink:      #F2F0EC;
  --ink-rgb:  242, 240, 236;
  --accent:   #D9412B;

  --line:   rgba(var(--ink-rgb), .11);
  --line-2: rgba(var(--ink-rgb), .20);
  --muted:  rgba(var(--ink-rgb), .58);
  --muted-2:rgba(var(--ink-rgb), .38);

  --display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif:   Georgia, "Times New Roman", serif;
  --mono:    ui-monospace, "SF Mono", Menlo, monospace;

  --pad: 20px;
  --r: 3px;
  --dock-h: 62px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100svh;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; font-size: 16px; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }

/* ---------- type ---------- */

.it { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }

.eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted-2); font-weight: 600;
}
.eyebrow.accent { color: var(--accent); }

h1, h2, h3 { font-weight: 700; letter-spacing: -.035em; line-height: 1.03; }
h1 { font-size: clamp(38px, 12vw, 74px); letter-spacing: -.05em; }
h2 { font-size: clamp(24px, 6.4vw, 38px); }
h3 { font-size: clamp(17px, 4.4vw, 22px); letter-spacing: -.02em; }

.lede { font-size: 15px; line-height: 1.55; color: rgba(var(--ink-rgb), .70); }
.small { font-size: 12.5px; color: var(--muted); }

.dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .25 } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- fond : grille technique discrète, sans halo ---------- */

.wire {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), .030) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), .030) 1px, transparent 1px);
  background-size: 74px 74px;
}

/* ---------- layout ---------- */

.wrap { width: 100%; max-width: 920px; margin-inline: auto; padding-inline: var(--pad); }
section { padding-block: clamp(44px, 9vw, 76px); }

.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.sec-head .num {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: var(--muted-2); white-space: nowrap;
}
@media (max-width: 480px) { .sec-head { flex-direction: column; align-items: flex-start; gap: 7px; } }

/* ---------- surface : plate, filet 1px ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

/* ===========================================================
   HERO — le showreel n'est jamais recadré
   =========================================================== */

.hero { border-bottom: 1px solid var(--line); }

.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px var(--pad) 16px;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-name { font-size: 11.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }

.hero-media {
  display: block; border: 0; padding: 0; text-align: left;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-block: 1px solid var(--line);
}
.hero-media video, .hero-media img {
  width: 100%; height: 100%;
  object-fit: contain;            /* image entière, aucun zoom, aucun recadrage */
}

.hero-txt { padding: 28px var(--pad) 34px; }
.hero-txt h1 { margin-bottom: 12px; }
.hero-txt .lede { max-width: 36ch; }

.sound {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 2px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.sound svg { width: 13px; height: 13px; flex: none; }

/* ===========================================================
   CARTE
   =========================================================== */

.card-stage { perspective: 1200px; }

.card3d {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 22px 20px;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease);
  will-change: transform;
}
.card-idle { animation: float 8s ease-in-out infinite; }
@keyframes float {
  0%, 100% { --rx: 1.1deg;  --ry: -1.8deg; }
  50%      { --rx: -1deg;   --ry: 1.9deg;  }
}
@property --rx { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --ry { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

.card-grid { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: start; }
.card-id { min-width: 0; }
.card-name { font-size: clamp(22px, 6.2vw, 28px); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.card-role {
  margin-top: 7px;
  font-size: 14px; letter-spacing: -.01em;
  color: rgba(var(--ink-rgb), .74); font-weight: 500;
}
.card-role.sub { margin-top: 2px; font-size: 13px; color: var(--muted-2); }
.card-sep { height: 1px; background: var(--line); margin: 15px 0 13px; }
.card-lines { display: grid; gap: 9px; }
.card-line { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); min-width: 0; padding-block: 2px; }
.card-line svg { width: 15px; height: 15px; flex: none; color: var(--accent); }
.card-line span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.qr { width: 78px; }
.qr img { width: 100%; border-radius: 2px; }
.qr-cap {
  margin-top: 6px; font-size: 9.5px;
  color: var(--muted-2); text-align: center;
}

/* ===========================================================
   BOUTONS
   =========================================================== */

.actions { display: grid; gap: 8px; margin-top: 16px; }
@media (min-width: 560px) { .actions { grid-template-columns: 1fr 1fr; } .actions .btn-wa { grid-column: 1 / -1; } }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 18px;
  border-radius: var(--r);
  font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid var(--line-2);
  background: var(--surface);
  transition: background .18s, border-color .18s, transform .15s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: scale(.99); }

.btn-wa { border-color: rgba(37,211,102,.34); background: rgba(37,211,102,.07); }
.btn-wa svg { color: #25D366; }

.btn-accent { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--surface-2); border-color: var(--line-2); }
  .btn-wa:hover { background: rgba(37,211,102,.13); }
  .btn-accent:hover { background: #C2381F; border-color: #C2381F; }
}

/* ===========================================================
   STATS
   =========================================================== */

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}


.stat { padding: 18px 13px; background: var(--surface); border-right: 1px solid var(--line); }
.stats .stat:last-child { border-right: 0; }
.stat-num { white-space: nowrap; }
.stat-num {
  font-size: clamp(23px, 6.6vw, 30px); font-weight: 700;
  letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums;
}
.stat-lab {
  margin-top: 8px; font-size: 9px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 600;
}
.live {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 9px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600;
}
.live[data-state="stale"] .dot { animation: none; background: var(--muted-2); }

/* ===========================================================
   LOGOS CLIENTS
   =========================================================== */

.marquee {
  position: relative; overflow: hidden;
  padding-block: 22px;
  border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; align-items: center; width: max-content; animation: slide 20s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee-item {
  display: flex; align-items: center; justify-content: center;
  padding-inline: 22px; flex: none;
}
.marquee-item img {
  height: 22px; width: auto;
  max-width: 132px; object-fit: contain;
  opacity: .5;
  transition: opacity .25s;
}
@media (min-width: 700px) { .marquee-item { padding-inline: 30px; } .marquee-item img { height: 26px; max-width: 170px; } }
@media (hover: hover) and (pointer: fine) { .marquee-item:hover img { opacity: .9; } }

/* ===========================================================
   VIGNETTES PROJETS
   =========================================================== */

.tiles { display: grid; gap: 10px; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }

.tile {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  transition: border-color .22s;
}
.tile-media { position: relative; background: #0A0A0B; aspect-ratio: 4 / 5; overflow: hidden; }
.tile-media video, .tile-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s; }
.tile-media img { position: absolute; inset: 0; z-index: 1; }
.tile-media.is-playing img { opacity: 0; }
.tile-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, transparent 45%, rgba(10,10,11,.88));
  pointer-events: none;
}
.tile-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 13px 14px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.tile-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }
.tile-sub {
  font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; margin-top: 4px;
}
.tile-stat {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .02em;
  color: var(--ink); white-space: nowrap;
  padding: 4px 7px; border: 1px solid var(--line-2);
  background: rgba(10,10,11,.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.tile-dur {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  font-family: var(--mono); font-size: 9.5px;
  color: var(--ink);
  padding: 3px 6px;
  background: rgba(10,10,11,.62);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
@media (hover: hover) and (pointer: fine) { .tile:hover { border-color: var(--line-2); } }

/* ===========================================================
   LECTEUR — contrôles maison, natifs masqués
   =========================================================== */

.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: none; place-items: center;
  padding: 16px;
  background: rgba(6,6,7,.96);
}
.lightbox.is-open { display: grid; }
.lightbox-inner {
  position: relative;
  width: min(100%, 760px);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  overflow: hidden;
  background: #000;
}
.lightbox video {
  width: 100%; max-height: 78svh; object-fit: contain; background: #000;
  display: block;
}
/* plusieurs plans côte à côte, sur une seule ligne */
.lightbox-stage { position: relative; background: #000; }
.lightbox-stage.is-multi { display: flex; gap: 2px; align-items: stretch; }
.lightbox-stage.is-multi video {
  flex: 1 1 0;
  width: 0;                /* sans ça, chaque vidéo réclame 100 % et déborde */
  min-width: 0;
  max-height: 68svh;
  object-fit: cover;
}

/* voile de chargement */
.lightbox-load {
  position: absolute; inset: 0; z-index: 4;
  display: none; place-items: center;
  background: rgba(6,6,7,.6);
}
.lightbox-stage.is-loading .lightbox-load { display: grid; }
.spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(var(--ink-rgb), .22);
  border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* plein écran natif : le lecteur doit rester visible par-dessus */
.lightbox-inner:fullscreen { width: 100%; display: flex; flex-direction: column; justify-content: center; background: #000; }
.lightbox-inner:fullscreen .lightbox-stage.is-multi video,
.lightbox-inner:fullscreen video { max-height: calc(100vh - 52px); }
.lightbox video::-webkit-media-controls { display: none !important; }

/* barre de titre : au-dessus de l'image, jamais par-dessus */
.lightbox-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 13px 13px 13px 15px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.lightbox-cap { min-width: 0; }
.lightbox-cap .tile-title { font-size: 16px; }

.lightbox-close {
  flex: none;
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--line-2);
  color: var(--ink);
}
.lightbox-close svg { width: 14px; height: 14px; }

/* barre de lecture */
.player {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.player button {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  color: var(--ink);
}
.player button svg { width: 15px; height: 15px; }
.player-bar {
  flex: 1; height: 20px;
  display: flex; align-items: center;
  cursor: pointer; touch-action: none;
}
.player-bar-track { width: 100%; height: 2px; background: rgba(var(--ink-rgb), .18); position: relative; }
.player-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--accent); }
.player-time {
  font-family: var(--mono); font-size: 10px; letter-spacing: .02em;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ===========================================================
   FORMULAIRE
   =========================================================== */

.form { display: grid; gap: 11px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.field input, .field textarea, .field select {
  width: 100%; padding: 14px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--ink);
  transition: border-color .18s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 124px; resize: vertical; line-height: 1.5; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23F2F0EC' stroke-width='1.6'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 11px;
  padding-right: 36px;
}
.field select option { background: #101012; color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: rgba(var(--ink-rgb), .26); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: none; }
.honey { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-status { font-size: 13px; min-height: 20px; color: var(--muted); }
.form-status.ok  { color: #25D366; }
.form-status.err { color: var(--accent); }
.is-sending .btn-accent { opacity: .55; pointer-events: none; }

/* ===========================================================
   LIGNES CONTACT
   =========================================================== */

.rows { display: grid; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .18s, background .18s;
}
.row-ico {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--accent);
}
.row-ico svg { width: 15px; height: 15px; }
.row-txt { min-width: 0; flex: 1; display: block; }
.row-lab { display: block; font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; }
.row-val { display: block; font-size: 14.5px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-go { color: var(--muted-2); flex: none; }
.row-go svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  .row:hover { border-color: var(--line-2); background: var(--surface-2); }
  .row:hover .row-go { color: var(--accent); }
}

/* ===========================================================
   DOCK
   =========================================================== */

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(10,10,11,.9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
}
.dock a {
  display: grid; place-items: center; gap: 4px; align-content: center;
  font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  color: var(--muted-2); transition: color .2s;
  -webkit-tap-highlight-color: transparent;
}
.dock a svg { width: 18px; height: 18px; }
.dock a[aria-current="page"] { color: var(--ink); }
.dock a[aria-current="page"] svg { color: var(--accent); }

/* ---------- en-tête sous-pages ---------- */

.phead { padding: 24px var(--pad) 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 9.5px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.back svg { width: 13px; height: 13px; }

/* ---------- pied ---------- */

.foot { padding: 30px var(--pad) 38px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  font-size: 12px; font-weight: 600;
  transition: border-color .18s;
}
.social svg { width: 14px; height: 14px; }
.social .n { color: var(--muted-2); font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .social:hover { border-color: var(--line-2); } }
.foot-end { font-size: 11px; color: var(--muted-2); line-height: 1.6; }

.reveal { opacity: 1; }   /* plus d'opacité 0 : le contenu est visible même si le JS ne tourne pas */

.hero-cue {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  color: var(--ink);
  padding: 6px 10px;
  background: rgba(10,10,11,.66);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
