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

:root {
  --bg:         #EDEEF8;
  /* Accent piloté par la jauge de couleur (hue dynamique) — voir script.js */
  --blue-rgb:       155, 170, 239;
  --blue-mid-rgb:   122, 143, 224;
  --blue-deep-rgb:  80, 96, 192;
  --blue:       rgb(var(--blue-rgb));
  --blue-lt:    rgba(var(--blue-rgb), 0.18);
  --blue-mid:   rgb(var(--blue-mid-rgb));
  --blue-deep:  rgb(var(--blue-deep-rgb));
  --text:       #1A1C2E;
  --muted:      #6872A0;
  --dark:       #0D1026;
  --green:      #22C55E;
  --radius:     20px;
  --radius-sm:  12px;
  --gap:        12px;
  --glass-blur: blur(10px) saturate(140%);
  --border:     rgba(255, 255, 255, 0.72);
}

/* ─── BODY ──────────────────────────────────────────────────── */

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 9998;
}

/* ─── FOND TECH (grille + points, statique, teinté accent) ──── */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(var(--blue-deep-rgb), 0.16) 1px, transparent 1.4px),
    linear-gradient(90deg, rgba(var(--blue-rgb), 0.08) 1px, transparent 1px),
    linear-gradient(rgba(var(--blue-rgb), 0.08) 1px, transparent 1px);
  background-size:
    32px 32px,
    96px 96px,
    96px 96px;
}

/* Mode focus : viewer vidéo ouvert → on gèle les animations de l'arrière-plan */
body.viewer-open .window *,
body.viewer-open .chat-widget *,
body.viewer-open .hue-rail * {
  animation-play-state: paused !important;
}

/* ─── FENÊTRE ───────────────────────────────────────────────── */

.window {
  position: relative;
  z-index: 1;
  width: calc(100vw - 52px);
  height: calc(100vh - 52px);
  max-width: 1380px;
  max-height: 860px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 40px 100px rgba(var(--blue-rgb), 0.18),
    0 8px 28px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
  transition:
    width 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    max-height 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease,
    transform 0.3s ease;
}

.window.win-maximized {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
}

.window.win-closed {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.window.win-minimized {
  cursor: pointer;
  overflow: hidden;
}
.window.win-minimized .bento-grid,
.window.win-minimized .titlebar-socials {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

/* ── Restore pill (état closed) */
.win-restore {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  opacity: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #12132A;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 200;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.win-restore.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ─── TITLEBAR ──────────────────────────────────────────────── */

.window-titlebar {
  height: 42px;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.45);
  border-bottom: 1px solid rgba(var(--blue-rgb), 0.12);
  display: flex;
  align-items: center;
  padding: 0 16px;
  user-select: none;
  cursor: grab;
}

body.win-dragging,
body.win-dragging * { cursor: grabbing !important; }

.traffic-lights { display: flex; gap: 7px; align-items: center; }

.tl {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transform: translateZ(0);
  transition: filter 0.15s ease;
}
.tl:hover { filter: brightness(0.85); }


.tl-red    { background: #FF5F57; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.1); }
.tl-yellow { background: #FEBC2E; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.1); }
.tl-green  { background: #28C840; box-shadow: 0 0 0 0.5px rgba(0,0,0,0.1); }

.window-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.titlebar-socials {
  display: flex;
  gap: 10px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  color: var(--muted);
  opacity: 0.4;
  transition: opacity 0.2s;
  text-decoration: none;
}

.social-link:hover { opacity: 0.85; }

.social-link svg { width: 13px; height: 13px; }

/* ─── GRID ─────────────────────────────────────────────────── */

.bento-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr 1fr;
  grid-template-rows: repeat(6, 1fr);
  grid-template-areas:
    "profile  portfolio  portfolio  skills    experience"
    "profile  portfolio  portfolio  skills    experience"
    "profile  portfolio  portfolio  connect   experience"
    "profile  portfolio  portfolio  connect   experience"
    "hero     stats      stats      tools     experience"
    "hero     stats      stats      tools     music";
  gap: var(--gap);
  padding: 14px;
}

/* ─── BASE CARD — LIQUID GLASS ──────────────────────────────── */

.card {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow:
    0 2px 24px rgba(var(--blue-rgb), 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(var(--blue-rgb), 0.06);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  position: relative;
  opacity: 0;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.38) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

.card > * { position: relative; z-index: 1; }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(22px) scale(0.965); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);     filter: blur(0);   }
}
.card.card-visible { animation: cardReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.card.card-entered { opacity: 1; }

/* Accessibilité : pas d'animation d'entrée si l'utilisateur la refuse */
@media (prefers-reduced-motion: reduce) {
  .card { opacity: 1; }
  .card.card-visible { animation: none; }
}

/* ─── SHARED ────────────────────────────────────────────────── */

.section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--blue-mid);
  margin-bottom: 10px;
}

.divider {
  height: 1px;
  background: rgba(var(--blue-rgb), 0.15);
  margin: 10px 0;
}

.tags-wrap { display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  font-size: 10px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--blue-lt);
  color: var(--blue-deep);
  border: 1px solid rgba(var(--blue-rgb), 0.22);
}

