/* ===== Card ===== */
.bdm-problem-card {
  background: #fff;
  border-radius: 26px;
  padding: 26px 16px;
  margin-bottom: 28px;
}

.bdm-problem-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

/* ===== Main ===== */
.bdm-problem-card__main {
  flex: 1;
}

.bdm-problem-title {
  font-size: 20px;
  font-weight: 800;
  margin: 10px 0 14px;
  color: var(--color-blue-primary);
}

/* ===== Hand ===== */
.bdm-hand-inline {
  font-weight: 700;
}

.bdm-hand-suit {
  margin-right: 10px;
}

/* ===== Card suit colors ===== */
.bdm-suit--spades   .bdm-suitrow__sym { color: #0b2a5b; }
.bdm-suit--hearts   .bdm-suitrow__sym { color: #d02b3b; }
.bdm-suit--diamonds .bdm-suitrow__sym { color: #f28c1a; }
.bdm-suit--clubs    .bdm-suitrow__sym { color: #1b7a52; }

/* ===== Badges ===== */
.bdm-problem-badge {
  display: inline-block;
  padding: 0px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 400;
  color: #fff;
}

.badge-bidding { background: var(--color-red-60); }
.badge-lead    { background: var(--color-red-primary); }
.badge-poll    { background: var(--color-red-secondary); }
.badge-cardplay    { background: var(--color-red-secondary); }

/* ===== Meta ===== */
.bdm-problem-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--color-blue-80);
  font-size: 14px;
}
.bdm-problem-meta div {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bdm-problem-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 400;
	font-size: 14px;
}

.bdm-problem-author img {
  border-radius: 50%;
    width: 32px;
}

/* ===== CTA ===== */
.bdm-problem-card__cta {
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bdm-problem-link {
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-blue-primary);
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

/* ===== Grid mode ===== */
.bdm-problems-list.view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
}
.bdm-author-search {
  border-radius: 999px;
  padding-left: 44px;
  background: #fff url('data:image/svg+xml;utf8,<svg ... loupe ...>') no-repeat 16px center;
}
@media (min-width: 1200px) {
  .bdm-problems-list.view-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .bdm-problem-card__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .bdm-problem-card__cta {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ==============================
   TOOLBAR
================================ */

.bdm-problems-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

/* ===== Search ===== */
.bdm-author-search {
  width: 280px;
  padding: 12px 16px 12px 44px;
  border-radius: 999px;
  border: 1px solid #e4ebf5;
  background: #fff;
  font-size: 15px;
  outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2392A1C6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 16px center;
}

.bdm-author-search::placeholder {
  color: #b4bfd6;
}

/* ===== Toggle list / grid ===== */
.bdm-view-switch {
  display: inline-flex;
  background: #eef3fb;
  padding: 4px;
  border-radius: 999px;
}

.bdm-view-switch button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #5f6f95;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bdm-view-switch button.is-active {
  background: var(--color-blue-primary);
  color: #fff;
}

/* ==============================
   CARDS
================================ */

.bdm-problem-card {
  background: #fff;
  border-radius: 28px;
  padding: 28px 16px;
}

.bdm-problem-card__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.bdm-problem-card__cta {
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==============================
   GRID MODE
================================ */

.bdm-problems-list.view-grid {
  display: grid;
  gap: 30px;
}

.bdm-problems-list.view-grid .bdm-problem-card__inner {
  flex-direction: column;
}
.bdm-problems-list.view-grid	.bdm-problem-meta {
   flex-direction: column;
    align-items: start;
    gap: 8px;
}

@media (min-width: 1200px) {
  .bdm-problems-list.view-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1199px) {
  .bdm-problems-list.view-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .bdm-problems-list.view-grid {
    grid-template-columns: 1fr;
  }

  .bdm-problem-card__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .bdm-problem-card__cta {
    width: 100%;
    justify-content: flex-start;
  }
	
}

/* ==============================
   SPINNER
================================ */

.bdm-problems-wrapper.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.6);
  pointer-events: none;
}

.bdm-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dbe3f3;
  border-top-color: var(--color-blue-primary);
  border-radius: 50%;
  animation: bdm-spin 0.8s linear infinite;
  margin: 40px auto;
}

@keyframes bdm-spin {
  to { transform: rotate(360deg); }
}

/* Hand inline alignment */
.bdm-hand-inline {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* Un bloc couleur */
.bdm-hand-suit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 22px; /* taille globale */
}

/* Symbole couleur = même taille que les cartes */
.bdm-hand-suit .bdm-suitrow__sym {
  font-size: 20px;
  line-height: 1;
}

/* Valeurs */
.bdm-hand-cards {
  font-size: 18px;
  letter-spacing: 1px;
}

/* ============================= */
/* Clickable card + hover effect */
/* ============================= */

.bdm-problem-card {
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

/* Overlay clickable */
.bdm-problem-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
}

/* Le contenu passe au-dessus de l’overlay */
.bdm-problem-card__inner {
  position: relative;
  z-index: 2;
}

/* Hover effect */
.bdm-problem-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 2, 78, 0.08);
}

