/* =========================================================
   Bridge Deal Manager – Builder Styles (Restored & Fixed)
   ========================================================= */

.page-id-8547,
.page-id-4182{ background: #fff; }
.page-id-8547 .entry-header, .page-id-8547 .site-header,
.page-id-4182 .entry-header, .page-id-4182 .site-header{ display: none !important; }
.page-id-8547 .site-content,
.page-id-4182 .site-content{
	padding-top: 0 !important;
}
.page-id-8547 .content-area,
.page-id-4182 .content-area {
    padding-top: 0 !important;
}

/* Container */
.bdm-builder {
  color: var(--color-blue-primary);
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 0;
	padding-top: 100px;
}
.bdm-builder input[type="text"]:focus{ box-shadow: none; border: none; }

/* Header */
.bdm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px 10px;
    border-radius: 0;
    padding: 16px 20px;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid #E5E7EB;
    background: #fff;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1400px;
    z-index: 200;
}

.bdm-header__right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.bdm-header__left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bdm-header__logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.bdm-header__title { margin: 0; padding: 0; font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--color-blue-primary); }

/* Buttons */
.bdm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 24px; padding: 10px 16px; font-weight: 700; font-size: 15px;
  cursor: pointer; border: none; transition: all 0.15s ease; line-height: 1.2; background: none; gap:4px;
}
.bdm-btn--primary {
    background: var(--color-blue-primary); color: #fff; border-radius: 24px; padding: 12px 34px; position: relative;
}
.bdm-btn--primary:hover { opacity: 0.9; color: #fff !important;}
.bdm-btn--primary.bdm-btn--danger { background: var(--color-red-primary); }

.bdm-btn--light { color: #8A92A6; font-weight: 600; }
.bdm-btn--light:focus, .bdm-btn--light:hover { color: var(--color-blue-primary); background: #F3F4F6 !important; box-shadow: none !important; }

.bdm-btn--text-muted { color: var(--color-blue-primary); font-weight: 600; }
.bdm-btn--text-muted:hover, .bdm-btn--text-muted:focus { color: var(--color-blue-primary); background: #F3F4F6 !important; }

.bdm-btn--text-dark { color: var(--color-blue-primary); font-weight: 700; }
.bdm-btn--text-dark:hover, .bdm-btn--text-dark:focus { background: #F3F4F6 !important; }

.bdm-btn--icon { width: 42px; height: 42px; border-radius: 10px; font-size: 22px; line-height: 1; color: #8A92A6; background: none !important; border: none !important; box-shadow: none !important; }
.bdm-btn--icon:focus, .bdm-btn--icon:hover { background: #F3F4F6 !important; color: var(--color-blue-primary) !important; border: none !important; box-shadow: none !important; }

/* Save spinner */
.bdm-save__spinner {
  display: inline-block; position: absolute; left: 8px; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%;
  animation: bdm-spin 1s linear infinite; opacity: 0; transition: opacity 0.2s ease;
}
.bdm-btn--loading .bdm-save__spinner { opacity: 1; }
@keyframes bdm-spin { to { transform: rotate(360deg); } }

/* 3-dots menu */
.bdm-menu { position: relative; }
.bdm-menu__dropdown {
  position: absolute; right: 0; top: 46px; min-width: 220px; background: #fff;
  border: 1px solid #dfe7fb; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 6px; display: none; z-index: 50;
}
.bdm-menu__item {
  width: 100%; text-align: left; background: none; border: none; padding: 10px 12px;
  border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--color-blue-primary);
  font-size: 14px; line-height: 1.3; display: flex; gap: 4px; align-items: center;
}
.bdm-menu__item:focus, .bdm-menu__item:hover { color: var(--color-blue-60); background: #F3F4F6 !important; box-shadow: none !important; }
.bdm-menu__item--danger { color: var(--color-red-primary); }
.bdm-menu__item--danger:hover { color: var(--color-red-secondary); background: #FFF0F0 !important; }
.bdm-menu__separator { height: 1px; background: #E5E7EB; margin: 6px 0; }

/* Title & Tags */
.bdm-title-row { display: flex; flex-direction: column; gap: 10px; padding-bottom: 18px; }
.bdm-title-field { position: relative; flex: 1; display: flex; align-items: center; }
.bdm-title-input {
  flex: 1; border: 0; background: transparent; height: auto; border-radius: 16px;
  padding: 12px 140px 12px 16px; font-size: 40px; font-weight: 800;
  color: var(--color-blue-primary); margin: 0; line-height: 1.2;
}
.bdm-title-input:focus{ box-shadow: none !important; outline: none; }
.bdm-title-input::placeholder { color: #94a3b8; font-weight: 700; }
.bdm-title-hint {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: 14px; color: var(--color-blue-primary); opacity: 0.4; pointer-events: none; user-select: none;
}

/* Tags */
.bdm-tags { display: flex; align-items: center; gap: 10px; justify-content: flex-start; margin-left: 5px; }
.bdm-link {
  background: none; border: none; border-radius: 0; color: var(--color-blue-primary);
  font-weight: 700; cursor: pointer; display: inline-flex; align-items: center;
  gap: 6px; font-size: 15px; transition: color 0.15s ease; text-decoration: none; padding: 8px 0;
}
.bdm-link:focus, .bdm-link:hover { color: var(--color-blue-60); border: none !important; background: none !important; box-shadow: none !important; }
.bdm-link i { color: var(--color-blue-60); }
.bdm-tags__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 0px; margin-left: 24px; }
.bdm-tag-pill { background: #eef3ff; border: 1px solid #cfe0ff; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--color-blue-primary); }
.bdm-tag-remove { margin-left: 6px; cursor: pointer; color: var(--color-red-primary); font-weight: bold; }

/* === MODALS (Structure de base) === */
.bdm-modal {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(0px); background: rgba(9, 20, 56, 0.4); z-index: 9999;
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, visibility 0.25s ease;
}
.bdm-modal.is-active, .bdm-modal.is-open {
  display: flex; opacity: 1; visibility: visible; pointer-events: auto;
}
.bdm-modal h3{ font-size: 20px; }

.bdm-modal__dialog {
  width: min(680px, 92vw); background: #fff; border-radius: 16px; border: 1px solid #dfe7fb;
  padding: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12); position: relative; margin-top: 0;
}

/* === CROIX DE FERMETURE UNIFORMISÉE (Toutes les modales + Onboarding) === */
.bdm-modal__close,
.bdm-onboarding__close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s ease;
}

.bdm-modal__close i,
.bdm-onboarding__close i {
    color: var(--color-blue-primary);
    font-size: 16px;
    transition: transform 0.2s ease, color 0.2s ease;
}

.bdm-modal__close:hover,
.bdm-modal__close:focus,
.bdm-onboarding__close:hover,
.bdm-onboarding__close:focus {
    background: #e2e8f0;
    box-shadow: none !important;
    outline: none;
}

.bdm-modal__close:hover i,
.bdm-modal__close:focus i,
.bdm-onboarding__close:hover i,
.bdm-onboarding__close:focus i {
    color: #0f172a;
    transform: rotate(90deg);
}

.bdm-modal__actions { display: flex; gap: 8px; margin-top: 12px; }

/* Upload zone */
.bdm-upload { border: 2px dashed #cfe0ff; border-radius: 12px; padding: 26px; text-align: center; background: #f7faff; margin-bottom: 10px; }
.bdm-upload input[type="file"] { display: none; }
.bdm-upload label { display: block; color: var(--color-blue-primary); font-weight: 700; cursor: pointer; font-size: 15px; }
.bdm-modal__feedback { margin-top: 10px; color: var(--color-blue-primary); font-weight: 700; }

/* Notification */
.bdm-notice { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #84b797; color: #000; padding: 14px 24px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease; z-index: 9999; }
.bdm-notice.show { opacity: 1; transform: translate(-50%, 0); }

/* GRID GLOBAL */
.bdm-grid{
  display:grid; 
  grid-template-columns: 1fr 1fr; 
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
        "deal settings"
        "deal auctions"
        "deal lead"
        "deal comments"
        "deal public-note"
        "deal private";
	gap:0; background:#fff; border-radius:16px; overflow:hidden;
  
}
.bdm-panel--deal { grid-area: deal; }
.bdm-panel--settings { grid-area: settings; }
.bdm-panel--auctions { grid-area: auctions; }
.bdm-panel--comments { grid-area: comments; }
.bdm-panel--private  { grid-area: private; }
.bdm-panel--lead { grid-area: lead; }
.bdm-panel--public-note { grid-area: public-note; }
.bdm-panel{ padding:20px; border-bottom:1px solid #e2e8ff; }

/* COLONNE GAUCHE */
.bdm-panel--deal { background: #5d8fe4; color: #fff; padding: 16px; border-right: 1px solid #e2e8ff; border-bottom: none; }
.bdm-panel__header { display: flex; align-items: center; margin-bottom: 10px; }
.bdm-panel__title { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 8px;  margin-bottom: 0; }
.bdm-panel--deal .bdm-panel__title { color: #fff; }
.bdm-help-btn { background: none; border: none; color: inherit; opacity: 0.75; cursor: pointer; font-size: 16px; padding: 0; }
.bdm-help-btn:hover, .bdm-help-btn:focus { opacity: 1; color: var(--color-blue-primary); box-shadow: none; background: none !important }
.bdm-panel--deal .bdm-help-btn:hover, .bdm-panel--deal .bdm-help-btn:focus { color: #fff; }

/* DEAL LAYOUT */
.bdm-deal-layout { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; gap: 16px; justify-items: center; align-items: stretch; margin-top: 16px; }
.bdm-player.north { grid-column: 2; grid-row: 1; }
.bdm-player.east  { grid-column: 3; grid-row: 2; }
.bdm-player.south { grid-column: 2; grid-row: 3; }
.bdm-player.west  { grid-column: 1; grid-row: 2; }
.bdm-table        { grid-column: 2; grid-row: 2; }
.bdm-table { width: 100%; height: 100%; min-height: 260px; background: #dfe7fb; border: 1px solid #cfe0ff; border-radius: 14px; }

/* PLAYER BOX */
.bdm-player { display: flex; flex-direction: column; justify-content: flex-start; background: #d7e7ff; border: 1px solid #cfe0ff; border-radius: 14px; padding: 10px; width: 260px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05) inset; color: var(--color-blue-primary); }
.bdm-player__title { text-align: center; font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.bdm-player__namebar { display: flex; align-items: center; gap: 0px; background: #f6f9ff; border: 1px solid #cfe0ff; border-radius: 10px; padding: 0px 8px; margin-bottom: 8px; }
.bdm-player__namebar-icon { color: #90a8e6; font-size: 14px; }
.bdm-input--name { flex: 1; border: none; background: transparent; outline: none; color: var(--color-blue-primary); font-size: 16px; font-weight:500; padding: 0 0 0 12px; max-width: 165px; }
.bdm-player__optional { color: #9bb0da; font-weight: 400; font-size: 11px; }
.bdm-player__cardsbox { background: #fff; border: 1px solid #cfe0ff; border-radius: 10px; padding: 4px 0; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.bdm-suitrow { display: flex; align-items: center; gap: 8px; padding: 2px 6px; border-bottom: 1px solid #eef2ff; }
.bdm-suitrow:last-child { border-bottom: none; }
.bdm-suitrow__sym {  text-align: center; font-size: 16px; }
.bdm-suit--spades .bdm-suitrow__sym { color: #000; }
.bdm-suit--hearts .bdm-suitrow__sym { color: #d02b3b; }
.bdm-suit--diamonds .bdm-suitrow__sym { color: #f28c1a; }
.bdm-suit--clubs .bdm-suitrow__sym { color: #1b7a52; }
.bdm-suitrow__input { flex: 1; border: none; outline: none; background: transparent; color: var(--color-blue-primary); height: 24px; font-size: 18px; font-weight:500; text-transform: uppercase; max-width: 165px; padding: 0; letter-spacing: 0.01em; border-radius: 0; }
.bdm-suitrow__pick { background: #eaf1ff; border: 1px solid #cfe0ff; color: #274eb0; width: 20px; height: 28px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: filter 0.2s ease; padding: 4px 12px; }
.bdm-suitrow__pick:hover { filter: brightness(0.97); }

/* ACTIONS */
.bdm-panel__actions { display: flex; justify-content: space-between; margin-top: 16px; }
.bdm-panel__actions .bdm-btn{ color: var(--color-blue-primary) !important; background: #d7e7ff; }
.bdm-panel__actions .bdm-btn:focus, .bdm-panel__actions .bdm-btn:hover{ background: #fff !important; }
.bdm-panel__actions .bdm-btn.transparent, .bdm-panel__actions .bdm-btn.transparent:focus, .bdm-panel__actions .bdm-btn.transparent:hover{ background: none !important; color: #d7e7ff !important; }

.bdm-input-error { border-bottom: 2px solid #e63946 !important; background: #ffecec !important; }
.bdm-toast--error { background: #fbeaea; color: #b3261e; border: 1px solid #f5c2c2; }

/* CARD PICKER MODAL */
.bdm-card-picker__dialog { max-width: 400px; text-align: center; padding: 24px 28px; }
.bdm-card-picker__title { font-size: 18px; font-weight: 700; color: var(--color-blue-primary); margin-bottom: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#bdm-card-picker-suit-symbol { font-size: 22px; }
.bdm-card-picker__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; justify-items: center; margin-bottom: 20px; }
.bdm-card-picker__btn { width: 44px; height: 36px; border-radius: 8px; border: 1px solid #cfe0ff; background: #fff; font-weight: 700; color: var(--color-blue-primary); cursor: pointer; transition: all 0.2s ease; padding: 0; }
.bdm-card-picker__btn:hover { background: #f0f5ff; }
.bdm-card-picker__btn.is-selected { background: var(--color-blue-primary); color: #fff; border-color: var(--color-blue-primary); }
.bdm-card-picker__actions { display: flex; justify-content: flex-end; gap: 8px; }
#bdm-card-picker[data-suit="spades"] #bdm-card-picker-suit-symbol { color:#000; }
#bdm-card-picker[data-suit="hearts"] #bdm-card-picker-suit-symbol { color:#d02b3b; }
#bdm-card-picker[data-suit="diamonds"] #bdm-card-picker-suit-symbol { color:#f28c1a; }
#bdm-card-picker[data-suit="clubs"] #bdm-card-picker-suit-symbol { color:#1b7a52; }
.bdm-card-picker__btn:hover:not(:disabled) { transform: scale(1.05); background: var(--color-blue-primary); color: #fff; }
.bdm-card-picker__btn.is-disabled { background: #f2f4f8; color: #b5b9c5; cursor: not-allowed; opacity: 0.6; }

.bdm-card-picker__grid .card {
    width: 44px;
    height: 60px;
    border-radius: 4px;
    border: 1px solid #cfe0ff;
    background: #fff;
    font-weight: 700;
    color: var(--color-blue-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.bdm-card-picker__grid .card .rank { font-size: 1.2em; }
.bdm-card-picker__grid .card .suit { font-size: 1.1em; }

.bdm-card-picker__grid .card.spades { color: #000; }
.bdm-card-picker__grid .card.hearts { color: #d02b3b; }
.bdm-card-picker__grid .card.diamonds { color: #f28c1a; }
.bdm-card-picker__grid .card.clubs { color: #1b7a52; }

.bdm-card-picker__grid .card:hover:not(.is-disabled) {
    transform: scale(1.05);
    border-color: var(--color-blue-primary);
}

.bdm-card-picker__grid .card.is-selected {
    background: var(--color-blue-primary);
    color: #fff;
    border-color: var(--color-blue-primary);
}

.bdm-card-picker__grid .card.is-disabled {
    background: #f2f4f8;
    color: #b5b9c5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Highlight */
@keyframes bdmInputPulse { 0% { background-color: #c2e9c3; } 100% { background-color: #fff; } }
.bdm-input-flash { animation: bdmInputPulse 0.8s ease-out; }

/* Player Count */
.bdm-player__header { display: flex; justify-content: space-between; align-items: center; }
.bdm-player__count { font-size: 12px; color: #4263c2; opacity: 0.8; font-weight: 600; }
.bdm-player__count--full { color: #d02b3b; font-weight: 700; }

/* SETTINGS & AUCTIONS Panels */
.bdm-settings-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.bdm-field label{ font-size:14px; font-weight:700; color:var(--color-blue-primary); display:block; margin-bottom:4px; }
.bdm-field select{ width:100%; padding:8px; border-radius:8px; border:1px solid #cfe0ff; background:#fff; }
.bdm-panel--settings, .bdm-panel--auctions, .bdm-panel--comments, .bdm-panel--public-note, .bdm-panel--private, .bdm-panel--lead{ background:#bcd4fb; color:#0b2a5b; }
.bdm-auctions-body{ margin-top:10px; }
.bdm-auctions-header{ font-weight:800; font-size:18px; text-align:center; margin-bottom:6px; }
.bdm-panel--comments textarea, .bdm-panel--private textarea{ width:100%; height:84px; border-radius:10px; border:1px solid #cfe0ff; padding:10px; resize:none; background:#fff; }

/* HELP MODAL CONTENT */
.bdm-help-modal__content h3{ font-size:20px; font-weight:700; color:var(--color-blue-primary); margin-bottom:8px; }
.bdm-help-modal__content p{ font-size:16px; line-height:1.5; color:var(--color-blue-primary); opacity:.85; }

/* AUCTIONS SPECIFIC */
.bdm-auctions { background: #cce2f6; padding: 1rem; border-radius: 8px; margin-bottom: 2rem; }
.bdm-auctions__table { margin-top: 1rem; background: #E1EDFA; border-radius: 6px; overflow: visible; }
.bdm-auctions__body{ padding: 0.4rem; }
.bdm-auctions__header, .bdm-auctions__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin-bottom: 6px; }
.bdm-auctions__header{ background: #fff; padding:8px 0px; border-radius: 6px; }
.bdm-auctions__header div { font-weight: bold; font-size: 1.1rem; }
.bdm-auctions__cell { background: white; padding: 0.4rem; border-radius: 4px; font-weight: bold; min-height: 2.2rem; display: flex; align-items: center; justify-content: center; }
.bdm-bidcontent{ font-weight: 800; }
.bdm-auctions__cell.is-pass { color: green; }
.bdm-auctions__cell.is-x { color: red; }
.bdm-auctions__cell.is-xx { color: blue; }
.bdm-auctions__cell.is-q { color: orange; }
.bdm-auctions__controls { margin-top: 1rem; display: flex; gap: 1rem; }
#bdm-btn-reset-auction,
#bdm-btn-undo{ color: var(--color-blue-primary); }
bdm-btn-reset-auction:hover,
#bdm-btn-undo:hover{ color: #fff }

/* === AUCTION TOGGLES (SILENT PLAYERS) === */
.bdm-auctions__toggles { display: flex; gap: 20px; margin-top: 15px; justify-content: center; }
.bdm-toggle-switch { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
.bdm-toggle-switch input[type="checkbox"] { display: none; }
.bdm-toggle-switch__slider { position: relative; width: 40px; height: 22px; background-color: #ccc; border-radius: 22px; transition: background-color 0.2s; margin-right: 10px; }
.bdm-toggle-switch__slider::before { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background-color: white; top: 2px; left: 2px; transition: transform 0.2s; }
.bdm-toggle-switch input:checked + .bdm-toggle-switch__slider { background-color: var(--color-blue-primary, #0b1a52); }
.bdm-toggle-switch input:checked + .bdm-toggle-switch__slider::before { transform: translateX(18px); }
.bdm-toggle-switch__label { font-weight: 600; color: var(--color-blue-primary); }

/* BID MODAL */
#bdm-bid-modal .bdm-modal__content { background: #fff; padding: 3rem 1rem 1rem; border-radius: 8px; width: 100%; max-width: 600px; position: relative; }
#bdm-bid-modal .bdm-modal__close i { font-size: 16px; }
.bdm-bid-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 1rem; }
.bdm-bid-option { padding: 0.4rem; background: #e7f0fa; border: none; border-radius: 4px; cursor: pointer; font-weight: 800; color: var(--color-blue-primary); font-size:1.2rem; }
.bdm-bid-option:focus, .bdm-bid-option:hover { background: #d1e4f4; color: var(--color-blue-primary); }
.bdm-bid-option.is-disabled { opacity: 0.4; cursor: not-allowed; }
.bdm-bid-actions { display: flex; justify-content: space-between; margin-top: 1rem; }
.bdm-bid-special { flex: 1; margin: 0 5px; padding: 0.5rem; font-weight: bold; border-radius: 4px; border: none; cursor: pointer; }
.bdm-pass { background: #208650 !important; }
.bdm-x { background: #EF4D3E !important; }
.bdm-xx { background: #3860B0 !important; }
.bdm-question { background: #f28c1a !important; }
.bdm-bid-special:hover{ opacity:0.8; }
.bdm-suit { font-weight: 800; }
.suit--spade, .suit--club, .suit--nt { color: #000; }
.suit--heart { color: #d02b3b; }
.suit--diamond { color: #f28c1a; }
.suit--club { color: #1b7a52; }
.bdm-pulse { animation: bdmPulse 180ms ease-out; }
@keyframes bdmPulse { 0% { transform: scale(1); } 50% { transform: scale(0.97); } 100% { transform: scale(1); } }

/* =========================================================
   MENU FLOTTANT & BADGES
   ========================================================= */

.bdm-bidmenu { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.bdm-bidmenu__btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 16px; transition: transform 0.15s ease; }
.bdm-bidmenu__btn:hover { transform: scale(1.15); }
.bdm-bidmenu__alert   { background: #0984e3; }
.bdm-bidmenu__comment { background: #208650; }

.bdm-bidicons { position: absolute; inset: 0; pointer-events: none; }
.bdm-alert, .bdm-comment { position: absolute; width: 18px; height: 18px; border-radius: 3px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; box-shadow: 0 2px 4px rgba(0,0,0,0.2); border: 1px solid #fff; }
.bdm-alert { top: 1px; right: 1px; background: #0984e3; }
.bdm-comment { bottom: 1px; right: 1px; background: #208650; }
.bdm-auctions__cell.has-bid { position: relative; overflow: visible !important; }

/* MODALE COMMENTAIRE */
.bdm-comment-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 10000; }
.bdm-comment-modal.is-open { opacity: 1; pointer-events: all; }
.bdm-comment-modal__content { background: #fff; border-radius: 8px; padding: 20px; width: 320px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); text-align: center; }
.bdm-comment-modal__content h4{ margin-bottom: 0; }
.bdm-comment-modal__bid{ font-weight: 800; }
.bdm-comment-modal__actions{ margin-top: 1rem; display: flex; justify-content: space-between; }
#bdm-comment-text{ display: block; width: 100%; }
#bdm-comment-cancel{ background: #f0f2f5; border: none; color: #333; padding: 8px 16px; border-radius: 4px; }

/* Media Queries */
@media (max-width: 1024px) {
  .bdm-deal-layout { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto auto auto; gap: 12px; }
  .bdm-player.north { grid-column: 1; grid-row: 1; }
  .bdm-player.east  { grid-column: 2; grid-row: 1; }
  .bdm-table        { grid-column: 1 / span 2; grid-row: 2; width: 100%; height: 180px; }
  .bdm-player.west  { grid-column: 1; grid-row: 3; }
  .bdm-player.south { grid-column: 2; grid-row: 3; }
}
@media (max-width: 640px) {
  .bdm-deal-layout { grid-template-columns: 1fr; grid-template-rows: auto; }
  .bdm-player, .bdm-table { width: 100%; }
  .bdm-table { min-height: 160px; }
  .bdm-header { flex-wrap: wrap; gap: 8px; }
  .bdm-header__title { font-size: 20px; font-weight: 800; }
  .bdm-header__right { gap: 6px; }
  .bdm-btn--import, .bdm-btn--display { display: none; }
  .bdm-menu__item--mobile { display: flex !important; align-items: center; gap: 8px; }
}
@media (min-width: 769px) { .bdm-menu__item--mobile { display: none !important; } }

/* STYLE DES ENCHÈRES SPÉCIALES DANS LE TABLEAU */
.bdm-auctions__cell.is-pass,
.bdm-auctions__cell.is-x,
.bdm-auctions__cell.is-xx,
.bdm-auctions__cell.is-q { color: #fff !important; border: none; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.bdm-auctions__cell.is-pass { background-color: #208650 !important; }
.bdm-auctions__cell.is-x    { background-color: #d63031 !important; }
.bdm-auctions__cell.is-xx   { background-color: #0984e3 !important; }
.bdm-auctions__cell.is-q    { background-color: #f28c1a !important; }
.bdm-auctions__cell { font-size: 15px;  line-height: 1; }

/* =========================================================
   STYLE SPECIFIQUE : MODALE "NEW DISPLAY" (STYLE FIGMA)
   ========================================================= */

#bdm-display-modal .bdm-modal__dialog { background-color: #EAF2FA; padding: 40px; border-radius: 16px; max-width: 550px; }
#bdm-display-modal h3 { color: #0b1a52; font-size: 24px; text-align: center; margin-bottom: 5px; display: flex; align-items: center; justify-content: center; gap: 10px; }
#bdm-display-modal .bdm-modal__subtitle { text-align: center; color: #0b1a52; font-size: 18px; font-weight: 600; margin-bottom: 25px; }
.bdm-display-form { display: flex; flex-direction: column; gap: 12px; }
.bdm-display-form label { background: #ffffff; border-radius: 8px; padding: 15px 20px; display: flex; align-items: center; gap: 15px; font-size: 16px; font-weight: 500; color: #0b1a52; cursor: pointer; border: 1px solid transparent; transition: all 0.2s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.bdm-display-form label:hover { border-color: var(--color-blue-primary); transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.08); }
.bdm-display-form input[type="checkbox"] { width: 20px; height: 20px; accent-color: #0b1a52; cursor: pointer; }
#bdm-display-modal .bdm-modal__actions { margin-top: 30px; justify-content: center; gap: 20px; }
#bdm-display-modal .bdm-btn--primary { background-color: #050a30; border-radius: 50px; padding: 12px 30px; font-size: 16px; }
#bdm-display-modal .bdm-btn--light { color: #050a30; font-weight: 600; }


/* === ONBOARDING BLOCKS (Save + Display) === */
.bdm-onboarding {
	position: relative;
	background: #e9f8ef;
	border: 1px solid #b5e2c5;
	border-radius: 8px;
	padding: 24px 20px;
	margin-top: 20px;
	text-align: center;
	color: #004b2b;
	font-family: inherit;
	animation: fadeIn 0.4s ease;
}

.bdm-onboarding h3 { margin: 0 0 8px; color: #004b2b; font-size: 1.2rem; font-weight: 700; }
.bdm-onboarding p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: #004b2b; }
.bdm-onboarding .bdm-btn { display: inline-block; background: #004b2b; color: #fff; border-radius: 24px; padding: 8px 20px; font-weight: 600; font-size: 14px; text-decoration: none; transition: background 0.25s ease; }
.bdm-onboarding .bdm-btn:hover { background: #007d4d; }

/* =========================================================
   STYLE MODALE "VERSIONS" (IDENTIQUE GENERATE)
   ========================================================= */

#bdm-versions-modal .bdm-modal__dialog { background-color: #EAF2FA; padding: 30px; border-radius: 16px; max-width: 600px; max-height: 80vh; overflow-y: auto; }
#bdm-versions-modal h3 { color: #0b1a52; font-size: 24px; margin-bottom: 20px; text-align: center; }
.bdm-versions-list { display: flex; flex-direction: column; gap: 12px; }
.bdm-version-card { background: #ffffff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid transparent; transition: all 0.2s ease; display: flex; flex-direction: column; gap: 10px; }
.bdm-version-card:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.08); border-color: #dbe4f0; }
.bdm-version-header { display: flex; justify-content: space-between; align-items: center; }
.bdm-version-title { font-weight: 700; color: #0b1a52; font-size: 16px; }
.bdm-btn-preview { background: #eef4ff; color: #005a87; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.bdm-btn-preview:hover { background: #dce9ff; color: #003f5e; }
.bdm-version-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.bdm-meta-tag { background: #f5f7fa; color: #666; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; border: 1px solid #eee; }
.bdm-version-code { background: #f8f9fa; border: 1px solid #e1e4e8; border-radius: 6px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; font-family: monospace; font-size: 12px; color: #444; }
.bdm-btn-copy { background: none; border: none; cursor: pointer; color: #005a87; font-size: 14px; padding: 4px; }
.bdm-btn-copy:hover { color: #003f5e; transform: scale(1.1); }

/* =========================================================
   TAG CLOUD SELECTOR
   ========================================================= */

.bdm-tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; max-height: 300px; overflow-y: auto; padding: 4px; }
.bdm-tag-option { background: #f0f2f5; border: 1px solid #dcebf9; border-radius: 20px; padding: 6px 14px; font-size: 14px; font-weight: 600; color: #555; cursor: pointer; transition: all 0.2s ease; user-select: none; }
.bdm-tag-option:hover { background: #e2e6ea; color: #333; }
.bdm-tag-option.is-selected { background: var(--color-blue-primary); color: #fff; border-color: var(--color-blue-primary); box-shadow: 0 2px 6px rgba(11, 26, 82, 0.2); }
.bdm-tag-empty { width: 100%; text-align: center; color: #888; font-style: italic; padding: 20px 0; }

/* --- AMÉLIORATION UX : ZONE D'UPLOAD --- */
.bdm-upload { border: 2px dashed #9DC4EB; border-radius: 12px; padding: 30px 20px; text-align: center; background: #f8fbff; transition: all 0.2s ease; position: relative; }
.bdm-upload.is-dragover { background: #E1EDFA; border-color: var(--color-blue-primary, #00024E); }
.bdm-upload label { cursor: pointer; display: block; color: var(--color-blue-primary, #00024E); font-weight: 600; }
.bdm-upload input[type="file"] { display: none;  }

/* --- LISTE DES DONNES PBN --- */
.bdm-btn-deal-select { text-align: left; padding: 15px 20px; background: #f0f4f8; border: 1px solid #dcebf9; border-radius: 8px; color: #0b1a52; cursor: pointer; transition: all 0.2s; font-size: 15px; display: flex; flex-direction: column; gap: 5px; }
.bdm-btn-deal-select:hover { background: var(--color-blue-primary, #00024E); color: #fff; transform: translateY(-1px); }
.bdm-btn-deal-select strong { font-size: 16px; }

/* --- ONBOARDING IMPORT MODAL --- */
.bdm-import-onboarding { background: #f9f9f9; border: 1px solid #e5e5e5; border-radius: 8px; padding: 15px; margin-bottom: 20px; font-size: 14px; color: #4a5568; line-height: 1.5; }
.bdm-onboard-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.bdm-onboard-row:last-child { margin-bottom: 0; }
.bdm-onboard-icon { flex-shrink: 0; width: 24px; text-align: center; font-size: 16px; margin-top: 2px; }
.bdm-onboard-icon.info { color: var(--color-blue-primary, #00024E); }
.bdm-onboard-icon.tool { color: #e67e22; }
.bdm-onboard-text strong { color: var(--color-blue-primary, #00024E); display: block; margin-bottom: 2px; }
.bdm-onboard-link { color: var(--color-blue-primary, #00024E); text-decoration: underline; font-weight: 500; }
.bdm-onboard-link:hover { color: var(--color-blue-secondary, #122A70); }
.bdm-import-onboarding hr{ height: 0; }

/* =========================================================
   9. RESPONSIVE & MOBILE
   ========================================================= */

@media (max-width: 1400px) {
    .bdm-grid { grid-template-columns: 1fr; grid-template-areas: "deal" "settings" "auctions" "comments" "private"; }
    .bdm-panel--deal { border-right: none; border-bottom: 1px solid #e2e8ff; }
    .bdm-table { display: none !important;  }
    .bdm-deal-layout { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 20px; justify-items: center; }
    .bdm-player { width: 100%; max-width: 380px; }
    .bdm-player.north { grid-column: 1; grid-row: 1; }
    .bdm-player.east  { grid-column: 2; grid-row: 1; }
    .bdm-player.west  { grid-column: 1; grid-row: 2; }
    .bdm-player.south { grid-column: 2; grid-row: 2; }
	.bdm-suitrow__input, .bdm-input--name { max-width: none !important; }
}

@media (max-width: 768px) {
    .bdm-header { flex-direction: column; align-items: stretch; }
    .bdm-header__right { justify-content: flex-end; }
    .bdm-btn--import, .bdm-btn--display { display: none !important;  }
    .bdm-menu__item--mobile { display: flex !important;  }
    .bdm-title-input { font-size: 20px; height: 48px; padding: 0 100px 0 10px; }
    .bdm-title-hint { font-size: 11px; right: 10px; }
    .bdm-deal-layout { display: flex; flex-direction: column; gap: 15px; align-items: center; }
    .bdm-player { width: 100%; max-width: 100%; }
    .bdm-panel__actions { flex-direction: column; gap: 10px; }
    .bdm-panel__actions-col, .bdm-panel__actions-col-left, .bdm-panel__actions-col-right { display: flex; width: 100%; gap: 10px; justify-content: center; }
    .bdm-panel__actions .bdm-btn { flex: 1; justify-content: center; }
    .bdm-settings-grid { grid-template-columns: 1fr; gap: 15px; }
    .bdm-auctions__cell { font-size: 13px; padding: 4px 2px; }
    .bdm-auctions__controls { flex-direction: column; }
    .bdm-auctions__controls .bdm-btn { width: 100%; justify-content: center; }
    .bdm-auctions__checkboxes { flex-direction: column; gap: 8px; }
    .bdm-modal__dialog { padding: 25px 15px; width: 95%; margin: 10px; }
    
    #bdm-display-modal .bdm-modal__actions, #bdm-tag-modal .bdm-modal__actions { flex-direction: column; width: 100%; }
    #bdm-display-modal .bdm-btn, #bdm-tag-modal .bdm-btn { width: 100%; justify-content: center; }
    
    .bdm-onboarding { padding: 20px 15px; }
    .bdm-onboarding h3 { font-size: 18px; }
	.bdm-suitrow__input, .bdm-input--name { max-width: none !important; width: 100%; }
}

@media (min-width: 769px) {
    .bdm-menu__item--mobile { display: none !important; }
}

body.admin-bar .bdm-header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .bdm-header { top: 46px; }
}

/* ==========================================================================
   HOMOGÉNÉISATION ET COMPACTAGE UI
   ========================================================================== */

.bdm-panel--public-note textarea,
.bdm-panel--comments textarea,
.bdm-panel--private textarea { width: 100%; min-height: 100px; border: 1px solid #dfe7fb; border-radius: 8px; padding: 12px; box-sizing: border-box; font-family: inherit; }

.bdm-panel__header--integrated { display: flex; gap: 30px; align-items: center; width: 100%; margin-bottom: 0; }
.bdm-lead-selection { display: flex; align-items: center; gap: 15px; }
.bdm-selected-card-placeholder { color: #000; opacity: 1; font-weight: 600; font-size: 16px; background: #fff; padding: 4px; border-radius: 6px; }
.bdm-open-lead-picker.bdm-btn--light { border-radius: 8px; background: transparent; color: #3860B0; border: 1px dashed #3860B0; padding: 6px 14px; font-size: 14px; }
.bdm-open-lead-picker.bdm-btn--light:hover { background: #e6eefd; border-style: solid; }

/* ==========================================================================
   STYLE DU SÉLECTEUR D'ENTAME (MODALE 52 CARTES)
   ========================================================================== */

#bdm-card-picker-all .bdm-modal__content { max-width: 650px; width: 100%; }
.bdm-card-grid-all { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.bdm-card-grid-row { display: flex; flex-direction: column; align-items: flex-start; background: #f4f7fe; border-radius: 10px; padding: 10px 15px; gap: 8px; }
.bdm-card-grid-symbol { font-size: 20px; font-weight: bold; margin: 0; line-height: 1; }
.bdm-card-grid-ranks { display: flex; gap: 4px; flex-wrap: nowrap; width: 100%; }
.bdm-card-btn-pick { background: #fff; border: 1px solid #dfe7fb; border-radius: 6px; flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #0b1a52; cursor: pointer; transition: all 0.15s ease; }
.bdm-card-btn-pick:hover, .bdm-card-btn-pick.is-selected { background: #0b1a52; border-color: #0b1a52; color: #ffffff;  }
.bdm-card-grid-row.suit--spade .bdm-card-grid-symbol { color: #000; }
.bdm-card-grid-row.suit--heart .bdm-card-grid-symbol { color: #d63031; }
.bdm-card-grid-row.suit--diamond .bdm-card-grid-symbol { color: #ff9f43; }
.bdm-card-grid-row.suit--club .bdm-card-grid-symbol { color: #2e7d32; }

@media screen and (max-width: 1100px) {
    .bdm-header__right .bdm-btn--import,
    .bdm-header__right #bdm-create-problem-btn,
    .bdm-header__right .bdm-btn--display { display: none !important; }
    .bdm-header__right .bdm-menu { display: block; }
}

@media screen and (max-width: 600px) {
    .bdm-header__title { display: none; }
    .bdm-header { padding: 12px 15px; }
}