/* ===============================
   FFA Sidebar (Shiny / bslib)
================================ */
.ffa-sidebar{
  --bg: #0d2366;
  --accent: #02bcff;
  --white: #fff;
  padding: 0;
}

/* retire les paddings internes bootstrap/bslib */
.ffa-sidebar .bslib-sidebar-layout,
.ffa-sidebar .sidebar{
  padding: 0;
}

/* ===============================
   Accordion : fond + reset bootstrap
================================ */
.ffa-sidebar .ffa-accordion,
.ffa-sidebar .ffa-accordion :is(
  .accordion-item,
  .accordion-header,
  .accordion-collapse,
  .accordion-body,
  .accordion-button
){
  background: var(--bg) !important;
}

/* Enlève le padding par défaut du body de l'accordion */
.ffa-sidebar .ffa-accordion .accordion-body{
  padding: 0 2rem !important;
}

.ffa-sidebar .accordion-collapse,
.ffa-sidebar .accordion-button {
  transition: none !important;
}

.ffa-sidebar .ffa-accordion .accordion-item{
  border: 0 !important;
}

/* titre accordion */
.ffa-sidebar .ffa-accordion .accordion-button{
  color: var(--white) !important;
  font-weight: 700;
  padding: 1rem;
  border-radius: 0;
  text-transform: uppercase;
  box-shadow: none !important;
}

/* chevron bootstrap en clair */
.ffa-sidebar .ffa-accordion .accordion-button::after{
  filter: invert(1) brightness(2);
  opacity: .85;
}

/* icônes titres */
.ffa-sidebar .sidebar-icon{
  width: 1.6rem;
  margin-right: .6rem;
  color: var(--white);
  opacity: .95;
}

/* ===============================
   Sous-items (input_task_button)
================================ */
.ffa-sidebar .sidebar-group{
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 0 .75rem .5rem;
}

.ffa-sidebar .sidebar-item.btn{
  width: 100%;
  text-align: left;
  background: transparent !important;
  border: 1px solid transparent !important;
  padding: .55rem .75rem;
  border-radius: .6rem;
  color: var(--accent) !important;
  font-weight: 600;
}

.ffa-sidebar .sidebar-item.btn:hover{
  color: var(--white) !important;
}

/* focus clavier */
.ffa-sidebar .sidebar-item.btn:focus{
  box-shadow: 0 0 0 .2rem var(--focus) !important;
}


/* =========================================================
   SIDEBAR ATHLETES LANCER MARTEAU
   ========================================================= */

.sidebar-athletes {
  background: #f7f8fb;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  overflow-y: auto;
  min-height: 0;
}

.athlete-panel {
  background: #fff;
  border: 1px solid #e6eaf2;
  border-radius: 12px;
  overflow: visible;
}

.athlete-panel-1 {
  border-left: 4px solid #ff4d52;
}

.athlete-panel-2 {
  border-left: 4px solid #0d2366;
}

.athlete-panel-header {
  padding: 8px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #667085;
  background: #f8fafc;
  border-bottom: 1px solid #edf1f7;
}

.athlete-panel-body {
  padding: 8px 10px 6px 10px;
  overflow: visible;
}

.athlete-separator {
  height: 1px;
  background: #e9edf5;
  margin: 2px 4px;
  border-radius: 999px;
}

/* ===== Inputs ===== */

.athlete-panel .shiny-input-container,
.athlete-panel .form-group {
  margin-bottom: 7px !important;
}

.athlete-panel .control-label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475467;
}

.athlete-panel .selectize-control {
  margin-bottom: 0 !important;
}

.athlete-panel .selectize-input,
.athlete-panel .selectize-control.single .selectize-input {
  min-height: 34px;
  padding: 6px 30px 6px 9px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  box-shadow: none !important;
  font-size: 0.83rem;
}

.athlete-panel .selectize-input:hover {
  border-color: #c5cfdd;
}

.athlete-panel .selectize-input.focus,
.athlete-panel .selectize-input.dropdown-active,
.athlete-panel .selectize-control.single.focus .selectize-input {
  border-color: #0d2366;
  box-shadow: none !important;
}

.athlete-panel .selectize-dropdown {
  border: 1px solid #d7deea;
  border-radius: 8px;
  overflow-y: auto;
  max-height: 220px;
}

.athlete-panel .selectize-dropdown .option {
  padding: 7px 9px;
  font-size: 0.83rem;
}

.athlete-panel .selectize-dropdown .option.active {
  background: #f1f5fb;
  color: #0d2366;
}

/* ===== Sidebar bslib : scroll autorisé ===== */

.bslib-sidebar-layout > .sidebar {
  min-height: 0;
  overflow-y: auto;
}

/* ===== Mobile ===== */

@media (max-width: 767.98px) {
  .sidebar-athletes {
    padding: 8px;
    gap: 8px;
  }

  .athlete-panel-header {
    font-size: 0.72rem;
    padding: 7px 9px;
  }

  .athlete-panel-body {
    padding: 7px 9px 5px 9px;
  }

  .athlete-panel .control-label {
    font-size: 0.72rem;
  }

  .athlete-panel .selectize-input,
  .athlete-panel .selectize-control.single .selectize-input {
    min-height: 32px;
    font-size: 0.8rem;
  }
}