/* ===== HERO — mobile first ===== */
.hero {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
}

.hero-left {
  width: 100%;
}

.hero-left h1 {
  font-size: clamp(2.75rem, 9vw, 8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
}

.hero-sep {
  width: 32px;
  height: 2px;
  background-color: var(--black);
  margin: 0.5rem 0 0.625rem;
}

.hero-question {
  font-size: clamp(0.7rem, 2.8vw, 0.85rem);
  line-height: 1.5;
}

.hero-right {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-artist {
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
}

.hero-desc {
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  line-height: 1.6;
}

/* ===== CARDS — mobile first ===== */
.content {
  padding: 1.25rem;
}

.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Carte — bordure accent via padding 2px sur fond accent */
.card {
  position: relative;
  height: 360px;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%);
  display: flex;
  flex-direction: column;
  padding: 2px;
}

/* Couleur accent par carte = la bordure */
#card-1 { background-color: var(--vert); }
#card-2 { background-color: var(--rouge); }
#card-3 { background-color: var(--bleu); }

/* Fond beige intérieur */
.card::before {
  content: '';
  position: absolute;
  inset: 2px;
  background-color: var(--bg);
  z-index: 0;
  clip-path: polygon(0 0, calc(100% - 29px) 0, 100% 29px, 100% 100%, 0 100%);
}

/* Top bar — flotte au-dessus de l'image */
.card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  height: 90px;
  padding: 8px 20px 8px 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  background-color: transparent;
  clip-path: polygon(0 0, calc(100% - 29px) 0, 100% 29px, 100% 100%, 0 100%);
}

.card-badge {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  color: var(--bg);
  font-size: 1.1rem;
}

#card-1 .card-badge { background-color: var(--vert); }
#card-2 .card-badge { background-color: var(--rouge); }
#card-3 .card-badge { background-color: var(--bleu); }

/* Titres + flèche en couleur accent */
#card-1 .card-meta h2, #card-1 .card-meta p, #card-1 .card-arrow { color: var(--vert); }
#card-2 .card-meta h2, #card-2 .card-meta p, #card-2 .card-arrow { color: var(--rouge); }
#card-3 .card-meta h2, #card-3 .card-meta p, #card-3 .card-arrow { color: var(--bleu); }

.card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.card-meta h2 {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-meta p {
  font-size: 0.75rem;
  margin-top: 2px;
}

.card-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 14px;
}

/* Image — déborde vers le haut dans la zone card-top transparente */
.card-img {
  flex: 1;
  overflow: visible;
  min-height: 0;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-img img {
  width: 100%;
  height: calc(100% + 90px);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

#card-1 .card-img { background-color: var(--vert); }
#card-2 .card-img { background-color: var(--rouge); }
#card-3 .card-img { background-color: var(--bleu); }

/* Bottom bar */
.card-bot {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  color: var(--bg);
  position: relative;
  z-index: 3;
}

#card-1 .card-bot { background-color: var(--vert); }
#card-2 .card-bot { background-color: var(--rouge); }
#card-3 .card-bot { background-color: var(--bleu); }

.bot-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  opacity: 0.75;
  line-height: 1;
}

.bot-value {
  font-size: 1rem;
  line-height: 1;
  margin-top: 2px;
}

/* Lien invisible couvrant toute la carte */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 10;
}

#card-1 { cursor: pointer; }

/* Overlay lock — même clip-path que .card-top */
.card-lock {
  position: absolute;
  inset: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background-color: rgba(31, 31, 31, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 5;
  clip-path: polygon(0 0, calc(100% - 29px) 0, 100% 29px, 100% 100%, 0 100%);
}

.lock-icon {
  width: 36px;
  color: var(--bg);
}

.lock-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--bg);
}