/* ─── 1. PROFILE CARD ───────────────────────────────────────── */

.card-profile {
  grid-area: profile;
  background: var(--blue-deep);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  padding: 0;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 8px 40px rgba(var(--blue-deep-rgb), 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  /* fond opaque → pas de backdrop-filter (invisible + coûteux par frame) */
}

.card-profile::before {
  background: none;
}

.profile-photo {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.avatar {
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, 0.38);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  display: block;
  /* grade léger pour calmer les verts et raccorder à la DA */
  filter: contrast(1.05) saturate(0.9) brightness(1.02);
}

/* tint accent (soft-light) — suit le sélecteur de couleur */
.profile-photo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg,
    rgba(var(--blue-rgb), 0.45),
    rgba(var(--blue-deep-rgb), 0.55));
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* scrim bas — lisibilité du badge BPM */
.profile-photo::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg,
    transparent 60%,
    rgba(var(--blue-deep-rgb), 0.3) 100%);
  pointer-events: none;
}

/* Overlay bas : BPM à gauche, statut ferré à droite */
.photo-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Statut de vie — discret, ferré à droite */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  text-align: right;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
  animation: pulse 2s ease-in-out infinite;
}

/* BPM — badge flottant blanc */
.bpm-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 9px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.bpm-badge .bpm-heart {
  width: 16px;
  height: 16px;
  fill: var(--blue-mid);
}

.bpm-badge-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--blue-deep);
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}

.bpm-badge-unit {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.profile-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 0 0 auto;
}

.name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: white;
  line-height: 0.95;
  letter-spacing: 0.03em;
}

.role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.58);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.location {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.btn-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue-deep);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.5);
  margin-top: auto;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ─── 2. HERO CARD ──────────────────────────────────────────── */

.card-hero {
  grid-area: hero;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(var(--blue-rgb),0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

.hero-body { display: flex; flex-direction: column; gap: 10px; }

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(22px, 1.9vw, 30px);
  line-height: 1.06;
  color: var(--text);
  letter-spacing: 0.02em;
}

.hero-title em {
  font-style: normal;
  color: var(--blue-mid);
}

.hero-sub {
  font-size: 13px;
  color: var(--muted);
}

.hero-cv {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--blue-deep);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 1;
  transition: background-color 0.2s ease;
}

/* hover style shadcn : assombrit légèrement le fond (≈ bg-primary/90), pas de lift */
.hero-cv:hover {
  background: rgba(var(--blue-deep-rgb), 0.9);
}

.hero-cv svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* petite barre de séparation icône / texte */
.hero-cv-sep {
  width: 1px;
  height: 15px;
  background: rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

/* ─── 3. EXPERIENCE CARD ────────────────────────────────────── */

.card-experience {
  grid-area: experience;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none;
}
.card-experience::-webkit-scrollbar { display: none; }

.timeline { display: flex; flex-direction: column; gap: 9px; }
.tl-item { display: flex; gap: 10px; align-items: flex-start; }

.tl-date {
  font-size: 9px;
  font-weight: 700;
  color: var(--blue);
  min-width: 42px;
  padding-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tl-body { display: flex; flex-direction: column; gap: 1px; }
.tl-body strong { font-size: 12px; font-weight: 600; color: var(--text); }
.tl-body span   { font-size: 11px; color: var(--muted); }
.tl-body em     { font-style: italic; font-size: 10px; color: var(--muted); opacity: 0.7; }

.tl-company { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: block; }

.tl-roles {
  --tl-pad: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: var(--tl-pad);
  border-left: 2px solid rgba(var(--blue-rgb), 0.25);
}

.tl-role {
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: relative;
}

.tl-role::before {
  content: '';
  position: absolute;
  /* centré sur la ligne verticale : -(padding + bordure/2 + rayon du dot) */
  left: calc(-1 * var(--tl-pad) - 3.5px);
  top: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue);
  border: 1.5px solid var(--bg);
}

.tl-role-date {
  font-size: 9px;
  font-weight: 700;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tl-role-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}

.tl-role span:last-child {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ─── 4. ABOUT CARD (hidden desktop → chat widget) ──────────── */

.card-about {
  grid-area: about;
  background: rgba(var(--blue-rgb), 0.15);
  border-color: rgba(var(--blue-rgb), 0.2);
  display: none;
  align-items: center;
}

.about-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--blue-deep);
}

/* ─── 5. SKILLS CARD ────────────────────────────────────────── */

.card-skills { grid-area: skills; }

.skill-list { display: flex; flex-direction: column; gap: 8px; }
.skill-item { display: flex; flex-direction: column; gap: 4px; }

.skill-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.skill-pct { font-weight: 600; color: var(--blue-mid); }