/* CTA */
.bdm-problem-card__cta {
  transition: color 0.25s ease;
}

/* CTA hover state */
.bdm-problem-card:hover .bdm-problem-link {
  color: var(--color-blue-80);
}

/* Arrow subtle move */
.bdm-problem-card:hover .bdm-problem-link span {
  transform: translateX(4px);
}

.bdm-problem-link span {
  display: inline-block;
  transition: transform 0.25s ease;
}
.bdm-problem-card:hover .bdm-problem-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* ==========================================================
   Tableau des Enchères (Style Transparent)
   ========================================================== */
.auction-table { width: 100%; margin: 0; }
.auction-header-row { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 8px; }
.auction-th { text-align: center; font-weight: 800; color: var(--color-blue-primary); padding: 10px 0; }
.auction-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px; }

.auction-cell { 
    position: relative; font-weight: 800; font-size: 18px; height: 50px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 6px; background: #fff; border: 1px solid #e2e8f0; color: #0b1a52; 
}

/* Couleurs spécifiques Enchères Transparentes */
.cell-pass { background: transparent !important; color: #408852 !important; border-color: #e2e8f0; }
.cell-x    { background: transparent !important; color: #c0392b !important; border-color: #e2e8f0; }
.cell-xx   { background: transparent !important; color: #2980b9 !important; border-color: #e2e8f0; }
.cell-question { background-color: #e67e22 !important; color: #fff !important; border-color: #e67e22 !important; font-size: 1.4em; }

.cell-pass span, 
.cell-x span, 
.cell-xx span { color: inherit !important; }

/* Badges (Alerte / Commentaire) */
.bid-badge-alert {
    position: absolute; top: 2px; right: 2px;
    background-color: #4a63ad; color: #fff; font-size: 10px; font-weight: 700;
    width: 16px; height: 16px; border-radius: 3px;
    display: flex; align-items: center; justify-content: center; cursor: help; line-height: 1; z-index: 10;
}
.bid-badge-comment {
    position: absolute; bottom: 2px; right: 2px;
    width: 18px; height: 18px; background-color: #538e58; border-radius: 3px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; transition: transform 0.1s;
}
.bid-badge-comment i { color: #fff; font-size: 10px; }
.bid-badge-comment:hover { transform: scale(1.1); background-color: #457a4a; }


/* ==========================================================
   SHORTCODE: Daily Hand Card (Design Strict Single Problem)
   ========================================================== */

.bdm-daily-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    max-width: 100%; 
    margin: 0 auto 2rem;
    box-sizing: border-box;
}

/* --- 1. HEADER --- */
.bdm-daily-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.bdm-daily-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bdm-daily-meta {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 4px;
}

.bdm-daily-author-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    line-height: 1.2;
}

.bdm-daily-author {
    font-size: 16px;
    font-weight: 800;
    color: #0b1a52;
}

.bdm-daily-date {
    color: #64748b;
    font-style: italic;
    font-size: 13px;
}

/* Badges */
.bdm-daily-badges {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.bdm-badge-mini {
    font-size: 10px; 
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px; 
    border-radius: 999px; 
    color: #fff;
    line-height: 1;
    letter-spacing: 0.5px;
}

.bdm-badge-mini.type-bidding { background-color: #e9765e; } 
.bdm-badge-mini.type-lead    { background-color: #dc2626; } 
.bdm-badge-mini.level-badge  { background-color: #6390ce; } 
.bdm-badge-mini.type-cardplay { background-color: #4b66b4; } 

/* --- 2. TABLEAU D'ENCHÈRES (100% LARGEUR) --- */

.bdm-daily-auction-wrapper {
    margin-bottom: 20px;
    padding: 15px; 
    background: #f8fafc;
    border-radius: 12px;
    width: 100%; 
    box-sizing: border-box;
}

.bdm-daily-auction-wrapper .auction-header-row,
.bdm-daily-auction-wrapper .auction-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important; 
    margin-bottom: 6px !important;
    width: 100% !important; 
}

/* En-têtes */
.bdm-daily-auction-wrapper .auction-th {
    text-align: center;
    font-weight: 800;
    color: #0b1a52;
    font-size: 15px;
    padding-bottom: 4px;
}

/* Cellules */
.bdm-daily-auction-wrapper .auction-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    height: 40px; 
    border-radius: 6px;
    background-color: #fff;
    color: #0b1a52;
    border: 1px solid #cbd5e1;
    width: 100%; 
}

/* Couleurs Single Problem Transparentes */
.bdm-daily-auction-wrapper .cell-pass {
    background-color: #fff !important;
    color: #408852 !important;
    border-color: #cbd5e1 !important;
}

.bdm-daily-auction-wrapper .cell-x {
    background-color: #fff !important;
    color: #D64F42 !important;
    border-color: #cbd5e1 !important;
}

.bdm-daily-auction-wrapper .cell-xx {
    background-color: #fff !important;
    color: #4362A5 !important;
    border-color: #cbd5e1 !important;
}

.bdm-daily-auction-wrapper .cell-question {
    background-color: #e67e22 !important;
    color: #fff !important;
    border-color: #e67e22 !important;
    font-size: 20px;
}

.bdm-daily-auction-wrapper .cell-pass span,
.bdm-daily-auction-wrapper .cell-x span,
.bdm-daily-auction-wrapper .cell-xx span {
    color: inherit !important;
}

/* Cellules vides */
.bdm-daily-auction-wrapper .auction-cell:empty,
.bdm-daily-auction-wrapper .auction-cell:contains("...") {
    background: transparent;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    color: #94a3b8;
}

/* Badges Alertes/Commentaires */
.bdm-daily-auction-wrapper .bid-badge-alert {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #3b5998;
    color: white;
    font-size: 8px;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge Commentaire */
.bdm-daily-auction-wrapper .bid-badge-comment {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background-color: #558b5e; 
    color: #fff; 
    font-size: 8px; 
    width: 14px;
    height: 14px;
    border-radius: 3px; 
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 5;
    cursor: help;
}

.bdm-daily-auction-wrapper .bid-badge-comment i { color: #fff; }
.bdm-daily-auction-wrapper .bdm-comment-popup { display: none; }


/* --- 3. FOOTER (Main alignée) --- */

.bdm-daily-footer {
    text-align: center;
}

/* Flexbox pour aligner "You hold:" et les cartes sur la même ligne */
.bdm-daily-hand-label {
    font-size: 18px; 
    color: #0b1a52;
    font-weight: 800; 
    margin-bottom: 20px;
    
    display: flex; 
    align-items: start; 
    justify-content: start; 
    gap: 8px; 
    flex-wrap: wrap;
    line-height: 1;
}

/* Style du contenu de la main */
.bdm-daily-hand-content {
    font-weight: 800;
    color: #0b1a52;
    font-size: 1em; 
    display: inline-flex;
    align-items: center;
}

/* Gestion des symboles Piques/Coeurs etc */
.bdm-daily-hand-content .suit-s { color: #0b1a52; margin-right: 2px; margin-left: 8px; }
.bdm-daily-hand-content .suit-h { color: #d02b3b; margin-right: 2px; margin-left: 8px; }
.bdm-daily-hand-content .suit-d { color: #f28c1a; margin-right: 2px; margin-left: 8px; }
.bdm-daily-hand-content .suit-c { color: #166534; margin-right: 2px; margin-left: 8px; }

/* Enlever la marge du tout premier symbole */
.bdm-daily-hand-content > span:first-child,
.bdm-daily-hand-content > span:first-child span[class*="suit-"] { 
    margin-left: 0; 
}


/* CTA */
.bdm-daily-cta {
    display: block;
    width: 100%;
    background-color: #0b1a52;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 14px 20px;
    border-radius: 12px;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.bdm-daily-cta:hover {
    background-color: #1e3a8a;
    transform: translateY(-2px);
    color: #fff;
}

/* ==========================================================
   SHORTCODE: Daily Hands Grid (Grille 3 Colonnes)
   ========================================================== */

.bdm-daily-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 24px; 
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
}

.bdm-daily-grid .bdm-daily-card {
    width: 100%; 
    max-width: none !important; 
    height: 100%; 
    display: flex;
    flex-direction: column;
}

.bdm-daily-grid .bdm-daily-footer {
    margin-top: auto; 
}



/* ==========================================================
   DAILY HANDS FILTERS - STYLE SUBNAV (TEXT & LINE)
   ========================================================== */

.bdm-daily-filters {
    margin-bottom: 40px;
    padding-bottom: 0px; 
    border-bottom: 1px solid var(--color-blue-60); 
    display: flex;
    justify-content: flex-start; 
}

.bdm-filters-inner {
    display: flex;
    gap: 30px; 
    position: relative;
    top: 1px; 
}

.bdm-daily-filters .bdm-view-switch {
    position: relative;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.bdm-daily-filters .select-trigger-btn {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 10px 5px 15px 5px !important; 
    
    font-size: 18px !important; 
    font-weight: 500 !important;
    color: var(--color-blue-primary) !important; 
    
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-bottom: 3px solid transparent !important; 
    transition: all 0.2s ease;
}

.bdm-daily-filters .select-trigger-btn i {
    font-size: 12px !important;
    color: var(--color-blue-60) !important; 
    margin-top: 2px;
    transition: transform 0.2s ease;
}

.bdm-daily-filters .bdm-view-switch.open .select-trigger-btn,
.bdm-daily-filters .select-trigger-btn:hover {
    color: var(--color-blue-60) !important; 
}

.bdm-daily-filters .bdm-view-switch.open .select-trigger-btn i {
    transform: rotate(180deg);
}

.bdm-daily-filters .custom-options-list {
    display: none;
    position: absolute;
    top: 100%;
    min-width: 200px;
    z-index: 1000;
    
    background: var(--color-white); 
    border: 1px solid var(--color-blue-10); 
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,2,78,0.1); 
    margin-top: 5px;
}

.bdm-daily-filters .daily-opt {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-blue-primary); 
    border-radius: 8px;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bdm-daily-filters .daily-opt:hover {
    background: var(--color-blue-5); 
    color: var(--color-blue-60); 
}

.bdm-daily-filters .daily-opt .count {
    font-size: 11px;
    color: #94A3B8; 
    background: #F1F5F9; 
    padding: 2px 8px;
    border-radius: 10px;
}


/* ==========================================================================
   ANIMATION PROGRESSIVE (DONNES DU JOUR)
   ========================================================================== */
.page-id-2372 .bdm-daily-card,
.page-id-2372 .bdm-daily-month-separator,
.page-id-2371 .bdm-daily-card,
.page-id-2371 .bdm-daily-month-separator{
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.page-id-2371  .bdm-daily-card.is-visible,
.page-id-2371 .bdm-daily-month-separator.is-visible,
.page-id-2372 .bdm-daily-card.is-visible,
.page-id-2372 .bdm-daily-month-separator.is-visible {
    opacity: 1;
    transform: translateY(0);
}



/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    .bdm-daily-filters {
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .bdm-filters-inner {
        gap: 15px;
        width: 100%;
    }
    
    .bdm-daily-filters .select-trigger-btn {
        font-size: 16px !important;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .bdm-daily-filters {
        justify-content: flex-start;
        overflow-x: visible !important;
    }
}

/* --- Responsive --- */

/* Tablette : 2 colonnes */
@media (max-width: 1024px) {
    .bdm-daily-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile : 1 colonne */
@media (max-width: 600px) {
    .bdm-daily-grid {
        grid-template-columns: 1fr;
    }
}