/*
 * responsive.css
 * --------------
 * Media queries + accessibilité (focus visible, prefers-reduced-motion).
 * Toujours en dernier pour pouvoir surcharger les règles précédentes.
 */

@media (max-width: 768px) {
  .grid {
    gap: 3rem 1rem;
    padding: 0 1rem 4rem;
  }

  .cd {
    width: 280px;
    height: 280px;
  }

  .cd:hover {
    transform: translateY(-10px) scale(1.08);
  }

  .star {
    top: -15px;
    right: -12px;
    width: 88px;
    height: 88px;
  }

  .star::after {
    width: 24px;
    height: 24px;
    font-size: .85rem;
  }

  .fi,
  .fi-cat {
    gap: 4px;
    padding: 6px;
  }

  .fb {
    padding: 8px 14px;
    font-size: .75rem;
  }

  .hd {
    padding: 3rem 1rem 1.5rem;
  }
}

@media (max-width: 600px) {
  .overlay {
    justify-content: flex-start;
    padding: 3.5rem 1rem;
  }

  .overlay::before {
    inset: 9px;
    border-width: 5px;
  }

  .ov-center {
    width: 88%;
    padding: 1.2rem .8rem;
    border-width: 5px;
    outline-width: 4px;
    box-shadow:
      0 0 0 8px var(--shop-gold),
      8px 10px 0 var(--shop-red-dark);
  }

  .ov-emoji {
    font-size: 3.6rem;
  }

  .ov-title {
    font-size: clamp(1.65rem, 8vw, 2.5rem);
  }

  .ov-sub {
    font-size: .67rem;
    letter-spacing: 1.5px;
  }

  .banner {
    width: 88%;
    padding: 2.2rem 1rem 1.2rem;
  }

  .banner::before {
    padding: 7px 10px;
    font-size: .52rem;
  }

  .bbtn {
    min-width: 100%;
  }

  .shop-marquee-track span {
    padding: 9px 1rem;
    font-size: .65rem;
  }

  .tit {
    width: 88vw;
    padding: 1rem .7rem;
    border-width: 5px;
    outline-width: 4px;
    box-shadow:
      0 0 0 8px var(--shop-gold),
      9px 11px 0 var(--shop-red-dark);
  }

  .tit .rb {
    font-size: .82em;
  }

  .tit .yr {
    padding: 6px 8px;
    font-size: .18em;
    letter-spacing: 2px;
  }

  .desc {
    width: auto;
    font-size: .7rem;
  }

  .fw::before {
    font-size: .57rem;
  }

  .elevator-scene::before {
    top: 11px;
    padding: 7px 12px;
    font-size: .56rem;
  }

  .elevator-stage {
    width: 100%;
    padding-top: 38px;
  }

  .mall-name {
    margin-bottom: .4rem;
    padding: 6px 11px;
    font-size: .56rem;
    letter-spacing: 2px;
  }

  .elevator-display {
    width: 95vw;
    min-height: 72px;
    padding: 9px 10px;
  }

  .elevator-display-content {
    grid-template-columns: 25px 47px minmax(0, 1fr);
    gap: 7px;
    min-height: 40px;
  }

  .elevator-arrow {
    font-size: 1.15rem;
  }

  .elevator-floor {
    font-size: 1.18rem;
  }

  .elevator-department {
    font-size: clamp(.62rem, 3vw, .78rem);
  }

  .elevator-row {
    gap: 11px;
  }

  .elevator-unit {
    width: min(calc(100vw - 78px), 390px);
    height: clamp(340px, 56vh, 455px);
    border-width: 9px;
    border-bottom-width: 12px;
    outline-width: 4px;
    box-shadow:
      0 0 0 7px #fff,
      0 0 0 11px var(--shop-green),
      9px 12px 0 rgba(76, 24, 9, .35);
  }

  .elevator-controls {
    width: 47px;
    gap: 6px;
    padding: 9px 5px;
    outline-width: 3px;
  }

  .elevator-controls-title {
    display: none;
  }

  .elevator-control-dot {
    width: 24px;
    height: 24px;
    font-size: .48rem;
  }

  .elevator-status {
    max-width: 90vw;
    margin-top: 9px;
    padding: 6px 10px;
    font-size: .66rem;
  }
}

@media (max-height: 720px) {
  .elevator-scene::before {
    top: 8px;
  }

  .elevator-stage {
    padding-top: 34px;
  }

  .mall-name {
    margin-bottom: .25rem;
  }

  .elevator-display {
    min-height: 66px;
    margin-bottom: 6px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .elevator-unit {
    height: 51vh;
    min-height: 295px;
  }

  .elevator-status {
    margin-top: 7px;
  }
}

/* ─── Accessibilité ────────────────────────────────── */

.fb:focus-visible,
.cd-btn:focus-visible,
.bbtn:focus-visible,
.aud:focus-visible,
.ttb:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .ld-emoji {
    opacity: 1 !important;
    animation: none !important;
  }

  .ld-bar-i {
    width: 100% !important;
    animation: none !important;
  }
}
