/* ==========================================================================
   Nos réalisations (page /realisations et section de l'accueil) : cartes des Exemples, filtre par catégorie et par
   secteur, visionneuse ordinateur / téléphone (ADR 0026 amendé). Données lues au chargement (assets/js/realisations.js).
   ========================================================================== */
@layer sections {
  .rz-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
  }

  .rz-toolbar[hidden],
  .rz-toolbar [hidden] {
    display: none;
  }

  .offer-switch__tab[aria-pressed="true"] {
    background: var(--color-surface);
    color: var(--color-heading);
    box-shadow: var(--shadow-sm);
  }

  .offer-switch__tab .icon {
    margin-right: 0.375rem;
  }

  .rz-sector {
    width: min(100%, 20rem);
  }

  .rz-status {
    color: var(--color-muted);
  }

  .rz-status[hidden] {
    display: none;
  }

  /* Vignettes : le premier écran du site (haut de page), et le téléphone posé dessus. */
  .rz-media .rz-shot {
    object-position: top center;
  }

  .project-card__media .rz-phone {
    position: absolute;
    right: 6%;
    bottom: 7%;
    width: 21%;
    height: auto;
    aspect-ratio: 390 / 844;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--ink-950);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: none;
  }

  .rz-placeholder {
    display: grid;
    place-items: center;
    gap: var(--space-2);
    height: 100%;
    padding: var(--space-4);
    color: var(--color-muted);
    font-family: var(--font-display);
    font-weight: 700;
    text-align: center;
  }

  /* Visionneuse : le site réel dans un cadre sans accès au site Hynso (bac à sable). */
  .rz-viewer {
    width: min(1320px, calc(100vw - 2rem));
    height: calc(100dvh - 2rem);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
  }

  .rz-viewer[open] {
    display: flex;
    flex-direction: column;
  }

  .rz-viewer::backdrop {
    background: rgb(8 12 30 / 0.72);
  }

  .rz-viewer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-bottom: var(--border-width) solid var(--color-border);
  }

  .rz-viewer__title {
    min-width: 0;
  }

  .rz-viewer__title h2 {
    margin: 0;
    font-size: 1.125rem;
  }

  .rz-viewer__title .caption {
    margin: 0;
  }

  .rz-viewer__tools,
  .rz-viewer__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
  }

  .rz-viewer__icon {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-heading);
    cursor: pointer;
  }

  .rz-viewer__icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .rz-viewer__stage {
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    padding: var(--space-3);
    background: var(--color-surface-alt);
  }

  .rz-viewer__stage iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--white);
  }

  .rz-viewer__stage.is-mobile iframe {
    width: 390px;
    max-width: 100%;
    border: 10px solid var(--ink-950);
    border-radius: 28px;
  }

  @media (max-width: 47.99rem) {
    .rz-viewer {
      width: 100vw;
      height: 100dvh;
      border-radius: 0;
    }

    .rz-viewer__stage {
      padding: 0;
    }

    .rz-viewer__stage.is-mobile iframe {
      width: 100%;
      border: 0;
      border-radius: 0;
    }
  }
}
