/* ExoMatch — constructeur de séances, dans les couleurs existantes du site. */
.exo-custom { margin: 0 0 1.6rem; padding: 1.35rem; border: 1px solid #d5e7de; border-radius: 20px; background: #f4fbf7; scroll-margin-top: 85px; }
.exo-custom button, .exo-custom input, .exo-custom select { font: inherit; }
.exo-custom__heading, .exo-custom__editor-heading, .exo-custom__picker-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.exo-custom__heading h2 { margin: .25rem 0 .4rem; font-size: clamp(1.5rem,3vw,1.95rem); }
.exo-custom__heading p { margin: 0; color: #526277; max-width: 560px; }
.exo-custom__create { min-height: 51px; flex-shrink: 0; }
.exo-custom__notice { color: #496658; font-size: .85rem; margin: .7rem 0 1.15rem; }
.exo-custom__saved-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem; }
.exo-custom__card { min-width: 0; padding: 1.05rem; background: #fff; border: 1px solid #dce7e3; border-radius: 15px; }
.exo-custom__card .eyebrow { color: #127351; }
.exo-custom__card h3 { font-size: 1.1rem; margin: .3rem 0 .45rem; overflow-wrap: anywhere; }
.exo-custom__card-meta { font-size: .89rem; color: #2d5044; font-weight: 700; margin: 0 0 .45rem; }
.exo-custom__card-exercises { color: #536277; font-size: .85rem; line-height: 1.5; margin: 0 0 1rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.exo-custom__card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.exo-custom__card-actions .button { min-height: 43px; padding: .55rem .72rem; font-size: .86rem; }
.exo-custom__empty { padding: 1.15rem; border: 1px dashed #b3d3c5; border-radius: 13px; background: #fff; }
.exo-custom__empty p { color: #526277; margin: .35rem 0 0; }
.exo-custom__library-tools { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .8rem; }
.exo-custom__library-tools .button { min-height: 41px; padding: .55rem .75rem; font-size: .85rem; cursor: pointer; }
.exo-custom__editor { margin-top: 1.25rem; padding: 1.2rem; border-radius: 16px; background: #fff; border: 1px solid #d6e2df; scroll-margin-top: 75px; }
.exo-custom__editor-heading h3 { margin: .25rem 0 .5rem; }
.exo-custom__name { margin: .7rem 0 1.25rem; display: grid; gap: .45rem; font-weight: 750; color: #1d3545; }
.exo-custom__name input, .exo-custom__filters input, .exo-custom__filters select, .exo-custom__config input, .exo-custom__config select { min-width: 0; width: 100%; min-height: 46px; padding: .65rem .72rem; color: #1b2d40; background: #fff; border: 1px solid #bfcfcb; border-radius: 10px; }
.exo-custom__picker, .exo-custom__chosen { padding: .8rem 0 1.1rem; border-top: 1px solid #e1e9e6; }
.exo-custom__picker-heading { margin-bottom: .65rem; }
.exo-custom__picker-heading h4 { font-size: 1.1rem; margin: 0; }
.exo-custom__picker-heading > span { color: #607185; font-size: .85rem; white-space: nowrap; }
.exo-custom__filters { display: grid; grid-template-columns: 1.4fr 1fr; gap: .65rem; margin-bottom: .65rem; }
.exo-custom__filters label { display: grid; gap: .35rem; color: #344d5b; font-size: .84rem; font-weight: 700; }
.exo-custom__catalog { max-height: 350px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #e2e9e7; border-radius: 12px; }
.exo-custom__catalog-item { display: flex; gap: .7rem; align-items: center; justify-content: space-between; padding: .65rem .8rem; border-bottom: 1px solid #e7eeeb; }
.exo-custom__catalog-item:last-child { border-bottom: 0; }
.exo-custom__catalog-item > div { min-width: 0; }
.exo-custom__catalog-item strong { display: block; color: #233645; font-size: .94rem; line-height: 1.35; }
.exo-custom__catalog-item small { display: block; color: #657385; line-height: 1.4; }
.exo-custom__catalog-item .button { min-height: 42px; flex-shrink: 0; }
.exo-custom__catalog-item button:disabled { opacity: .45; cursor: not-allowed; }
.exo-custom__empty-search { margin: 0; padding: 1rem; color: #677588; }
.exo-custom__more { margin-top: .65rem; }
.exo-custom__help { margin: .15rem 0 .85rem; font-size: .87rem; line-height: 1.5; color: #526477; }
.exo-custom__selected { display: grid; gap: .8rem; }
.exo-custom__empty-exercises { margin: 0; padding: 1rem; border: 1px dashed #b3d0c5; border-radius: 12px; color: #5d6d7c; }
.exo-custom__selected-item { padding: .82rem; background: #f7faf9; border: 1px solid #d9e6e2; border-radius: 12px; min-width: 0; }
.exo-custom__selected-item.is-drop-target { outline: 3px solid #43a37a; outline-offset: -2px; }
.exo-custom__item-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.exo-custom__drag { display: grid; place-items: center; flex: 0 0 38px; height: 42px; padding: 0; border: 1px solid #b4cac2; border-radius: 9px; background: #e8f4ee; color: #235b47; font-size: 1.4rem !important; cursor: grab; touch-action: none; user-select: none; }
.exo-custom__drag:active { cursor: grabbing; }
.exo-custom__item-title { min-width: 0; flex: 1; display: flex; gap: .55rem; align-items: center; }
.exo-custom__item-title strong { font-size: .98rem; line-height: 1.3; overflow-wrap: anywhere; }
.exo-custom__index { color: #188260; font-size: .83rem; font-weight: 850; }
.exo-custom__item-tools { display: flex; gap: .3rem; }
.exo-custom__reorder, .exo-custom__remove { min-width: 36px; min-height: 40px; padding: 0; border: 1px solid #bed1cc; border-radius: 8px; color: #225b4b; background: white; font-size: 1.15rem !important; font-weight: 800; cursor: pointer; }
.exo-custom__reorder:disabled { opacity: .3; cursor: not-allowed; }
.exo-custom__remove { color: #a33c43; border-color: #ead0d0; }
.exo-custom__config { display: grid; gap: .55rem; grid-template-columns: repeat(5,minmax(0,1fr)); }
.exo-custom__config-field { min-width: 0; display: grid; gap: .35rem; color: #3f5462; font-size: .77rem; font-weight: 700; }
.exo-custom__config-field span { white-space: normal; }
.exo-custom__config input, .exo-custom__config select { min-height: 44px; padding: .5rem .45rem; font-size: .9rem; }
.exo-custom__item-hint { margin: .6rem 0 0; color: #607184; font-size: .76rem; }
.exo-custom__feedback { min-height: 1.1rem; color: #267450; font-size: .9rem; margin: .7rem 0; }
.exo-custom__feedback.is-error { color: #a3383e; font-weight: 700; }
.exo-custom__footer { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: .7rem; border-top: 1px solid #e1e8e5; }
.exo-custom__footer .button { min-height: 50px; }
.exo-custom button:focus-visible, .exo-custom input:focus-visible, .exo-custom select:focus-visible, .exo-custom__import:focus-within { outline: 3px solid #36af7d; outline-offset: 2px; }
.exo-custom__import input { opacity: 0; width: 1px; height: 1px; position: absolute; }
@media(max-width: 850px) { .exo-custom__config { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width: 720px) {
  .exo-custom { padding: .95rem; margin-top: .45rem; border-radius: 17px; scroll-margin-top: 70px; }
  .exo-custom__heading { flex-direction: column; align-items: stretch; gap: .7rem; }
  .exo-custom__heading .button { width: 100%; justify-content: center; }
  .exo-custom__saved-grid { grid-template-columns: minmax(0,1fr); }
  .exo-custom__card { padding: .95rem; }
  .exo-custom__card-actions .button:first-child { width: 100%; justify-content: center; min-height: 49px; }
  .exo-custom__card-actions .button:not(:first-child) { flex: 1; justify-content: center; }
  .exo-custom__editor { padding: .8rem; margin-top: 1rem; }
  .exo-custom__editor-heading h3 { font-size: 1.15rem; }
  .exo-custom__filters { grid-template-columns: minmax(0,1fr); }
  .exo-custom__catalog { max-height: 285px; }
  .exo-custom__catalog-item { gap: .4rem; padding: .65rem .55rem; }
  .exo-custom__catalog-item strong { font-size: .89rem; }
  .exo-custom__catalog-item small { font-size: .74rem; }
  .exo-custom__catalog-item .button { padding: .4rem .55rem; font-size: .8rem; }
  .exo-custom__config { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .exo-custom__item-title strong { font-size: .9rem; }
  .exo-custom__item-tools { gap: .25rem; }
  .exo-custom__reorder, .exo-custom__remove { min-width: 32px; }
  .exo-custom__footer { flex-direction: column; }
  .exo-custom__footer .button { width: 100%; justify-content: center; }
}
@media(max-width: 350px) {
  .exo-custom__selected-item { padding: .6rem; }
  .exo-custom__item-head { gap: .35rem; }
  .exo-custom__drag { flex-basis: 31px; width: 31px; }
  .exo-custom__reorder, .exo-custom__remove { min-width: 29px; }
  .exo-custom__item-title { gap: .3rem; }
}
@media(max-width: 720px) {
  /* Le nom reste entier sur petit écran ; commandes tactiles sur une seconde ligne. */
  .exo-custom__item-head { display: grid; grid-template-columns: 38px minmax(0,1fr); grid-template-areas: 'drag title' 'drag tools'; row-gap: .35rem; }
  .exo-custom__drag { grid-area: drag; align-self: center; }
  .exo-custom__item-title { grid-area: title; }
  .exo-custom__item-tools { grid-area: tools; justify-content: flex-start; }
}
@media(max-width: 350px) {
  .exo-custom__item-head { grid-template-columns: 32px minmax(0,1fr); }
}
