/* Market V19 — une carte à deux rangées, sans collisions sur téléphone.
   Feuille volontairement séparée des styles historiques (chargée en dernier). */
#page-marche .player-list { display:grid; gap:9px; min-width:0; }
#page-marche .market-card {
  display:grid!important;
  grid-template-columns:50px minmax(0,1fr) max-content;
  grid-template-areas:"portrait person price" "metrics metrics actions" "status status status";
  gap:8px 11px!important;
  align-items:center;
  min-width:0; width:100%; max-width:100%;
  padding:11px 12px!important;
  border-radius:14px;
  box-sizing:border-box;
}
#page-marche .market-card .market-portrait {
  grid-area:portrait; display:grid; grid-template-rows:1fr auto;
  align-items:center;justify-items:center;
  width:50px;min-width:0;height:59px;
  padding:4px 3px;box-sizing:border-box;
  border-radius:12px;
}
#page-marche .market-card .market-portrait>span {font-size:23px;line-height:1.1;}
#page-marche .market-card .market-portrait small {
  display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap;font-size:10px;line-height:1.1;
}
#page-marche .market-card .market-person {
  grid-area:person;flex:initial;min-width:0;width:100%;
  display:flex;flex-direction:column;gap:3px;
  overflow-wrap:anywhere;
}
#page-marche .market-card .market-person>strong {
  display:-webkit-box!important; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  max-width:100%;font-size:14px!important;line-height:1.15;
  white-space:normal!important;overflow:hidden;text-overflow:ellipsis;
  overflow-wrap:anywhere;
}
#page-marche .market-card .market-person>span {
  display:block;max-width:100%;margin:0;
  font-size:11px!important;line-height:1.25;
  overflow:hidden;text-overflow:ellipsis;
}
#page-marche .market-card .market-person>.market-club {
  white-space:nowrap;
}
#page-marche .market-card .market-person>.market-opponent {
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  white-space:normal;overflow-wrap:anywhere;
  font-size:10px!important;line-height:1.25;
}
#page-marche .market-card .market-price {
  grid-area:price; display:flex;flex-direction:column;
  align-items:flex-end;gap:2px;
  min-width:64px;width:auto;text-align:right;
  align-self:start;padding-top:3px;
}
#page-marche .market-card .market-price strong {
  font:850 18px/1.2 'Outfit',system-ui,sans-serif!important;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
#page-marche .market-card .market-price strong small {font-size:10px!important;}
#page-marche .market-card .market-price span {
  display:block;font-size:10px;white-space:nowrap;
}
#page-marche .market-card .market-metrics {
  grid-area:metrics;
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;align-items:start;justify-self:stretch;width:100%;min-width:0;
}
#page-marche .market-card .market-metrics>div {
  display:flex;flex-direction:column;gap:1px;min-width:0;text-align:left;
}
#page-marche .market-card .market-metrics strong {
  font:850 18px/1.15 'Outfit',system-ui,sans-serif!important;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
