/* Seams — contrôles dessinés (listes, dates, couleurs). Partagé par le site, la page candidat et l'espace. */
.ctl { position: relative; display: block; width: 100%; min-width: 0; }
.ctl.is-inline { display: inline-block; width: auto; }
.ctl.is-inline .ctl-btn { width: auto; min-width: 132px; }
.ctl-native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0 !important; pointer-events: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }

.ctl-btn {
  all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; gap: 10px; cursor: pointer;
  font: 500 15px/1.4 "Avenir Next", Avenir, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #202d39; background: #f7f8f6; border-radius: 14px; padding: 12px 12px 12px 14px;
  box-shadow: inset 0 0 0 1px #e8ece9, inset 0 1px 3px rgba(32, 45, 57, .05);
  transition: box-shadow .18s, background .18s;
}
.ctl-btn:hover { background: #f3f5f3; }
.ctl-btn:focus-visible, .ctl.is-open .ctl-btn { background: #fff; box-shadow: inset 0 0 0 1.5px #2f7a64, 0 0 0 4px rgba(47, 122, 100, .1); }
.ctl-btn.is-invalid { box-shadow: inset 0 0 0 1.5px #b8453a, 0 0 0 4px rgba(184, 69, 58, .08); }
.ctl-btn[disabled] { opacity: .5; cursor: default; }
.ctl-btn.is-empty .ctl-val { color: #8a959c; }
.ctl-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctl-ic { width: 15px; height: 15px; flex: none; color: #5f6b74; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.sel.is-open .ctl-ic { transform: rotate(180deg); color: #2f7a64; }

/* Dimensions plus serrées dans l'espace */
.app-ui .ctl-btn { font-size: 14px; padding: 9px 10px 9px 12px; border-radius: 12px; }

/* Calque */
.ctl-pop {
  position: fixed; z-index: 200; box-sizing: border-box; background: #fff; border-radius: 18px; padding: 6px;
  box-shadow: 0 0 0 1px rgba(32, 45, 57, .06), 0 2px 6px rgba(32, 45, 57, .05), 0 28px 56px -22px rgba(32, 45, 57, .32);
  opacity: 0; transform: translateY(-4px) scale(.985); transform-origin: top left;
  transition: opacity .16s ease, transform .2s cubic-bezier(.2, .8, .2, 1);
  font-family: "Avenir Next", Avenir, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #202d39; overflow-y: auto; scrollbar-width: none;
}
.ctl-pop::-webkit-scrollbar { display: none; }
.ctl-pop.up { transform-origin: bottom left; transform: translateY(4px) scale(.985); }
.ctl-pop.in { opacity: 1; transform: none; }

/* Liste */
.sel-opt { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; border-radius: 12px; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .12s; }
.sel-opt i { width: 7px; height: 7px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.4px #c3cbc7; transition: background .15s, box-shadow .15s, transform .2s; }
.sel-opt.is-hi { background: #f3f6f4; }
.sel-opt.is-on { font-weight: 650; }
.sel-opt.is-on i { background: #2f7a64; box-shadow: 0 0 0 3px rgba(47, 122, 100, .14); }
.sel-opt.is-off { opacity: .4; cursor: default; }

/* Calendrier */
.cal { width: 288px; padding: 14px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 10px; }
.cal-h b { font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; text-transform: capitalize; }
:where(.cal) button { all: unset; box-sizing: border-box; cursor: pointer; font-family: inherit; }
.cal-nav { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; color: #5f6b74; box-shadow: inset 0 0 0 1px #e8ece9; }
.cal-nav:hover { color: #202d39; background: #f3f6f4; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-w { font: 600 10.5px/24px ui-monospace, SFMono-Regular, Menlo, monospace; text-align: center; color: #8a959c; letter-spacing: .06em; }
.cal-d { height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; color: #2c3843; transition: background .12s, color .12s; font-variant-numeric: tabular-nums; }
.cal-d:hover, .cal-d.is-hi { background: #f3f6f4; }
.cal-d.is-today { box-shadow: inset 0 0 0 1.4px #2f7a64; color: #2f7a64; font-weight: 650; }
.cal-d.is-on { background: #202d39; color: #fff; font-weight: 650; box-shadow: none; }
.cal-d.is-off { opacity: .3; cursor: default; }
.cal-f { display: flex; gap: 8px; justify-content: space-between; padding-top: 12px; margin-top: 10px; border-top: 1px solid #f0f2f0; }
.cal-f button { font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 100px; color: #202d39; box-shadow: inset 0 0 0 1px #e8ece9; }
.cal-f button:hover { background: #f3f6f4; }

/* Couleur */
.col-sw { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.ctl-val.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; letter-spacing: .04em; }
.pal { width: 252px; padding: 14px; }
.pal-g { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pal-s { all: unset; cursor: pointer; aspect-ratio: 1; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform .18s cubic-bezier(.2, .8, .2, 1.3), box-shadow .15s; }
.pal-s:hover, .pal-s.is-hi { transform: scale(1.12); }
.pal-s.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--c); }
.pal-hex { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 12px; border-radius: 12px; background: #f7f8f6; box-shadow: inset 0 0 0 1px #e8ece9; font: 500 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: #8a959c; }
.pal-hex input { all: unset; flex: 1; color: #202d39; text-transform: uppercase; letter-spacing: .06em; }
.pal-hex input.is-invalid { color: #b8453a; }
.pal-hex:focus-within { box-shadow: inset 0 0 0 1.5px #2f7a64; background: #fff; }

@media (prefers-reduced-motion: reduce) { .ctl-pop, .ctl-ic, .pal-s { transition: none; } }
