/*
 * DAM Marine — « Mon garage » (garage.js).
 * Même rendu dans la fenêtre de recherche et sur la page de résultats.
 * Le panneau s'ouvre en ligne sous la barre : pas de superposition à gérer.
 */
.damsearch-garage {
  --dsg-navy: #0b2c5d;
  --dsg-muted: #5f6f8c;
  --dsg-line: #dce3ee;
  margin: 0 0 14px;
  color: #0c192a;
  font-size: 14px;
  line-height: 1.4;
}
.damsearch-garage *,
.damsearch-garage *::before,
.damsearch-garage *::after { box-sizing: border-box; }
.damsearch-garage [hidden] { display: none !important; }
.damsearch-garage .dsg-svg { display: block; width: 1em; height: 1em; }

.damsearch-garage .dsg {
  border: 1px solid var(--dsg-line);
  border-radius: 12px;
  background: #fff;
}
.damsearch-garage .dsg-bar { display: flex; align-items: center; }
.damsearch-garage .dsg-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 8px 18px 8px 10px;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.damsearch-garage .dsg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--dsg-navy);
  background: #e9eef6;
  font-size: 22px;
}
.damsearch-garage .dsg-has-active .dsg-icon { color: #fff; background: var(--dsg-navy); }
.damsearch-garage .dsg-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.damsearch-garage .dsg-label {
  color: var(--dsg-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.damsearch-garage .dsg-value {
  overflow: hidden;
  color: var(--dsg-navy);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.damsearch-garage .dsg-action {
  flex: 0 0 auto;
  color: var(--dsg-navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.damsearch-garage .dsg-toggle:hover .dsg-action { color: #021f4d; }
/* Turns the engine filter off; distinct from removing it from the garage. */
.damsearch-garage .dsg-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  margin: 0 6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--dsg-muted);
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}
.damsearch-garage .dsg-clear:hover { color: var(--dsg-navy); background: #eef2f8; }

.damsearch-garage .dsg-panel { padding: 4px 18px 16px; border-top: 1px solid var(--dsg-line); }
.damsearch-garage .dsg-hint { margin: 10px 0 8px; color: var(--dsg-muted); font-size: 13px; }
.damsearch-garage .dsg-note { margin: 12px 0 0; color: var(--dsg-muted); font-size: 12px; }
.damsearch-garage .dsg-list { margin: 0; padding: 0; list-style: none; }
.damsearch-garage .dsg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #eef2f7;
}
.damsearch-garage .dsg-row:last-child { border-bottom: 0; }
.damsearch-garage .dsg-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}
.damsearch-garage .dsg-pick { min-height: 44px; }
.damsearch-garage .dsg-pick input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: var(--dsg-navy); }
.damsearch-garage .dsg-name { display: flex; flex-direction: column; min-width: 0; color: #0c192a; font-weight: 600; overflow-wrap: anywhere; }
.damsearch-garage .dsg-views { color: var(--dsg-muted); font-size: 12px; font-weight: 400; }
.damsearch-garage .dsg-open { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 0 6px; color: var(--dsg-navy); font-size: 13px; font-weight: 600; }
.damsearch-garage .dsg-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--dsg-muted);
  background: transparent;
  font-size: 16px;
  cursor: pointer;
}
.damsearch-garage .dsg-remove:hover { color: #a52b26; background: #fbeeee; }

.damsearch-garage .dsg-search { margin-top: 14px; }
.damsearch-garage .dsg-search-label { display: block; margin: 0 0 6px; text-align: left; color: var(--dsg-navy); font-size: 13px; font-weight: 700; }
.damsearch-garage .dsg-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--dsg-line);
  border-radius: 6px;
  color: #0c192a;
  background: #fff;
  font: inherit;
}
.damsearch-garage .dsg-input:focus { border-color: var(--dsg-navy); outline: 0; box-shadow: 0 0 0 3px rgb(11 44 93 / 12%); }
.damsearch-garage .dsg-results { margin: 6px 0 0; padding: 0; list-style: none; }
.damsearch-garage .dsg-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.damsearch-garage .dsg-result:hover { background: #f1f4f9; }
.damsearch-garage .dsg-add { flex: 0 0 auto; color: var(--dsg-navy); font-size: 13px; font-weight: 600; }
.damsearch-garage .dsg-empty { padding: 8px 10px; color: var(--dsg-muted); font-size: 13px; }

.damsearch-garage :is(a, button, input):focus-visible { outline: 3px solid var(--dsg-navy); outline-offset: 2px; }

@media (max-width: 639px) {
  /* One compact line: icon, engine name (cut if long), "Modifier", x. */
  .damsearch-garage { margin-bottom: 10px; }
  .damsearch-garage .dsg { border-radius: 10px; }
  .damsearch-garage .dsg-toggle { gap: 10px; min-height: 48px; padding: 4px 8px 4px 6px; border-radius: 10px; }
  .damsearch-garage .dsg-icon { width: 34px; height: 34px; font-size: 19px; }
  /* The "MON MOTEUR" caption goes; screen readers still get it. */
  .damsearch-garage .dsg-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .damsearch-garage .dsg-value { font-size: 14px; }
  .damsearch-garage .dsg-action { padding: 10px 4px; }
  .damsearch-garage .dsg-clear { margin-right: 2px; }
  .damsearch-garage .dsg-panel { padding: 4px 12px 14px; }
  .damsearch-garage .dsg-input { height: 44px; font-size: 16px; }
}