#page-marche .market-card .market-metrics small {
  font-size:10px!important;line-height:1.3;white-space:normal;
}
#page-marche .market-card .market-yield {display:flex!important;}
#page-marche .market-card .market-actions {
  grid-area:actions;display:flex;align-items:center;
  justify-content:flex-end;gap:6px;margin:0;min-width:0;
}
#page-marche .market-card .market-actions .profile-view {
  min-height:36px;min-width:48px;padding:6px 8px;font-size:11px;
  font-weight:800;border-radius:9px;
}
#page-marche .market-card .market-actions .add {
  display:grid;place-items:center;
  width:38px;min-width:38px;height:36px;
  padding:0;border-radius:9px;font-size:20px;
}
#page-marche .market-card .market-status {
  grid-area:status;display:block;justify-self:start;
  margin:0;padding:2px 8px;
  border-radius:6px;background:#f1f5f7;color:#536978;
  font-size:10px;font-weight:750;line-height:1.35;
}
#page-marche .market-card .market-status.is-selected {
  background:#e8f5e3;color:#326a3f;
}
#page-marche .market-card .market-status.is-blocked {
  background:#fff2e6;color:#89532d;
}
#page-marche .market-card.market-blocked {
  background:#fff!important;border-color:#dbe5e7!important;
  opacity:1!important;filter:none!important;
}
#page-marche .market-card.market-blocked .market-person,
#page-marche .market-card.market-blocked .market-metrics,
#page-marche .market-card.market-blocked .market-price {
  color:inherit!important;opacity:1!important;filter:none!important;
}
#page-marche .market-card.market-blocked .market-actions .add:disabled {
  background:#e9eef1!important;border:1px solid #d3dee3!important;
  color:#768b95!important;opacity:1!important;cursor:not-allowed;
}
#page-marche .market-card.market-bench-only .market-portrait {
  background:linear-gradient(145deg,var(--club-accent,#dffa80),var(--club-accent-2,#5e8759))!important;
  color:var(--club-dark,#19323d)!important;filter:none!important;opacity:1!important;
}
#page-marche .market-card .market-form {display:none!important;}
#page-marche .market-card button:focus-visible,
#page-marche .market-quick-positions button:focus-visible {
  outline:3px solid #5eaa58;outline-offset:2px;
}
/* Petits filtres d'accès direct : le select classique reste disponible. */
#page-marche .market-quick-positions {
  display:flex;flex-wrap:wrap;gap:6px;
  margin:5px 0 7px;min-width:0;
}
#page-marche .market-quick-positions[hidden] {display:none!important;}
#page-marche .market-quick-positions button {
  appearance:none;border:1px solid #d2dedc;border-radius:20px;
  background:#fff;color:#45616a;padding:6px 11px;
  font:800 11px/1.25 'DM Sans',system-ui,sans-serif;
  cursor:pointer;white-space:nowrap;min-height:31px;
}
#page-marche .market-quick-positions button[aria-pressed="true"] {
  background:#27623e;color:#fff;border-color:#27623e;
}
#page-marche .market-budget-notice b#market-team-context {
  font-weight:900;color:#2b6541;
}
#page-marche .market-budget-notice span {letter-spacing:.3px;}
#page-marche .market-budget-notice strong {font-variant-numeric:tabular-nums;}
@media(min-width:1100px) {
 #page-marche .market-card {
  grid-template-columns:52px minmax(170px,1fr) minmax(175px,230px) 83px 100px;
  grid-template-areas:"portrait person metrics price actions" "status status status status status";
 }
 #page-marche .market-card .market-status {margin-top:-5px;}
}
@media(max-width:600px) {
 #page-marche .market-budget-notice {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-rows:auto auto!important;
  gap:1px 8px!important;
  min-height:55px!important;
  padding:7px 11px!important;
  margin:2px 0 7px!important;
  border-radius:12px!important;
  top:54px!important;
 }
 #page-marche .market-budget-notice span {
  grid-column:1!important;grid-row:1!important;
  width:auto!important;font-size:10px!important;
 }
 #page-marche .market-budget-notice strong {
  grid-column:1!important;grid-row:2!important;
  font-size:21px!important;line-height:1.2!important;
  margin:0!important;
 }
 #page-marche .market-budget-notice button {
  grid-column:2!important;grid-row:1/span 2!important;
  font-size:11px!important;min-height:38px;
  padding:5px 6px!important;
 }
 #page-marche .market-refinements {
  padding:7px 9px;margin:0 0 8px;
 }
 #page-marche .market-refinements >span {display:none;}
 #page-marche .market-card .market-person>strong {font-size:14px!important;}
}
@media(max-width:370px) {
 #page-marche .market-card {
  grid-template-columns:43px minmax(0,1fr) max-content;
  gap:7px 8px!important;padding:9px!important;
 }
 #page-marche .market-card .market-portrait {width:43px;height:55px;}
 #page-marche .market-card .market-price {min-width:57px;}
 #page-marche .market-card .market-price strong {font-size:16px!important;}
 #page-marche .market-card .market-metrics {gap:5px;}
 #page-marche .market-card .market-metrics strong {font-size:16px!important;}
 #page-marche .market-card .market-metrics small {font-size:9px!important;}
 #page-marche .market-card .market-actions .profile-view {min-width:43px;padding:5px;}
 #page-marche .market-card .market-actions .add {width:33px;min-width:33px;}
 #page-marche .market-quick-positions button {padding:6px 8px;font-size:10px;}
}


