/*! EMET Education (www.emet-education.com) — © 2026 Mikaël Chelli. Tous droits réservés / All rights reserved. Copie, extraction des modèles 3D, fouille de données et réutilisation interdites sans accord écrit / No copying, 3D model extraction, data mining or reuse without written consent. https://www.emet-education.com/legal/#cgu */
/* ------------------------------------------------------------------
   radial-head-fracture.css — ajustements de style propres à la maquette
   « fracture de la tête radiale ». La charte générale vient de
   /core/css/ui.css ; sélecteur segmenté, pictogrammes, type choisi et
   classification reprennent ceux de la fracture de l'humérus proximal,
   les pictogrammes de la coronoïde ceux de la fracture de l'olécrâne.
------------------------------------------------------------------ */

.field-label { display: block; margin: 4px 0 6px; font-size: 13px; font-weight: 500; }

/* sélecteur segmenté : la classification (Neer · AO/OTA), la tête (varus · neutre · valgus) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 2px 0 10px; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg.three { grid-template-columns: 1fr 1fr 1fr; margin-bottom: 2px; }
.seg button {
  appearance: none; border: 0; border-left: 1px solid var(--border); background: transparent; color: var(--ink-2);
  padding: 7px 6px; cursor: pointer; font: 500 12.5px/1.1 "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  transition: background .15s, color .15s;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--surface-3); color: var(--ink); }
.seg button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.seg button[aria-checked="true"] { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink); font-weight: 600; }

/* les types : pictogrammes en grille (la tête radiale vue d'en haut, ou de profil sur son col) */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 4px; }
.types.four { grid-template-columns: repeat(4, 1fr); }
.type {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 3px 5px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--ink-2); cursor: pointer;
  font: 500 11px/1.15 "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif; text-align: center;
  transition: border-color .15s, background .15s;
}
.type > i { display: block; width: 100%; max-width: 52px; }
.type svg { display: block; width: 100%; height: auto; }
.type svg .b, .chosen svg .b { fill: #ecdfc6; stroke: #c9b896; stroke-width: 1; stroke-linejoin: round; }
.type svg .a, .chosen svg .a { fill: #f5ecd8; stroke: #c9b896; stroke-width: 1; stroke-linejoin: round; }
.type svg .f, .chosen svg .f { fill: none; stroke: #c0392b; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.type b { font-weight: 600; color: var(--ink); }
.type:hover { border-color: var(--accent); background: var(--surface-3); }
.type:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.type.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink); }

/* la classification, lue en direct */
.classif {
  margin: 10px 0 4px; padding: 6px 9px; border-radius: 8px;
  background: var(--surface-3); color: var(--ink-2);
  font: 500 12.5px/1.35 "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
}
.classif strong { color: var(--ink); font-weight: 600; }
#disp-box { margin-top: 10px; }
#disp-box .field-label { margin-top: 8px; }

/* liste déroulante (la luxation : des types, pas des degrés) — même habillage que les autres maquettes */
.select { position: relative; margin-top: 2px; }
.select select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 44px; padding: 10px 38px 10px 12px;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  cursor: pointer;
}
.select select:hover { border-color: var(--accent); }
.select select:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.select::after {
  content: ""; position: absolute; right: 15px; top: 50%;
  width: 7px; height: 7px; margin-top: -6px; pointer-events: none;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(45deg);
}

/* le type choisi, seul : les autres options se replient ; « Modifier » les rouvre */
.chosen {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 2px 0 4px; padding: 7px 10px;
  border: 1px solid var(--accent); border-radius: 9px; background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.chosen-picto { display: block; width: 46px; flex: none; }
.chosen-picto svg { display: block; width: 100%; height: auto; }
.chosen-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 64px; font-family: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif; }
.chosen-group { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.chosen-name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.chosen-name b { font-weight: 700; }
.chosen-edit {
  position: absolute; top: 6px; right: 6px; padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink-2); cursor: pointer; font: 500 11.5px/1.2 "IBM Plex Sans", sans-serif;
}
.chosen-edit:hover { border-color: var(--accent); color: var(--ink); }
.chosen-edit:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* le grade change de lui-même (Mason I → II quand le fragment s'enfonce ou se déplace de 2 mm) : l'encart le signale */
.chosen.is-changed { animation: chosen-changed 1.1s ease-out; }
.chosen.is-changed .chosen-group { animation: chosen-group-changed 1.1s ease-out; }
@keyframes chosen-changed {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); transform: scale(1); }
  18% { transform: scale(1.035); }
  45% { transform: scale(1); }
  100% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@keyframes chosen-group-changed { 0%, 50% { color: var(--accent); } 100% { color: var(--ink-3); } }
@media (prefers-reduced-motion: reduce) { .chosen.is-changed, .chosen.is-changed .chosen-group { animation: none; } }



/* la coronoïde : le processus de profil (pictogrammes de la fracture de l'olécrâne) */
.type > svg { display: block; width: 100%; max-width: 64px; height: auto; overflow: visible; }
.type svg .w { fill: #f2c9c2; stroke: none; }
.seg.three { grid-template-columns: 1fr 1fr 1fr; }
#disp-box { margin-top: 10px; }
#disp-box .slider { margin-top: 10px; }
#assoc-box { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }
#assoc-box .field-label { margin-top: 10px; }
#assoc-box .switch { margin-top: 12px; }
#oc-slider { margin-top: 12px; }
.pnl-body .slider-hint { margin-top: 2px; }

/* « Plier le coude » : la pastille passe de play à pause pendant le mouvement */
#btn-flex-play { margin-top: 10px; }
#btn-flex-play .ico-pause { display: none; }
#btn-flex-play.is-playing .ico-play { display: none; }
#btn-flex-play.is-playing .ico-pause { display: block; }