.skill-track {
  height: 5px;
  background: var(--blue-lt);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: var(--blue-mid);
  border-radius: 3px;
  transition: width 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── 6. STATS CARD ─────────────────────────────────────────── */

.card-stats {
  grid-area: stats;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 10px;
  padding: 20px;
}

.brands-block {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.stats-kpis {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.stat {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  color: var(--blue-mid);
  line-height: 1;
  letter-spacing: 0.03em;
}

.stat-lbl {
  font-size: 10px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1.25;
}

.stat-sep {
  width: 1px;
  height: 44px;
  background: rgba(var(--blue-rgb), 0.2);
  flex-shrink: 0;
}

.stat-bpm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bpm-heart {
  width: 26px;
  height: 26px;
  fill: var(--blue-mid);
  transform-origin: center;
  animation: heartbeat var(--bpm-dur, 0.83s) ease-in-out infinite;
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  14%  { transform: scale(1.24); }
  28%  { transform: scale(1); }
  42%  { transform: scale(1.13); }
  60%  { transform: scale(1); }
  100% { transform: scale(1); }
}

/* ─── BRAND WALL (carousel de logos) ────────────────────────── */

.brands-head { text-align: center; transform: translateY(-21px); }

.brands-eyebrow {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.7;
}

.brands {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.brands-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  /* avance "coup par coup" pilotée en JS (transition appliquée à chaque pas) */
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.brands-track img {
  /* hauteur normalisée + correction optique par logo (--s) → présence visuelle homogène */
  height: calc(20px * var(--s, 1));
  width: auto;
  object-fit: contain;
  /* nuance de gris uniforme, quelles que soient les couleurs source */
  filter: brightness(0) invert(0.62);
  opacity: 0.9;
}

/* ─── DISPONIBILITÉ (dot, partagé chat) ─────────────────────── */

.avail-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

/* ─── HUE RAIL (accent dynamique — sticky bord gauche) ──────── */

.hue-rail {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 13px 9px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 30px rgba(var(--blue-deep-rgb), 0.18);
}

.hue-gauge-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(var(--blue-rgb), 0.18);
  transition: background 0.05s linear;
  flex-shrink: 0;
}

.hue-slider {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 10px;
  height: 150px;
  border-radius: 20px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to top,
    hsl(0,70%,72%), hsl(45,70%,72%), hsl(90,70%,72%), hsl(135,70%,72%),
    hsl(180,70%,72%), hsl(225,70%,72%), hsl(270,70%,72%), hsl(315,70%,72%), hsl(360,70%,72%)
  );
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

.hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: grab;
  transition: transform 0.12s ease, border-color 0.05s linear;
}
.hue-slider::-webkit-slider-thumb:active { transform: scale(1.15); cursor: grabbing; }

.hue-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: grab;
}

/* ─── SHOWREEL CARD ─────────────────────────────────────────── */

.card-showreel {
  grid-area: connect;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* fond statique, teinté accent — aucune vidéo (perf) */
  background:
    radial-gradient(120% 110% at 18% 0%, rgba(var(--blue-deep-rgb), 0.6), transparent 58%),
    radial-gradient(100% 100% at 100% 100%, rgba(var(--blue-rgb), 0.38), transparent 55%),
    linear-gradient(160deg, #15183c 0%, #0a0c1f 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card-showreel::before { display: none; }

/* grille tech faible, fondue vers les bords */
.showreel-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.10) 1px, transparent 1.4px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.showreel-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.showreel-play {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #fff;
  transition: transform 0.25s ease, background 0.25s ease;
}
.showreel-play svg { width: 15px; height: 15px; margin-left: 2px; }

/* anneaux qui pulsent — invite au clic, induit la vidéo */
.showreel-play-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: showreelPing 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.showreel-play-ring--2 { animation-delay: 1.3s; }

@keyframes showreelPing {
  0%   { transform: scale(1);   opacity: 0.7; }
  70%  { opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.card-showreel:hover .showreel-play {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.24);
}

.showreel-word {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(30px, 4.2vw, 46px);
  line-height: 1;
  letter-spacing: 0.2em;
  text-indent: 0.2em; /* compense le letter-spacing pour un vrai centrage optique */
  color: #fff;
}

.showreel-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

/* ─── SHOWREEL LIGHTBOX ─────────────────────────────────────── */

.showreel-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(8, 9, 20, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.showreel-lightbox.open { opacity: 1; pointer-events: auto; }

.showreel-lightbox-frame {
  width: min(1100px, 92vw);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
  transform: scale(0.94);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}
.showreel-lightbox.open .showreel-lightbox-frame { transform: scale(1); }

.showreel-lightbox-frame video,
.showreel-lightbox-frame iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  display: block;
}

.showreel-lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.showreel-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

/* ─── HELLOBAR (en chantier) ────────────────────────────────── */

.hellobar {
  position: fixed;
  top: 13px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 15px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--blue-mid), var(--blue-deep));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 8px 28px rgba(var(--blue-deep-rgb), 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  animation: hellobarIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

@keyframes hellobarIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-18px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.hellobar.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-18px);
  pointer-events: none;
  animation: none; /* sinon le fill-mode "both" de hellobarIn écrase opacity/transform */
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hellobar-text { display: inline-flex; align-items: center; gap: 7px; }

.hellobar-close {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.hellobar-close:hover { background: rgba(255, 255, 255, 0.34); }

/* ─── 8. PORTFOLIO CARD ─────────────────────────────────────── */

.card-portfolio {
  grid-area: portfolio;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.card-portfolio::before { display: none; }

.card-portfolio > .project-thumb {
  position: absolute !important;
  inset: 0;
  z-index: 0 !important;
  border-radius: inherit;
  overflow: hidden;
  width: auto;
  min-width: auto;
}

.pw-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.52s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.pw-carousel-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.card-portfolio > .project-thumb::before {
  display: none;
}

.card-portfolio > .project-thumb::after { display: none; }

.portfolio-project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62%;
  max-width: 170px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.88;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.portfolio-all-link {
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 8px 16px;
  border-radius: 20px;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.portfolio-all-link:hover {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.48);
}

.portfolio-bottom {
  position: absolute;
  bottom: 36px; left: 20px; right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.pdots {
  position: absolute;
  bottom: 16px; left: 20px;
  display: flex;
  gap: 5px;
  align-items: center;
  z-index: 2;
}

.pdot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.pdot.active {
  width: 18px;
  border-radius: 3px;
  background: white;
}

.parrows { display: flex; gap: 6px; }

.parrow {
  width: 32px; height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.parrow:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

/* ─── 9. TOOLS CARD ─────────────────────────────────────────── */

.card-tools {
  grid-area: tools;
  display: flex;
  flex-direction: column;
}

.tools-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

/* Icônes dimensionnées par la hauteur de ligne pour toujours tenir
   dans la carte (2 lignes du bento) sans déborder sur le label « Outils ». */
.tool-icon {
  aspect-ratio: 1;
  height: 100%;
  width: auto;
  max-width: 100%;
  justify-self: center;
}

.tool-icon {
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-lt);
  border: 1px solid rgba(var(--blue-rgb), 0.2);
  color: var(--blue-mid);
  box-shadow: 0 1px 4px rgba(var(--blue-rgb),0.1), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  cursor: default;
}

.tool-icon svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.tool-icon:hover {
  background: var(--blue-mid);
  color: white;
  border-color: transparent;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(var(--blue-mid-rgb),0.35);
}

/* ─── 10. MUSIC CARD ────────────────────────────────────────── */

.card-music {
  grid-area: music;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
}

.music-cover {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.music-eyebrow {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.65;
}

.music-row  { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.music-info { display: flex; flex-direction: row; align-items: center; gap: 9px; min-width: 0; }

.music-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  font-size: 10px;
  color: var(--muted);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  flex-shrink: 0;
}

.music-bars span {
  display: block;
  width: 2px;
  background: rgba(var(--blue-mid-rgb), 0.6);
  border-radius: 2px;
  animation: bar 1s ease-in-out infinite;
}

.music-bars span:nth-child(1) { animation-delay: 0.0s; }
.music-bars span:nth-child(2) { animation-delay: 0.15s; }
.music-bars span:nth-child(3) { animation-delay: 0.3s; }
.music-bars span:nth-child(4) { animation-delay: 0.1s; }
.music-bars span:nth-child(5) { animation-delay: 0.4s; }
.music-bars span:nth-child(6) { animation-delay: 0.2s; }

@keyframes bar {
  0%, 100% { height: 3px; }
  50%       { height: 12px; }
}

/* ─── CHAT WIDGET ───────────────────────────────────────────── */

.chat-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-displaced-msg {
  position: absolute;
  bottom: 74px;
  right: 0;
  background: #fff;
  color: #12132A;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7) translateY(6px);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat-widget.displaced .chat-displaced-msg {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition-delay: 0.35s;
}
.chat-widget.displaced .chat-nudge { display: none; }

.chat-nudge {
  position: absolute;
  bottom: 74px;
  right: 0;
  background: #fff;
  color: #12132A;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.7) translateY(6px);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.chat-nudge.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.chat-toggle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--blue-deep);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(var(--blue-deep-rgb), 0.45), 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
}

.memoji-video {
  width: 110%;
  height: 110%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  position: relative;
  left: -3px;
}

.chat-toggle::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--blue-deep); /* suit l'accent du hue slider */
  z-index: -1;
  animation: chat-ping 2.2s ease-out infinite;
}

@keyframes chat-ping {
  0%   { transform: scale(1);   opacity: 0.55; }
  100% { transform: scale(2);   opacity: 0; }
}

.chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(var(--blue-deep-rgb), 0.6);
}

.chat-panel {
  width: 288px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 20px 60px rgba(var(--blue-deep-rgb), 0.2),
    0 4px 16px rgba(0,0,0,0.08);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.88) translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}

.chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--blue-deep);
}