/* V20 : la carte entière mène à la fiche, un seul bouton d'action reste visible. */
#page-marche .market-card {cursor:pointer;}
#page-marche .market-card .market-actions {
 position:relative;z-index:3;
}
#page-marche .market-card .market-actions .add {
 width:44px;min-width:44px;height:42px;
 border-radius:11px;font-size:24px;
}
#page-marche .market-card .market-actions .market-trade-trigger {
 background:#e5f3e9;color:#246c42;border:1px solid #85c29a;
 font-weight:900;line-height:1;
}
#page-marche .market-card .market-actions .market-trade-trigger:hover {
 background:#d7efd9;
}
#page-marche .market-card .market-card-open {
 position:absolute;inset:0;width:100%;height:100%;
 z-index:1;border:0;border-radius:inherit;padding:0;margin:0;
 display:block;opacity:0;background:transparent;cursor:pointer;
}
#page-marche .market-card .market-card-open:focus-visible {
 opacity:1;outline:3px solid #428b60;outline-offset:-3px;
}
#page-marche .market-card:focus-within {border-color:#5aa171;}
#page-marche .market-card .market-status {user-select:none;}
#page-marche .market-card.market-blocked .market-actions .market-trade-trigger {
 color:#246c42!important;border-color:#85c29a!important;background:#e5f3e9!important;
 cursor:pointer!important;opacity:1!important;transform:none!important;
}
@media(max-width:370px) {
 #page-marche .market-card .market-actions .add {
  width:39px;min-width:39px;height:39px;font-size:22px;
 }
}
/* Prévisualisation et confirmation d'un échange, sans changement prématuré. */
#swap-overlay .swap-dialog {
 width:min(520px,calc(100vw - 22px));
 max-height:min(83dvh,760px);overflow:auto;
 box-sizing:border-box;
}
#swap-overlay .market-trade-choice {
 width:100%;min-width:0;text-align:left;display:flex;align-items:center;
 gap:10px;padding:11px;border-radius:11px;
}
#swap-overlay .market-trade-choice .market-trade-person {
 flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;
}
#swap-overlay .market-trade-choice .market-trade-person strong {
 white-space:normal;overflow-wrap:anywhere;line-height:1.25;
}
#swap-overlay .market-trade-choice .market-trade-person small {
 white-space:normal;line-height:1.3;
}
#swap-overlay .market-trade-choice:disabled {
 opacity:1!important;cursor:not-allowed;
 background:#f4f6f7;color:#647987;border:1px solid #e2e8e9;
}
#swap-overlay .market-trade-choice .trade-ok {color:#347348;font-weight:750;}
#swap-overlay .market-trade-choice .trade-block {color:#915535;font-weight:700;}
#swap-overlay .market-trade-hint {
 margin:12px 0 0;color:#577081;font-size:11px;line-height:1.5;
}
#swap-overlay .market-trade-preview {display:grid;gap:10px;}
#swap-overlay .market-trade-preview>span {
 display:flex;flex-direction:column;gap:4px;padding:12px;
 border:1px solid #dce7e4;border-radius:11px;
 color:#607989;font-size:11px;
}
#swap-overlay .market-trade-preview>span strong {font-size:16px;color:#18384a;}
#swap-overlay .market-trade-preview>span small {font-size:11px;color:#577081;}
#swap-overlay .market-trade-finance {
 display:grid;gap:8px;border-radius:10px;
 background:#eaf5ea;padding:12px;
}
#swap-overlay .market-trade-finance>span {
 display:flex;align-items:center;justify-content:space-between;
 gap:10px;font-size:12px;color:#2d6340;
}
#swap-overlay .market-trade-finance strong {font-size:14px;white-space:nowrap;}
#swap-overlay .market-trade-confirm-actions {
 display:grid;grid-template-columns:1fr 1.6fr;gap:8px;margin-top:15px;
}
#swap-overlay .market-trade-confirm-actions button {
 min-height:45px;border-radius:10px;padding:9px 12px;
 border:1px solid #c9d8d4;background:#fff;color:#294c55;
 font:800 12px/1.3 'DM Sans',system-ui,sans-serif;cursor:pointer;
}
#swap-overlay .market-trade-confirm-actions #market-trade-confirm {
 background:#22633e;color:#fff;border-color:#22633e;
}
@media(max-width:430px) {
 #swap-overlay .swap-dialog {padding:18px 15px;}
 #swap-overlay .market-trade-choice {gap:7px;padding:9px;}
}
