/* ==========================================================
   CANTICA EMBED CLEAN LAYOUT V5

   Une seule source de vérité pour l'embed Cantica.

   - aucun scroll vertical interne ;
   - contenu complet de chaque quadrant ;
   - Paroles incluses dans la hauteur ;
   - tous les quadrants restent visibles ;
   - plein écran SolfaSync non modifié.
   ========================================================== */

html.cantica-embed-presentation,
html.cantica-embed-presentation body {
  height: auto !important;
  min-height: 0 !important;
  overflow-y: visible !important;
  background: #081322 !important;
}

html.cantica-embed-presentation
.presentation-page:not(:fullscreen) {
  height: auto !important;
  block-size: auto !important;
  min-height: 0 !important;

  padding: 0 !important;

  overflow: visible !important;

  background: #081322 !important;
}


/* ----------------------------------------------------------
   Toolbar
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-toolbar {
  position: static !important;
  top: auto !important;
}


/* ----------------------------------------------------------
   Layout général
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-layout {
  height: auto !important;
  block-size: auto !important;
  min-height: 0 !important;

  align-items: start !important;

  overflow: visible !important;
}


/* ----------------------------------------------------------
   Configuration
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-settings {
  position: static !important;
  top: auto !important;

  height: auto !important;
  max-height: none !important;

  overflow: visible !important;
}


/* ----------------------------------------------------------
   Stage Tonic Sol-fa
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-stage {
  box-sizing: border-box !important;

  height: auto !important;
  block-size: auto !important;

  min-height: 0 !important;
  min-block-size: 0 !important;

  overflow: visible !important;

  scroll-snap-type: none !important;
  scroll-padding-block: 0 !important;
  scroll-behavior: auto !important;

  /*
   * Espace sombre réel après le dernier quadrant.
   */
  padding-bottom: 56px !important;

  border-radius: 16px !important;

  background: #050a12 !important;
}


/* ----------------------------------------------------------
   Chaque quadrant
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-screen {
  display: grid !important;

  /*
   * Deux enfants réels :
   * 1. header
   * 2. presentation-score-body
   */
  grid-template-rows:
    max-content max-content !important;

  align-content: start !important;

  box-sizing: border-box !important;

  height: auto !important;
  block-size: auto !important;

  min-height: 0 !important;
  min-block-size: 0 !important;

  overflow: visible !important;

  scroll-snap-align: none !important;
}


/* ----------------------------------------------------------
   Corps du quadrant :
   S + A + T + B + PAROLES
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-score-body {
  display: block !important;

  box-sizing: border-box !important;

  height: auto !important;
  block-size: auto !important;

  min-height: 0 !important;

  align-self: start !important;

  overflow: visible !important;
}


/* ----------------------------------------------------------
   Ligne PAROLES
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-global-lyrics {
  display: grid !important;

  position: static !important;

  box-sizing: border-box !important;

  height: auto !important;
  min-height: 0 !important;

  overflow: visible !important;
}


/* ----------------------------------------------------------
   États de lecture.

   Dans Cantica ils ne doivent JAMAIS retirer un quadrant
   du flux vertical.
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-screen.presentation-current-line,

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-screen.presentation-next-line,

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-screen.presentation-past-line {
  display: grid !important;

  height: auto !important;

  min-height: 0 !important;
  min-block-size: 0 !important;

  opacity: 1 !important;

  filter: none !important;

  transform: none !important;
}


html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-stage.presentation-reading-window
.presentation-screen {
  min-height: 0 !important;
  min-block-size: 0 !important;
}


/* ----------------------------------------------------------
   Dernier quadrant
   ---------------------------------------------------------- */

html.cantica-embed-presentation
.presentation-page:not(:fullscreen)
.presentation-screen:last-child {
  margin-bottom: 0 !important;
}


/* ----------------------------------------------------------
   Mobile : conserver le document naturel.
   ---------------------------------------------------------- */

html.cantica-embed-presentation
body.presentation-mobile-reading {
  height: auto !important;
  min-height: 0 !important;

  overflow-y: visible !important;
}
