/* Styles communs des pages de maths : blocs (définition, théorème, démonstration), encadrés repliables,
   exercices, figures interactives, tableaux. Chargé par les pages qui déclarent csscommun = ["maths.css"]. */
mjx-container[display="true"] { max-width:100%; overflow-x:auto; overflow-y:hidden; }
h2
{
color:#970E53 !important;
}
h3
{
color:#004D80 !important;
}
.bloc
{
    max-width: 40rem;
    margin: 1.4em auto;
    border: 2px solid;
    border-radius: 12px;
    padding: 0.6em 1.3em 0.4em 1.3em;
}
.bloc-titre
{
    font-weight: bold;
    margin-bottom: 0.3em;
}
.bloc-def { border-color: #004D80; background: #EEF4FA; }
.bloc-prop { border-color: #C2770B; background: #FDF6EC; }
.bloc-theo { border-color: #970E53; background: #FBF1F5; }
.bloc-preuve { border-color: #64748B; background: #F1F5F9; }
.bloc-def > .bloc-titre { color: #004D80; }
.bloc-prop > .bloc-titre { color: #C2770B; }
.bloc-theo > .bloc-titre { color: #970E53; }
.bloc-preuve > .bloc-titre { color: #475569; }
.encadre
{
    max-width: 40rem;
    margin: 1.4em auto;
    border: 2px solid #006C65;
    border-radius: 12px;
    background: #F3F8F7;
    padding: 0.6em 1.3em 0.4em 1.3em;
}
.encadre-titre
{
    font-weight: bold;
    color: #006C65;
    margin-bottom: 0.3em;
}
details.encadre > summary
{
    display: block;
    cursor: pointer;
    list-style: none;
}
details.encadre > summary::-webkit-details-marker
{
    display: none;
}
details.encadre > summary::before
{
    content: "\25B8\00A0";
}
details.encadre[open] > summary::before
{
    content: "\25BE\00A0";
}
.exercice
{
    max-width: 40rem;
    margin: 1.4em auto;
    border: 2px solid #6B4FA0;
    border-radius: 12px;
    background: #F6F3FA;
    padding: 0.6em 1.3em 0.4em 1.3em;
}
.exercice-titre
{
    font-weight: bold;
    color: #6B4FA0;
    margin-bottom: 0.3em;
}
details.exercice > summary
{
    display: block;
    cursor: pointer;
    list-style: none;
}
details.exercice > summary::-webkit-details-marker
{
    display: none;
}
details.exercice > summary::before
{
    content: "\25B8\00A0";
}
details.exercice[open] > summary::before
{
    content: "\25BE\00A0";
}
details.solution > summary
{
    cursor: pointer;
    color: #6B4FA0;
    font-style: italic;
}
.fig
{
    max-width: 40rem;
    margin: 1.4em auto;
    text-align: center;
}
.fig > svg
{
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 460px;
    height: auto;
}
.fig canvas
{
    display: block;
    margin: 0.4em auto;
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 8px;
}
.fig .scene3d canvas
{
    display: block;
    width: 100%;
    max-width: none;
    margin: 0.4em auto;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #fff;
}
.scene3d-erreur
{
    color: #970E53;
}
.fig-ctl
{
    margin: 0.4em 0 0.2em;
    text-align: center;
}
.fig-ctl label
{
    display: block;
}
.fig-ctl input[type="range"]
{
    display: block;
    margin: 0.3em auto;
    width: min(16em, 100%);
    accent-color: #004D80;
}
.fig-ctl select
{
    font-size: 1em;
    padding: 0.1em 0.4em;
    max-width: 100%;
}
.fig-ctl button
{
    font-size: 0.9em;
    padding: 0.1em 0.7em;
    margin: 0.15em 0.1em;
    border: 2px solid #004D80;
    border-radius: 8px;
    background: #EEF4FA;
    color: #004D80;
    cursor: pointer;
}
.fig-ctl select.sel-seul
{
    display: block;
    margin: 0.3em auto;
    text-align-last: center;
}
.fig-val.note
{
    font-size: 0.85em;
    color: #64748B;
}
.fig-ctl .coef
{
    display: inline-block;
    margin: 0.1em 0.25em;
}
.fig-ctl .coef input
{
    width: 3.8em;
    font-size: 0.95em;
    text-align: center;
}
.fig-val
{
    font-size: 0.95em;
    color: #334155;
    margin: 0.2em 0;
}
.tbl
{
    border-collapse: collapse;
    border: none;
    margin: 0.8em auto;
    font-size: 0.95em;
    max-width: 100%;
}
.tbl td, .tbl th
{
    border: 1px solid #C7DDDC;
    padding: 0.3em 0.7em;
    text-align: center;
}
.tbl th
{
    background: #EEF4FA;
}
.bloc-prop .tbl
{
    border-collapse: separate;
    border-spacing: 0;
    margin: 0.7em auto 0.9em;
    background: #fff;
    border: 1px solid #E3C48F;
    border-radius: 8px;
    overflow: hidden;
}
.bloc-prop .tbl th, .bloc-prop .tbl td
{
    border: none;
    border-bottom: 1px solid #F0DDBE;
    padding: 0.4em 0.9em;
    background: #fff;
}
.bloc-prop .tbl tr:last-child th, .bloc-prop .tbl tr:last-child td
{
    border-bottom: none;
}
.bloc-prop .tbl th
{
    background: #F8E8CE;
    color: #8A5208;
    text-align: left;
    white-space: nowrap;
    border-right: 2px solid #E3C48F;
}
.bloc-prop .tbl tr:first-child td
{
    background: #FDF3E1;
    color: #8A5208;
}
.bloc-prop .tbl td
{
    min-width: 3.2em;
}
@media (max-width: 480px)
{
    .bloc-prop .tbl th, .bloc-prop .tbl td
    {
        padding: 0.35em 0.45em;
        font-size: 0.92em;
    }
    .bloc-prop .tbl td
    {
        min-width: 0;
    }
    .bloc-prop .tbl mjx-container, .bloc-prop .tbl mjx-math
    {
        white-space: nowrap !important;
    }
}
.bloc-prop .tbl caption
{
    caption-side: top;
    color: #8A5208;
    font-size: 0.9em;
    font-style: italic;
    padding-bottom: 0.3em;
}
.bloc-prop .tbl td:nth-child(3)
{
    font-weight: bold;
    border-left: 1px dashed #E3C48F;
    border-right: 1px dashed #E3C48F;
}
.fig
{
    background: #FAFCFE;
    border: 1px solid #D5DFEA;
    border-radius: 14px;
    padding: 0.7em 0.9em 0.8em;
    box-shadow: 0 1px 3px rgba(15, 40, 80, 0.08);
}
.fig-titre
{
    font-weight: bold;
    color: #004D80;
    font-size: 0.95em;
    letter-spacing: 0.01em;
    margin: 0 0 0.35em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #E3EAF2;
}
.fig > svg
{
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    box-sizing: border-box;
}
.fig canvas
{
    border: 1px solid #E2E8F0;
    box-sizing: border-box;
}
.fig-ctl label
{
    color: #334155;
}
.fig-ctl .badge, .badge
{
    display: inline-block;
    min-width: 2.6em;
    padding: 0 0.55em;
    border-radius: 999px;
    background: #E2EEF9;
    color: #004D80;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
}
.fig-ctl input[type="range"]
{
    height: 1.4em;
    cursor: pointer;
}
.fig-ctl input[type="number"], .fig-ctl select
{
    border: 1px solid #B6C4D4;
    border-radius: 8px;
    background: #fff;
    color: #1E293B;
    padding: 0.2em 0.4em;
    box-shadow: inset 0 1px 2px rgba(15, 40, 80, 0.06);
}
.fig-ctl input[type="number"]:focus, .fig-ctl select:focus
{
    outline: 2px solid #7FB0DB;
    outline-offset: 1px;
}
.fig-ctl button
{
    border: 1px solid #9DB8D3;
    border-radius: 999px;
    background: #fff;
    color: #004D80;
    padding: 0.2em 0.9em;
    margin: 0.2em 0.15em;
    box-shadow: 0 1px 2px rgba(15, 40, 80, 0.1);
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.fig-ctl button:hover
{
    background: #E8F1FA;
    border-color: #004D80;
}
.fig-ctl button:active
{
    transform: translateY(1px);
    box-shadow: none;
}
.fig-ctl button:focus-visible
{
    outline: 2px solid #7FB0DB;
    outline-offset: 2px;
}
.fig-val
{
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.4em 0.8em;
    margin: 0.55em auto 0.2em;
    max-width: 34rem;
}
.fig-val:empty
{
    display: none;
}
.fig-val.note
{
    background: none;
    border: none;
    padding: 0.1em 0.4em;
}
.sysaff
{
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    align-items: center;
    justify-content: center;
    justify-items: center;
    column-gap: 0.28em;
    row-gap: 0.15em;
    margin: 0.5em auto 0.7em;
    padding: 0.35em 0.9em;
    width: fit-content;
    max-width: 100%;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3em;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
}
.sysaff .acc
{
    grid-row: 1 / span 2;
    font-size: 2.9em;
    font-weight: 100;
    line-height: 1;
    color: #94A3B8;
    margin-right: 0.1em;
}
.sysaff i
{
    font-style: italic;
}
.sysaff .tr
{
    white-space: nowrap;
}
.sysaff .a { justify-self: end; }
.sysaff .c { justify-self: start; }
.rel
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25em 0.3em;
    max-width: 30rem;
    margin: 0.35em auto;
    padding: 0.3em 0.6em;
    border-left: 5px solid var(--c);
    border-radius: 8px;
    background: #fff;
    border-top: 1px solid #E2E8F0;
    border-right: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}
.rel .relnum
{
    font-weight: bold;
    color: var(--c);
    margin-right: 0.3em;
}
.rel .coef
{
    display: inline-flex;
    align-items: center;
    gap: 0.25em;
    margin: 0;
    line-height: 1;
}
.rel .coef input, .rel select
{
    box-sizing: border-box;
    height: 2.1em;
    margin: 0;
    font-size: 1em;
    line-height: 1.2;
    vertical-align: middle;
}
.rel .coef input
{
    width: 3.8em;
}
.rel select
{
    padding: 0 0.3em;
}