.chat-avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  overflow: hidden;
  flex-shrink: 0;
}

.chat-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-name { font-size: 13px; font-weight: 600; color: white; }

.chat-online {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}
.chat-close:hover { color: white; background: rgba(255,255,255,0.15); }

.chat-messages {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  background: var(--blue-deep);
  color: white;
  font-size: 12.5px;
  line-height: 1.6;
  padding: 13px 16px;
  border-radius: 16px 16px 16px 4px;
  max-width: 92%;
  align-self: flex-start;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-panel.open .bubble           { opacity: 1; transform: translateY(0); }
.chat-panel.open .bubble:nth-child(2) { transition-delay: 0.14s; }

/* ─── MOBILE ─────────────────────────────────────────────────── */

/* ─── PROJECT WINDOWS ────────────────────────────────────────── */

.card-portfolio { cursor: pointer; }

.project-win {
  position: fixed;
  z-index: 50;
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  pointer-events: none;
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    0 60px 160px rgba(0, 0, 0, 0.22),
    0 16px 48px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  overflow: hidden;
  transition:
    opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.44s cubic-bezier(0.34, 1.56, 0.64, 1),
    top 0.44s cubic-bezier(0.4, 0, 0.2, 1),
    left 0.44s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.44s cubic-bezier(0.4, 0, 0.2, 1),
    height 0.44s cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 0.44s ease;
}

/* Grain overlay */
.project-win::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: 0.055;
  pointer-events: none;
  z-index: 1000;
  border-radius: inherit;
}