.lock-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.lock-sub {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

/* ===== ANIMATION UNLOCK ===== */
@keyframes shackle-open {
  0%   { transform: translateY(0);     }
  60%  { transform: translateY(-16px); }
  75%  { transform: translateY(-12px); }
  100% { transform: translateY(-16px); }
}

@keyframes lock-disappear {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes particle-burst {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1.2); opacity: 1; }
  30%  { opacity: 1; }
  100% { transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

.card-lock.is-unlocking {
  animation: lock-disappear 3s cubic-bezier(0.4, 0, 0.8, 1) forwards;
  pointer-events: none;
}

.card-lock.is-unlocking .lock-icon path:last-child {
  animation: shackle-open 1.8s ease-out forwards;
}

.card-lock.is-unlocking .lock-title {
  letter-spacing: 0.18em;
}

.unlock-particle {
  position: absolute;
  pointer-events: none;
  z-index: 15;
  animation: particle-burst var(--dur) var(--delay) ease-out forwards;
}

/* ===== SYSTEM MOBILE BAR — mobile only ===== */
.system-mobile-bar {
  display: flex;
  height: 72px;
  flex-shrink: 0;
  border-top: 1px solid var(--black);
  overflow: hidden;
}

.smb-wave {
  flex: 0 0 42%;
  background-color: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px 10px 8px;
  gap: 4px;
}

.smb-wave-label {
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  color: var(--bg);
  opacity: 0.5;
}

.smb-log {
  flex: 1;
  list-style: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem 0.75rem;
  overflow: hidden;
  background-color: var(--black);
  border-left: 1px solid rgba(232, 223, 208, 0.15);
}

.smb-log li {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  gap: 0.4rem;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  color: var(--bg);
  white-space: nowrap;
  overflow: hidden;
}

.smb-log li p:last-child {
  opacity: 0.45;
}

/* ===== SYSTEM DESKTOP — caché sur mobile ===== */
.system {
  display: none;
}

.system h3 {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  font-weight: normal;
  margin-bottom: 0.5rem;
}

/* Note — cachée sur mobile */
.note {
  display: none;
}

.note > div {
  flex: 1;
  background-color: var(--black);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  padding: 1rem 1.5rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.note h3,
.note p { color: var(--bg); }

.note p {
  font-size: 0.75rem;
  line-height: 1.6;
}

.note > ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-align: left;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ===== DESKTOP ===== */
@media (min-width: 1200px) {
  .hero {
    flex-direction: row;
    align-items: flex-end;
    gap: 2rem;
    padding: 1.25rem 2rem 1.25rem 3rem;
  }

  .hero-left {
    flex: 0 0 auto;
    max-width: 58%;
  }

  .hero-left h1 {
    font-size: clamp(2.5rem, 6vw, 7rem);
    white-space: nowrap;
  }

  .hero-left {
    width: fit-content;
  }

  .hero-right {
    flex: 0 0 auto;
    max-width: 30%;
    width: auto;
  }

  .hero-artist {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
  }

  .hero-desc {
    font-size: clamp(0.65rem, 0.8vw, 0.85rem);
  }

  /* Hero — ne grandit pas */
  .hero {
    flex-shrink: 0;
  }

  /* Cards desktop — remplit l'espace restant */
  .content {
    padding: 0 2rem 0 3rem;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .card-list {
    flex-direction: row;
    flex: 1;
    min-height: 0;
  }

  .card {
    flex: 1;
    height: auto;
    clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 0 100%);
  }

  .card::before {
    clip-path: polygon(0 0, calc(100% - 39px) 0, 100% 39px, 100% 100%, 0 100%);
  }

  .card-top {
    height: 110px;
    padding: 8px 28px 8px 16px;
    clip-path: polygon(0 0, calc(100% - 39px) 0, 100% 39px, 100% 100%, 0 100%);
  }

  .card-img img {
    height: calc(100% + 110px);
  }

  .card-lock {
    clip-path: polygon(0 0, calc(100% - 39px) 0, 100% 39px, 100% 100%, 0 100%);
  }

  .card-badge {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    margin-top: 10px;
  }

  .card-meta h2 {
    font-size: clamp(1.4rem, 2.5vw, 2.5rem);
  }

  .card-bot {
    height: 72px;
    padding: 0 28px;
  }

  .bot-value {
    font-size: 1.15rem;
  }

  /* System desktop — ne grandit pas */
  .system-mobile-bar { display: none; }

  .system {
    display: flex;
    height: 160px;
    flex-shrink: 0;
    flex-direction: row;
    padding: 0 2rem 1rem 3rem;
    gap: 1rem;
  }

  .waveform {
    display: flex;
    flex: 2;
    min-width: 0;
    flex-direction: row;
    gap: 1.5rem;
    border: 1px solid var(--black);
    padding: 0.75rem;
    height: 100%;
  }

  .waveform > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .waveform > div:first-child { flex: 3; }
  .waveform > div:last-child  { flex: 2; }

  /* Réaffiche les éléments cachés sur mobile */
  .waveform > div:first-child > h3,
  .waveform-log,
  .waveform > div:last-child {
    display: flex;
  }

  .waveform > div:first-child > h3 {
    display: block;
  }

  .waveform-log {
    flex: 1;
    list-style: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    overflow: hidden;
  }

  .waveform-log li {
    display: flex;
    gap: 0.75rem;
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
  }

  /* Row : waveform box + logs */
  .waveform > div:first-child > div {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    min-height: 0;
  }

  .waveform-box {
    flex: 0 0 38%;
    padding: 6px;
    background-color: var(--black);
  }

  .waveform-params {
    display: flex;
    flex: 1;
    list-style: none;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
  }

  .waveform-params li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.65rem;
  }

  .waveform-params li > p:first-child {
    width: 50px;
    flex-shrink: 0;
  }

  .waveform-params li > div {
    flex: 1;
    height: 5px;
    border: 1px solid var(--black);
  }

  .waveform-params li > div > div {
    height: 100%;
    background-color: var(--black);
  }

  /* Note desktop */
  .note {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .note > div {
    height: 100%;
    clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%);
    padding: 0.75rem 1rem 1.5rem 1rem;
  }

  .note p { font-size: 0.75rem; }
}

/* ===== BOB FIXED ===== */
.bob-fixed {
  position: fixed;
  display: none; /* caché sur mobile */
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 100;
  pointer-events: none;
}

@media (min-width: 1200px) {
  .bob-fixed {
    display: flex;
  }
}

.bob-fixed img {
  width: 160px;
  height: auto;
  display: block;
  margin-top: 0.5rem;
}

.bob-speech {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bubble-float 3.2s ease-in-out infinite;
}

@keyframes bubble-float {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.bob-bubble {
  background-color: var(--black);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

.bob-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--black);
}

/* ── Typewriter cursor ── */
.type-cursor {
  display: inline-block;
  width: 1px;
  height: 0.9em;
  background-color: var(--bg);
  margin-left: 2px;
  vertical-align: middle;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
