.choix-mesure[hidden], [data-revoir-mesure][hidden] { display: none; }
.choix-mesure {
    position: fixed;
    z-index: 55;
    inset-inline: 0;
    bottom: max(.65rem, env(safe-area-inset-bottom));
    width: min(58rem, calc(100% - max(1.25rem, env(safe-area-inset-left) * 2, env(safe-area-inset-right) * 2)));
    margin-inline: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
    padding: .85rem 1.15rem;
    border: 1px solid #766332;
    border-radius: .65rem;
    background: #191714;
    box-shadow: 0 .35rem 1.25rem #0006;
    color: #f4f1e9;
    font-family: Inter, sans-serif;
}
.choix-mesure h2 { font: 600 1.1rem/1.3 'Noto Serif', Georgia, serif; margin: 0 0 .2rem; }
.choix-mesure p { margin: 0; font-size: .94rem; line-height: 1.45; }
.choix-mesure a { color: #f3dc93; text-underline-offset: .16em; text-decoration: underline; }
.choix-mesure-texte { min-width: 0; overflow-wrap: anywhere; }
.choix-mesure-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.choix-mesure-actions button {
    min-height: 44px; border: 1px solid #d9b02b; border-radius: .35rem;
    background: #252219; color: #fff8db; cursor: pointer; font: inherit; padding: .4rem .85rem;
}
.choix-mesure-actions button:hover { background: #3a3221; }
.choix-mesure :focus-visible, [data-revoir-mesure]:focus-visible { outline: 2px solid #f2ce62; outline-offset: 2px; }
#statut-choix-mesure { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
html:has(.choix-mesure:not([hidden])) {
    scroll-padding-bottom: calc(var(--hauteur-choix-mesure, 12rem) + max(1.25rem, env(safe-area-inset-bottom)));
}
body:has(.choix-mesure:not([hidden]))::after {
    content: ''; display: block; flex: none;
    height: calc(var(--hauteur-choix-mesure, 12rem) + max(1.25rem, env(safe-area-inset-bottom)));
}
@media (max-width: 48rem) {
    .choix-mesure { grid-template-columns: minmax(0, 1fr); gap: .6rem; padding: .75rem .85rem; }
}
@media (max-height: 42rem) {
    .choix-mesure {
        max-height: 56vh;
        max-height: min(56dvh, max(5.75rem, calc(100dvh - var(--hauteur-bandeau, 9rem) - var(--retrait-bandeau, .5rem) - max(1.25rem, env(safe-area-inset-bottom)))));
        grid-template-rows: minmax(0, auto);
    }
    .choix-mesure-texte { min-height: 0; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 48rem) and (max-height: 42rem) {
    .choix-mesure { grid-template-rows: minmax(0, 1fr) auto; }
}
@media (min-width: 31rem) and (max-width: 48rem) and (max-height: 26rem) {
    .choix-mesure { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(0, auto); }
}
/* À fort zoom, garder le menu complet dans le volet et libérer la place nécessaire au choix. */
@media (max-width: 30rem) and (max-height: 19rem) {
    body:has(.choix-mesure:not([hidden])) .barre-bureau > .rubriques-site { display: none; }
}
@media print {
    .choix-mesure, [data-revoir-mesure], body:has(.choix-mesure:not([hidden]))::after { display: none; }
}