.project-win.pw-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

/* Hide body content when minimized */
.project-win.pw-minimized .pw-body { opacity: 0; pointer-events: none; }
.project-win.pw-minimized .pw-rh   { display: none; }

.project-win.pw-maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
}

/* Titlebar */
.pw-titlebar {
  height: 42px;
  min-height: 42px;
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  padding: 0 16px;
  user-select: none;
  cursor: grab;
  flex-shrink: 0;
  position: relative;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.pw-title-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 140px);
  pointer-events: none;
  letter-spacing: 0.01em;
}

/* ── Multi-edge resize handles */
.pw-rh {
  position: absolute;
  z-index: 11;
}

.pw-rh[data-dir="n"]  { top: -3px; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.pw-rh[data-dir="s"]  { bottom: -3px; left: 12px; right: 12px; height: 6px; cursor: ns-resize; }
.pw-rh[data-dir="w"]  { left: -3px; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.pw-rh[data-dir="e"]  { right: -3px; top: 12px; bottom: 12px; width: 6px; cursor: ew-resize; }
.pw-rh[data-dir="nw"] { top: 0; left: 0; width: 14px; height: 14px; cursor: nwse-resize; }
.pw-rh[data-dir="ne"] { top: 0; right: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.pw-rh[data-dir="sw"] { bottom: 0; left: 0; width: 14px; height: 14px; cursor: nesw-resize; }
.pw-rh[data-dir="se"] { bottom: 0; right: 0; width: 14px; height: 14px; cursor: nwse-resize; }

.project-win.pw-resizing { transition: none !important; }
body.pw-resizing * { user-select: none !important; }
body[data-resize-dir="n"] *, body[data-resize-dir="s"] * { cursor: ns-resize !important; }
body[data-resize-dir="e"] *, body[data-resize-dir="w"] * { cursor: ew-resize !important; }
body[data-resize-dir="ne"] *, body[data-resize-dir="sw"] * { cursor: nesw-resize !important; }
body[data-resize-dir="nw"] *, body[data-resize-dir="se"] * { cursor: nwse-resize !important; }

/* ── Window body — scroll container for sticky sidebar pattern */
/* ── Body = direct 2-col grid, clips overflow */
.pw-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 220px;
  overflow: hidden;
}

/* ── Main scroll column */
.pw-main {
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 100px;
}

.pw-main::-webkit-scrollbar { width: 4px; }
.pw-main::-webkit-scrollbar-track { background: transparent; }
.pw-main::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

/* ── Intro strip */
.pw-ed-intro {
  padding: 34px 40px 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 4px;
}

.pw-cat-tag {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.26);
  margin-bottom: 8px;
}

.pw-lead {
  font-size: 13px;
  line-height: 1.72;
  color: rgba(0,0,0,0.42);
  max-width: 440px;
}

/* ── Image groups — centered column, no distortion */
.pw-group {
  padding: 20px 28px 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pw-imgwrap {
  width: 100%;
  max-width: 820px;
  position: relative;
}

.pw-imgwrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.09;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.pw-group-2col .pw-imgwrap,
.pw-group-3col .pw-imgwrap {
  max-width: none;
  flex: 1;
  min-width: 0;
}

.pw-float-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.pw-float-img-zoom {
  height: 340px;
  object-fit: cover;
  object-position: center 25%;
}


/* ── Context block below images */
.pw-context-block {
  padding: 20px 28px 8px;
  text-align: center;
}

.pw-context-block p {
  font-size: 14px;
  line-height: 1.78;
  color: rgba(0,0,0,0.82);
  font-weight: 600;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Closing — Trexa-style: rule + avatar + name + CTA */
.pw-closing {
  margin: 24px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.pw-closing-rule {
  width: 100%;
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.pw-closing-rule::before,
.pw-closing-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,0,0,0.09);
}

.pw-author-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #ddd url('assets/profile.webp') center / cover no-repeat;
  margin: 0 22px;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
}

.pw-closing-name {
  font-size: 15px;
  font-weight: 700;
  color: #0a0a0a;
  display: block;
  letter-spacing: -0.01em;
}

.pw-closing-role {
  font-size: 12px;
  color: rgba(0,0,0,0.42);
  margin-bottom: 4px;
}

.pw-closing-collab {
  font-size: 11px;
  color: rgba(0,0,0,0.32);
  margin-bottom: 8px;
}

.pw-closing-collab a {
  color: rgba(0,0,0,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.pw-closing-collab a:hover { color: #0a0a0a; }

.pw-cta {
  display: inline-flex;
  align-items: center;
  padding: 11px 28px;
  background: #0a0a0a;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 28px;
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: background 0.22s, transform 0.22s;
}

.pw-cta:hover { background: #2a2a2a; transform: translateY(-1.5px); }

/* ── Lien « Voir le site » dans la sticky bar (host cliquable) */
.pw-aside-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(var(--blue-rgb), 1);
  text-decoration: none;
  transition: color 0.18s, opacity 0.18s;
}

.pw-aside-link svg { flex: none; opacity: 0.85; }

.pw-aside-link:hover { color: rgba(var(--blue-deep-rgb), 1); }

/* ── Sidebar — full height flex column */
.pw-aside {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0,0,0,0.06);
  background: #F7F7F9;
  overflow: hidden;
}

/* Top: project identity */
.pw-aside-top {
  flex: 1;
  padding: 34px 22px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pw-aside-logo {
  display: block;
  width: 80px;
  height: auto;
  margin-bottom: 22px;
  opacity: 0.7;
  filter: grayscale(1);
}

.pw-aside-proj-lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.2);
  margin-bottom: 14px;
}

.pw-aside-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  line-height: 0.92;
  color: #0a0a0a;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.pw-aside-cat {
  font-size: 10.5px;
  color: rgba(0,0,0,0.32);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 14px;
}

.pw-aside-ctx {
  font-size: 11.5px;
  line-height: 1.72;
  color: rgba(0,0,0,0.38);
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 9;
  -webkit-box-orient: vertical;
}

/* Bottom: specs + tags */
.pw-aside-bottom {
  padding: 16px 22px 22px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.pw-specs { display: flex; flex-direction: column; margin-bottom: 14px; }

.pw-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  gap: 6px;
}

.pw-spec-row:first-child { border-top: 1px solid rgba(0,0,0,0.05); }

.pw-spec-row dt {
  font-size: 10.5px;
  color: rgba(0,0,0,0.28);
  font-weight: 500;
  flex-shrink: 0;
}

.pw-spec-row dd {
  font-size: 10.5px;
  color: rgba(0,0,0,0.68);
  font-weight: 500;
  text-align: right;
  list-style: none;
}

.pw-aside-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* ── Tags */
.pw-tag {
  font-size: 10px;
  font-weight: 500;
  color: rgba(0,0,0,0.38);
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 20px;
  padding: 4px 10px;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.pw-tag:hover { background: #0a0a0a; color: #fff; border-color: #0a0a0a; cursor: default; }

/* ── Scroll reveal */
.pw-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transition-delay: var(--rv-delay, 0s);
}

.pw-reveal.pw-in-view { opacity: 1; transform: translateY(0); }

/* ── Sidebar entrance (triggered when window gets pw-open) */
@keyframes pw-fadein {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pw-open .pw-aside-logo      { animation: pw-fadein 0.5s ease 0.20s both; }
.pw-open .pw-aside-proj-lbl { animation: pw-fadein 0.5s ease 0.28s both; }
.pw-open .pw-aside-title     { animation: pw-fadein 0.5s ease 0.36s both; }
.pw-open .pw-aside-cat       { animation: pw-fadein 0.5s ease 0.42s both; }
.pw-open .pw-spec-row:nth-child(1) { animation: pw-fadein 0.4s ease 0.48s both; }
.pw-open .pw-spec-row:nth-child(2) { animation: pw-fadein 0.4s ease 0.54s both; }
.pw-open .pw-spec-row:nth-child(3) { animation: pw-fadein 0.4s ease 0.60s both; }
.pw-open .pw-spec-row:nth-child(4) { animation: pw-fadein 0.4s ease 0.66s both; }
.pw-open .pw-aside-tags .pw-tag    { animation: pw-fadein 0.4s ease 0.72s both; }

/* ─── PROJECTS MOSAIC ────────────────────────────────────────── */

.pw-mosaic {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pw-mosaic.pw-mosaic-open {
  pointer-events: auto;
}

.pw-mosaic-bg {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 18, 0);
  backdrop-filter: blur(0px) saturate(140%);
  -webkit-backdrop-filter: blur(0px) saturate(140%);
  transition:
    background 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    -webkit-backdrop-filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pw-mosaic-open .pw-mosaic-bg {
  background: rgba(8, 8, 18, 0.72);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
}

/* Closing — inner + cards fade out upward */
.pw-mosaic-closing .pw-mosaic-inner {
  animation: mosaicInnerOut 0.4s cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes mosaicInnerOut {
  to { opacity: 0; transform: scale(0.95) translateY(-16px); filter: blur(4px); }
}

.pw-mosaic-inner {
  position: relative;
  z-index: 1;
  width: calc(100% - 80px);
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  scrollbar-width: none;
  opacity: 0;
}
.pw-mosaic-inner::-webkit-scrollbar { display: none; }

.pw-mosaic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  opacity: 0;
}

.pw-mosaic-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.04em;
}

.pw-mosaic-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.65);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.pw-mosaic-close:hover { background: rgba(255, 255, 255, 0.2); color: white; }

.pw-mosaic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.pw-mosaic-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  opacity: 0;
  will-change: transform, opacity;
  transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* Container entrance — blur + scale + fade */
.pw-mosaic-open .pw-mosaic-inner {
  animation: mosaicInnerIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes mosaicInnerIn {
  from { opacity: 0; transform: scale(0.93) translateY(28px); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0);       filter: blur(0px); }
}

/* Header — slides in from top */
.pw-mosaic-open .pw-mosaic-header {
  animation: mosaicHeaderIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

@keyframes mosaicHeaderIn {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Cards — spring overshoot stagger */
.pw-mosaic-open .pw-mosaic-card {
  animation: mosaicCardIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--i) * 0.22s + 0.14s);
}

@keyframes mosaicCardIn {
  0%   { opacity: 0; transform: translateY(44px) scale(0.86); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.pw-mosaic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.pw-mosaic-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.08) 55%, transparent 100%);
  transition: background 0.25s ease;
}

.pw-mosaic-card:hover .pw-mosaic-card-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.18) 55%, transparent 100%);
}

