/* Rail témoin de la dissertation 1 : même service sur toutes les pages Musset. */
#rail-oeuvre,
#rail-oeuvre *{box-sizing:border-box}
#rail-oeuvre a,
#rail-oeuvre button,
#rail-oeuvre summary{hyphens:none!important;word-break:normal!important;overflow-wrap:normal!important}

@media(min-width:760px){
  html body[data-rail-oeuvre]{
    box-sizing:border-box!important;
    width:auto!important;
    max-width:none!important;
    padding-left:250px!important;
    overflow-x:clip!important;
  }
  html body[data-rail-oeuvre] #rail-oeuvre{
    display:block!important;
    position:fixed!important;
    inset:0 auto 0 0!important;
    width:250px!important;
    height:auto!important;
    max-height:none!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    z-index:60!important;
    margin:0!important;
    padding:22px 14px 32px!important;
    border:0!important;
    border-right:1px solid #a89a80!important;
  }
  html body[data-rail-oeuvre] #rail-oeuvre .be-rail-responsive>summary{display:none!important}
  html body[data-rail-oeuvre] > :not(#rail-oeuvre):not(script):not(style):not(link){max-width:100%!important}
  html body[data-rail-oeuvre] > .vague-de-cloture{
    left:auto!important;
    width:100%!important;
    margin-left:0!important;
  }

  /* Les dissertations possedaient deja une reserve pour l'ancien rail.
     Le rail canonique porte seul cette reserve : les marges historiques
     sont neutralisees afin d'eviter le double decalage. */
  html[data-page="dissertation"] body[data-rail-oeuvre] > .topbar,
  html[data-page="dissertation"] body[data-rail-oeuvre] > .motif-fin,
  html[data-page="dissertation"] body[data-rail-oeuvre] > .site-footer{
    width:auto!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  html[data-page="dissertation"] body[data-rail-oeuvre] > .page{
    width:min(890px,calc(100% - 34px))!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
  html[data-page="dissertation"] body[data-rail-oeuvre] > .guichet-bo{
    width:min(980px,calc(100% - 34px))!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  /* Meme correction pour les animations de dissertation. Le plateau
     reste dans la largeur utile et ne pousse plus la page hors ecran. */
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] > .topbar,
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] > .motif-fin,
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] > .site-footer{
    width:auto!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] > .animation-page{
    width:min(1080px,calc(100% - 34px))!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }
}

@media(min-width:1181px){
  html body[data-rail-oeuvre] > .fil-dossier{
    left:264px!important;
    right:auto!important;
    max-width:calc(100vw - 278px)!important;
  }
}

@media(min-width:1181px){
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] .scene{
    width:100%!important;
    min-height:0!important;
  }
}

@media(min-width:760px) and (max-width:1180px){
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] .scene{
    width:100%!important;
    aspect-ratio:auto!important;
    min-height:590px!important;
  }
}

@media(min-width:760px) and (max-width:800px){
  html[data-page="animation-dissertation"] body[data-rail-oeuvre] .scene{
    min-height:700px!important;
  }
}

@media(max-width:759px){
  html body[data-rail-oeuvre]{padding-left:0!important;padding-right:0!important;overflow-x:clip!important}
  html body[data-rail-oeuvre] #rail-oeuvre{
    display:block!important;
    position:relative!important;
    inset:auto!important;
    width:auto!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    margin:12px!important;
    padding:14px!important;
    border:1px solid #a89a80!important;
  }
  html body[data-rail-oeuvre] #rail-oeuvre .be-rail-responsive>summary{display:block!important}
}

@media print{
  html body[data-rail-oeuvre]{padding-left:0!important}
  html body[data-rail-oeuvre] #rail-oeuvre{display:none!important}
}
