/* Les graphes des animations occupent toute la largeur disponible du cadre */
.fig svg[id]
{
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
}
/* Deux graphes côte à côte quand la place le permet, empilés sinon */
.fig .duo
{
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    justify-content: center;
    align-items: flex-start;
    margin: 0.4em 0;
}
.fig .duo > svg[id]
{
    flex: 1 1 15rem;
    width: auto !important;
    min-width: 0;
    margin: 0 !important;
}
.fig .duo > div
{
    flex: 1 1 19rem;
    min-width: 0;
}
/* Curseurs : largeur adaptée, et répartition en colonnes quand il y en a plusieurs */
.fig .fig-ctl input[type="range"]
{
    width: min(100%, 30em);
}
.fig .ctl-grid
{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.2em 1.4em;
    margin: 0.4em 0;
}
.fig .ctl-grid > .fig-ctl
{
    margin: 0.2em 0;
    min-width: 0;
}
.fig .ctl-grid .fig-ctl input[type="range"]
{
    width: 100%;
}
.fig .ctl-grid > .fig-ctl:last-child:nth-child(odd)
{
    grid-column: 1 / -1;
}
/* Cadres de texte sous les graphes : toute la largeur du cadre */
.fig .fig-val
{
    max-width: 100%;
    box-sizing: border-box;
}
.fig .s1-tbl
{
    width: 100%;
}

/* Définitions, théorèmes, encadrés et exercices occupent la largeur de la page ;
   les animations sont limitées à 800 px, comme les vidéos */
.bloc, .encadre, .exercice
{
    max-width: none !important;
}
.fig
{
    max-width: 800px !important;
    margin-left: auto;
    margin-right: auto;
}
.fig svg[id]
{
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.fig .duo > svg#fa-svg
{
    flex: 0 1 260px;
    max-width: 260px !important;
}
.fig .rel
{
    max-width: none;
}