.pw-mosaic-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  width: 50%;
  max-width: 130px;
  height: auto;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.pw-mosaic-card:hover .pw-mosaic-logo {
  transform: translate(-50%, -64%);
}

.pw-mosaic-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 20px;
}

.pw-mosaic-cat {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.44);
  margin-bottom: 5px;
}

.pw-mosaic-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: white;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ─── FIGMA EMBED ────────────────────────────────────────────── */

.pw-figma-embed {
  margin: 16px 28px 12px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pw-figma-label {
  padding: 10px 16px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafafa;
}

.pw-figma-embed iframe {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
  background: #f0f0f0;
}

.pw-figma-link-mobile {
  display: none;
  margin: 8px 20px 16px;
}

.pw-figma-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 28px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0a0a0a;
  text-decoration: none;
  transition: background 0.2s;
}

.pw-figma-btn:hover { background: rgba(0, 0, 0, 0.1); }

/* ─── MOBILE BOTTOM SHEET ────────────────────────────────────── */

.pw-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 600;
  pointer-events: none;
}

.pw-sheet-wrap.pw-sheet-active { pointer-events: auto; }

.pw-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.pw-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 92vh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
  will-change: transform;
}

.pw-sheet-handle-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 6px;
  flex-shrink: 0;
}

.pw-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.14);
}

.pw-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.pw-sheet-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.pw-sheet-logo {
  width: 44px;
  height: auto;
  opacity: 0.65;
  filter: grayscale(1);
  flex-shrink: 0;
}

.pw-sheet-title-wrap { min-width: 0; }

.pw-sheet-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 21px;
  line-height: 1;
  color: #0a0a0a;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pw-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  margin-left: 12px;
  transition: background 0.18s;
}

.pw-sheet-close:hover { background: rgba(0, 0, 0, 0.12); }

.pw-sheet-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 48px;
}

.pw-sheet-info {
  padding: 0 20px 20px;
}

/* ─── MOBILE ─────────────────────────────────────────────────── */

/* ─── BENTO FLUIDE — réempilement progressif ────────────────── */
/* Dès qu'on réduit (≤1240) : la PAGE scrolle, la fenêtre grandit en
   hauteur, et chaque card prend sa hauteur NATURELLE. Les blocs se
   réempilent en colonnes décroissantes (3 → 2 → 1) jusqu'au mobile.
   Plus rien n'est écrasé, cropé ni déformé. */

@media (max-width: 1240px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: flex-start;
  }

  .window {
    height: auto;
    max-height: none;
    transition: none;
  }

  .bento-grid {
    grid-template-rows: auto;
    grid-auto-rows: auto;
    height: auto;
    overflow: visible;
  }

  /* cards remplies en absolu → hauteur explicite sinon elles s'effondrent */
  .profile-photo   { flex: none; height: 240px; }
  .card-experience { overflow: visible; max-height: none; }
  .card-portfolio  { aspect-ratio: 16 / 9; height: auto; }
  .card-showreel   { aspect-ratio: 16 / 9; }
}

@media (max-width: 1240px) and (min-width: 961px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "profile    hero         skills"
      "portfolio  portfolio    portfolio"
      "connect    stats        stats"
      "experience experience   experience"
      "tools      tools        music";
  }
}

@media (max-width: 1040px) and (min-width: 961px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "profile    hero"
      "portfolio  portfolio"
      "connect    skills"
      "stats      stats"
      "experience experience"
      "tools      music";
  }
}

@media (max-width: 960px) {
  .chat-widget { display: none; }
  .hue-rail    { display: none; }

  /* Barre chantier — pill flottante sticky en bas */
  .hellobar {
    font-size: 11px;
    max-width: calc(100vw - 24px);
    white-space: normal;
    text-align: center;
    padding: 8px 8px 8px 14px;
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    animation: hellobarInBottom 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  }
  .hellobar.hidden {
    transform: translateX(-50%) translateY(24px);
  }
  @keyframes hellobarInBottom {
    from { opacity: 0; transform: translateX(-50%) translateY(24px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
  }

  .win-restore  { display: none; }
  .project-win  { display: none !important; }

  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    align-items: flex-start;
  }

  .window {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .window-titlebar { cursor: default; }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "profile"
      "hero"
      "about"
      "portfolio"
      "connect"
      "skills"
      "stats"
      "experience"
      "tools"
      "music";
    height: auto;
    overflow: visible;
    padding: 14px;
    gap: 12px;
  }

  /* Profile — photo carrée */
  .profile-photo {
    flex: none;
    aspect-ratio: 1;
    height: auto;
  }

  /* Hero */
  .hero-title { font-size: clamp(32px, 8vw, 48px); }

  /* Experience — plus lisible ET plus aéré */
  .card-experience  { overflow: visible; max-height: none; }
  .timeline         { gap: 18px; }
  .tl-item          { gap: 12px; }
  .tl-body          { gap: 4px; }
  .tl-body strong,
  .tl-company       { font-size: 14px; }
  .tl-company       { margin-bottom: 12px; }
  .tl-body span     { font-size: 13px; line-height: 1.5; }
  .tl-date          { font-size: 11px; min-width: 52px; }
  .tl-roles         { gap: 16px; --tl-pad: 12px; }
  .tl-role          { gap: 3px; }
  .tl-role-date     { font-size: 11px; }
  .tl-role-title    { font-size: 13px; }
  .tl-role span:last-child { font-size: 12px; line-height: 1.5; }
  .card-experience .divider       { margin: 16px 0; }
  .card-experience .section-label { margin-bottom: 14px; }
  .card-experience .tags-wrap     { gap: 7px; }
  .card-experience .tag           { font-size: 11px; padding: 4px 11px; }

  /* Portfolio — slider carré */
  .card-portfolio { aspect-ratio: 1; height: auto; }

  /* Showreel — card 16:9 */
  .card-showreel { aspect-ratio: 16 / 9; }

  /* Viewer vidéo — padding réduit + frame qui respecte les marges */
  .showreel-lightbox { padding: 16px; }
  .showreel-lightbox-frame { width: 100%; }
  .showreel-lightbox-close { top: 14px; right: 14px; }

  /* Tools — respiration + icônes carrées */
  .card-tools  { gap: 16px; }
  .tools-grid  { grid-template-rows: auto; min-height: auto; gap: 12px; }
  .tool-icon   { aspect-ratio: 1; height: auto; width: 100%; justify-self: stretch; }

  /* Music — spectre à droite */
  .music-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .music-info { flex: 1; }

  /* Divers */
  .card-about { display: flex; }
  .stat-num   { font-size: 30px; }
  .stats-kpis { flex-wrap: wrap; gap: 16px 10px; }
  .stats-kpis .stat-sep { display: none; }
  .stats-kpis .stat { flex: 1 1 40%; }
  /* "On a collaboré" : de l'air pour ne pas coller aux KPI */
  .card-stats .brands-block { margin-top: 16px; }
  .card-stats .brands-head { transform: none; }

  /* Figma — iframe caché, lien bouton à la place (centré) */
  .pw-figma-embed     { display: none; }
  .pw-figma-link-mobile { display: flex; justify-content: center; }

  /* Mosaïque — plein écran mobile */
  .pw-mosaic-inner {
    width: calc(100% - 32px);
    max-height: calc(100vh - 40px);
  }
  .pw-mosaic-grid { grid-template-columns: 1fr; }
}
