/* ============================================================
   Horizon Débat Manager — Frontend CSS  v1.0.3
   Un seul fichier CSS propre, sans doublons
   ============================================================ */

:root {
  --hdm-primary:    #7C3AED;
  --hdm-primary-bg: #EDE9FE;
  --hdm-primary-hover: #6D28D9;
  --hdm-success:    #065F46;
  --hdm-success-bg: #D1FAE5;
  --hdm-danger:     #991B1B;
  --hdm-danger-bg:  #FEE2E2;
  --hdm-heart:      #EF4444;
  --hdm-text:       #111827;
  --hdm-text-muted: #6B7280;
  --hdm-border:     #E5E7EB;
  --hdm-bg:         #F3F4F6;
  --hdm-card-bg:    #FFFFFF;
  --hdm-radius:     14px;
  --hdm-radius-sm:  8px;
  --hdm-shadow:     0 1px 4px rgba(0,0,0,.07),0 4px 12px rgba(0,0,0,.06);
  --hdm-shadow-hover: 0 4px 16px rgba(0,0,0,.12),0 8px 24px rgba(0,0,0,.08);
  --hdm-font:       -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  --hdm-transition: all .2s ease;
  /* Surcharges injectées par les réglages admin */
  --hdm-card-font:  var(--hdm-font);
  --hdm-title-color-custom: var(--hdm-text);
  --hdm-excerpt-color: var(--hdm-text-muted);
  --hdm-meta-color: #9CA3AF;
  --hdm-btn-text:   #fff;
  --hdm-title-size: 14px;
  --hdm-title-weight: 700;
  --hdm-excerpt-size: 12px;
  --hdm-title-lh:   1.4;
  --hdm-excerpt-lh: 1.5;
  --hdm-accent-h:   4px;
}

.hdm-theme-dark {
  --hdm-text:#F9FAFB;--hdm-text-muted:#9CA3AF;
  --hdm-border:#374151;--hdm-bg:#111827;--hdm-card-bg:#1F2937;
}

.hdm-board *,.hdm-form-wrapper *,.hdm-modal-overlay *,.hdm-widget-list *{
  box-sizing:border-box;font-family:var(--hdm-card-font);
}
.hdm-board { position:relative; }
.hdm-icon-cal,.hdm-icon-chat,.hdm-icon-arrow,.hdm-icon-thumb{
  display:inline-block;vertical-align:middle;flex-shrink:0;
  width:14px;height:14px;
}

/* ── FILTRES ─────────────────────────────────────────────── */
.hdm-filters{background:var(--hdm-card-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius);padding:14px 16px;margin-bottom:20px;}
.hdm-status-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px;}
.hdm-tab{background:var(--hdm-bg);border:2px solid var(--hdm-border);
  border-radius:20px;padding:5px 14px;font-size:12px;font-weight:600;
  cursor:pointer;color:var(--hdm-text-muted);transition:var(--hdm-transition);}
.hdm-tab:hover{border-color:var(--hdm-primary);color:var(--hdm-primary);}
.hdm-tab-active{background:var(--hdm-primary);border-color:var(--hdm-primary);color:#fff;}
.hdm-filter-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;}
.hdm-select{border:1px solid var(--hdm-border);border-radius:var(--hdm-radius-sm);
  padding:7px 10px;font-size:12px;background:var(--hdm-card-bg);color:var(--hdm-text);cursor:pointer;}
.hdm-view-toggle{margin-left:auto;display:flex;gap:3px;}
.hdm-view-btn{display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;background:var(--hdm-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius-sm);cursor:pointer;color:var(--hdm-text-muted);
  transition:var(--hdm-transition);padding:0;}
.hdm-view-btn:hover{border-color:var(--hdm-primary);color:var(--hdm-primary);}
.hdm-view-btn.hdm-view-active{background:var(--hdm-primary);border-color:var(--hdm-primary);color:#fff;}
.hdm-view-btn svg{pointer-events:none;}
.hdm-board-meta{color:var(--hdm-text-muted);font-size:12px;margin-bottom:14px;}

/* ── GRILLE ──────────────────────────────────────────────── */
.hdm-cards.hdm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;}
.hdm-cards.hdm-list-view{display:flex;flex-direction:column;gap:10px;}
.hdm-cards.hdm-list-view .hdm-card{flex-direction:row;align-items:stretch;}
.hdm-cards.hdm-list-view .hdm-card-accent{width:5px;height:auto;border-radius:var(--hdm-radius) 0 0 var(--hdm-radius);}
.hdm-cards.hdm-list-view .hdm-card-body{flex:1;}
.hdm-cards.hdm-list-view .hdm-card-footer{flex-direction:column;justify-content:center;
  min-width:130px;border-top:none;border-left:1px solid var(--hdm-border);padding:12px 12px;}

/* ── CARTE ───────────────────────────────────────────────── */
.hdm-card{background:var(--hdm-card-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius);overflow:hidden;box-shadow:var(--hdm-shadow);
  transition:transform .2s ease,box-shadow .2s ease;display:flex;flex-direction:column;position:relative;}
.hdm-card:hover{transform:translateY(-3px);box-shadow:var(--hdm-shadow-hover);}
.hdm-card-accent{height:var(--hdm-accent-h,4px);width:100%;flex-shrink:0;}
.hdm-card-image img{width:100%;height:150px;object-fit:cover;display:block;}
.hdm-card-header{display:flex;align-items:center;justify-content:space-between;padding:10px 14px 0;}
.hdm-card-header-left{display:flex;flex-wrap:wrap;gap:5px;align-items:center;}
.hdm-theme-badge{background:var(--hdm-primary);color:#fff;font-size:10px;font-weight:700;
  padding:2px 7px;border-radius:4px;letter-spacing:.4px;text-transform:uppercase;}
.hdm-status-badge{display:inline-block;font-size:10px;font-weight:700;padding:2px 8px;border-radius:20px;white-space:nowrap;}
.hdm-category-badge{display:inline-block!important;background:#EFF6FF!important;border:1px solid #BFDBFE!important;color:#1D4ED8!important;font-size:10px;font-weight:600!important;padding:2px 8px;border-radius:20px;margin-top:3px;}
.hdm-badge{font-size:12px;font-weight:600;padding:3px 10px;border-radius:6px;}
.hdm-badge-featured{background:#FEF3C7;color:#92400E;}
.hdm-badge-priority{background:#FEE2E2;color:#991B1B;}
.hdm-badge-flagged{display:inline-block;background:#FEE2E2;color:#991B1B;font-size:10px;padding:1px 5px;border-radius:3px;margin-left:4px;}

.hdm-card-body{padding:10px 14px 8px;flex:1;}
.hdm-card-title{font-size:var(--hdm-title-size,16px);font-weight:var(--hdm-title-weight,700);
  color:var(--hdm-title-color-custom,var(--hdm-text));margin:0 0 6px;
  line-height:var(--hdm-title-lh,1.4);}
.hdm-card-excerpt{font-size:var(--hdm-excerpt-size,14px);
  color:var(--hdm-excerpt-color,var(--hdm-text));
  margin:0;line-height:var(--hdm-excerpt-lh,1.5);}

/* FOOTER CARTE — boutons agrandis */
.hdm-card-footer{padding:10px 14px 12px;border-top:1px solid var(--hdm-border);
  display:flex;align-items:center;justify-content:space-between;gap:6px;}
.hdm-card-date{display:flex;align-items:center;gap:4px;font-size:12px;
  color:var(--hdm-meta-color,#9CA3AF);}
.hdm-icon-cal{width:14px;height:14px;color:var(--hdm-text-muted);opacity:.7;}
.hdm-card-actions{display:flex;align-items:center;gap:7px;margin-left:auto;}
.hdm-comment-count{display:inline-flex;align-items:center;gap:4px;font-size:13px;
  color:var(--hdm-meta-color,#9CA3AF);}
.hdm-icon-chat{width:15px;height:15px;color:var(--hdm-text-muted);}

/* ── BOUTONS ─────────────────────────────────────────────── */
.hdm-btn{display:inline-flex;align-items:center;gap:5px;border:none;
  border-radius:var(--hdm-radius-sm);font-size:12px;font-weight:600;
  cursor:pointer;transition:var(--hdm-transition);text-decoration:none;line-height:1;}
.hdm-btn-primary{background:var(--hdm-primary);color:var(--hdm-btn-text,#fff);padding:9px 18px;}
.hdm-btn-primary:hover{background:var(--hdm-primary-hover,#6D28D9);}
.hdm-btn-secondary{background:var(--hdm-bg);color:var(--hdm-text);
  border:1px solid var(--hdm-border);padding:7px 12px;}
.hdm-btn-secondary:hover{border-color:var(--hdm-primary);color:var(--hdm-primary);}

/* Vote */
.hdm-btn-vote{background:transparent;color:var(--hdm-text-muted);
  border:1px solid var(--hdm-border);border-radius:20px;padding:5px 12px;gap:4px;
  font-size:13px;}
.hdm-btn-vote:hover:not(:disabled){color:var(--hdm-primary);border-color:var(--hdm-primary);background:var(--hdm-primary-bg);}
.hdm-btn-vote .hdm-icon-thumb{width:15px;height:15px;}
.hdm-vote-count{font-size:13px;font-weight:700;}
.hdm-btn-voted{color:var(--hdm-primary)!important;border-color:var(--hdm-primary)!important;background:var(--hdm-primary-bg)!important;}

/* Lire */
.hdm-btn-read{background:var(--hdm-primary);color:var(--hdm-btn-text,#fff);
  border-radius:20px;padding:6px 13px;gap:3px;font-size:12px;}
.hdm-btn-read:hover{background:var(--hdm-primary-hover,#6D28D9);}
.hdm-btn-read .hdm-icon-arrow{width:12px;height:12px;}
.hdm-btn-link{background:none;border:none;padding:0;color:var(--hdm-primary);cursor:pointer;font-size:12px;text-decoration:underline;display:inline;}

/* ── FORMULAIRE ──────────────────────────────────────────── */
.hdm-form-wrapper{background:var(--hdm-card-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius);padding:24px;margin-bottom:24px;box-shadow:var(--hdm-shadow);}
.hdm-form-heading{margin:0 0 18px;font-size:18px;font-weight:700;color:var(--hdm-text);}
.hdm-form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media(max-width:600px){.hdm-form-row-2{grid-template-columns:1fr;}}
.hdm-form-group{display:flex;flex-direction:column;gap:5px;margin-bottom:14px;}
.hdm-form-group label{font-size:13px;font-weight:700;color:#0072FF;letter-spacing:.1px;}
.hdm-required{color:#DC2626;}
.hdm-form-group input,.hdm-form-group select,.hdm-form-group textarea{
  border:1.5px solid var(--hdm-border);border-radius:10px;
  padding:11px 14px;font-size:14px;color:var(--hdm-text);background:var(--hdm-card-bg);
  width:100%;transition:border-color .2s,box-shadow .2s;}
.hdm-form-group input:focus,.hdm-form-group select:focus,.hdm-form-group textarea:focus{
  outline:none;border-color:#0072FF;box-shadow:0 0 0 3px rgba(0,114,255,.12);}
.hdm-field-hint{font-size:11px;color:var(--hdm-text-muted);}
.hdm-form-actions{text-align:center;margin-top:4px;}
.hdm-alert{border-radius:var(--hdm-radius-sm);padding:10px 14px;margin-bottom:14px;font-size:13px;}
.hdm-alert-success{background:var(--hdm-success-bg);color:var(--hdm-success);border:1px solid #6EE7B7;}
.hdm-alert-error{background:var(--hdm-danger-bg);color:var(--hdm-danger);border:1px solid #FCA5A5;}
.hdm-empty-state{text-align:center;padding:48px 20px;color:var(--hdm-text-muted);grid-column:1/-1;}
.hdm-empty-state h3{color:var(--hdm-text);font-size:16px;margin:0 0 6px;}
.hdm-empty-state p{font-size:13px;margin:0;}
.hdm-loading{text-align:center;padding:24px;color:var(--hdm-text-muted);font-style:italic;grid-column:1/-1;}

/* ── PAGINATION ──────────────────────────────────────────── */
.hdm-pagination{display:flex;justify-content:center;gap:5px;margin-top:24px;flex-wrap:wrap;}
.hdm-page-btn{background:var(--hdm-card-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius-sm);padding:6px 12px;font-size:12px;
  cursor:pointer;transition:var(--hdm-transition);color:var(--hdm-text);}
.hdm-page-btn:hover,.hdm-page-active{background:var(--hdm-primary);border-color:var(--hdm-primary);color:#fff;}
.hdm-page-ellipsis{padding:6px 2px;color:var(--hdm-text-muted);font-size:12px;}

/* ════════════════════════════════════════════════════════════
   MODAL — overlay scrolle lui-même, JAMAIS overflow sur body
   ════════════════════════════════════════════════════════════ */
@keyframes hdmSlideIn{
  from{transform:translateY(-14px) scale(.97);opacity:0;}
  to{transform:translateY(0) scale(1);opacity:1;}
}

/* L'overlay EST le container scrollable */
.hdm-modal-overlay{
  position:fixed !important;
  top:0 !important; left:0 !important;
  right:0 !important; bottom:0 !important;
  width:100% !important; height:100% !important;
  margin:0 !important; padding:0 !important;
  z-index:9999999 !important;
  background:rgba(17,24,39,.65) !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:center !important;
  overflow-y:auto !important;
  -webkit-overflow-scrolling:touch;
  padding-top:24px !important;
  padding-bottom:40px !important;
  padding-left:16px !important;
  padding-right:16px !important;
}
/* Offset barre admin WP */
.admin-bar .hdm-modal-overlay{ padding-top:56px !important; }
@media screen and (max-width:782px){
  .admin-bar .hdm-modal-overlay{ padding-top:68px !important; }
}

/* Boîte modale — pas de max-height, l'overlay gère le scroll */
.hdm-modal-content{
  background:var(--hdm-card-bg);
  border-radius:var(--hdm-radius);
  max-width:800px;
  width:100%;
  margin:0 auto;
  position:relative;
  box-shadow:0 20px 60px rgba(0,0,0,.3);
  animation:hdmSlideIn .25s cubic-bezier(.34,1.56,.64,1);
}

/* Bouton fermer — position absolute dans la carte, toujours visible */
.hdm-modal-close{
  position:absolute !important;
  top:10px !important;
  right:10px !important;
  float:none !important;
  margin:0 !important;
  z-index:99 !important;
  background:rgba(255,255,255,.95) !important;
  border:1.5px solid var(--hdm-border) !important;
  border-radius:50% !important;
  width:34px !important;
  height:34px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-size:20px !important;
  cursor:pointer !important;
  box-shadow:0 2px 8px rgba(0,0,0,.15) !important;
  transition:background .15s,transform .15s !important;
  line-height:1 !important;
}
.hdm-modal-close:hover{background:var(--hdm-danger-bg) !important;color:var(--hdm-danger) !important;transform:scale(1.1) !important;}

/* Corps modal */
.hdm-modal-body{padding:8px 24px 28px;}

.hdm-modal-header{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px;align-items:center;}
.hdm-modal-title{font-size:20px;font-weight:700;margin:0 0 8px;color:var(--hdm-text);line-height:1.35;}
.hdm-modal-description{margin:12px 0;}
.hdm-modal-image img{width:100%;border-radius:var(--hdm-radius-sm);margin:10px 0;max-height:320px;object-fit:cover;}
.hdm-modal-meta{display:flex;flex-wrap:wrap;gap:14px;font-size:12px;color:var(--hdm-text-muted);
  margin:14px 0;padding:10px 0;border-top:1px solid var(--hdm-border);border-bottom:1px solid var(--hdm-border);}
.hdm-modal-actions{margin:12px 0;}
.hdm-voted-badge{display:inline-flex;align-items:center;gap:6px;background:var(--hdm-success-bg);
  color:var(--hdm-success);padding:7px 14px;border-radius:20px;font-weight:600;font-size:13px;}
.hdm-modal-gallery{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0;}
.hdm-gallery-thumb img{width:72px;height:54px;object-fit:cover;border-radius:5px;}
.hdm-hpm-link{display:inline-flex;align-items:center;gap:5px;margin:6px 0;
  color:#1D4ED8;text-decoration:none;font-size:13px;font-weight:600;}
.hdm-hpm-link:hover{text-decoration:underline;}

/* ── HISTORIQUE ──────────────────────────────────────────── */
.hdm-history-public{margin:14px 0;}
.hdm-history-public h4{font-size:13px;font-weight:700;margin:0 0 6px;color:var(--hdm-text);}
.hdm-history-list{list-style:none;padding:0;margin:0;}
.hdm-history-entry{padding:6px 0;border-bottom:1px solid var(--hdm-border);font-size:12px;
  display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.hdm-history-label{font-weight:600;}
.hdm-history-meta{color:var(--hdm-text-muted);}
.hdm-history-note{color:var(--hdm-text-muted);font-style:italic;}

/* ── ABONNEMENT ──────────────────────────────────────────── */
.hdm-subscribe-block{background:var(--hdm-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius-sm);padding:14px;margin:14px 0;}
.hdm-subscribe-block h4{margin:0 0 10px;font-size:13px;font-weight:700;}
.hdm-subscribe-form{display:flex;flex-wrap:wrap;gap:7px;align-items:center;}
.hdm-subscribe-email{border:1px solid var(--hdm-border);border-radius:var(--hdm-radius-sm);
  padding:7px 11px;font-size:12px;flex:1;min-width:180px;background:var(--hdm-card-bg);}
.hdm-subscribe-form label{font-size:12px;display:flex;align-items:center;gap:4px;}
.hdm-subscribe-feedback{font-size:12px;margin-top:6px;}

/* ════════════════════════════════════════════════════════════
   COMMENTAIRES — style bulle HAM/HPM
   ════════════════════════════════════════════════════════════ */
.hdm-comments-section{margin-top:20px;border-top:1px solid var(--hdm-border);padding-top:18px;}
.hdm-comments-section h4{font-size:14px;font-weight:700;margin:0 0 14px;
  display:flex;align-items:center;gap:6px;color:var(--hdm-text);}
.hdm-comments-count{color:var(--hdm-text-muted);font-weight:400;font-size:13px;}
.hdm-comments-list{display:flex;flex-direction:column;}

.hdm-comment{display:grid;grid-template-columns:36px 1fr;gap:10px;padding:12px 0;position:relative;}
.hdm-comment+.hdm-comment{border-top:1px solid var(--hdm-border);}

/* Conteneur des réponses imbriquées */
.hdm-comment-replies{margin-left:12px;padding-left:12px;border-left:2px solid var(--hdm-border);}
.hdm-comment-replies .hdm-comment{border-top:1px solid var(--hdm-border);grid-template-columns:28px 1fr;}
.hdm-comment-replies .hdm-comment:first-child{border-top:none;}
.hdm-comment-reply::before{display:none;}
.hdm-comment-replies .hdm-comment-bubble{background:#F0FDF4 !important;border-color:#86EFAC !important;}
.hdm-comment-replies .hdm-comment-bubble::after{border-color:transparent #F0FDF4 transparent transparent !important;}
.hdm-comment-replies .hdm-comment-bubble::before{border-color:transparent #86EFAC transparent transparent !important;}

.hdm-avatar{display:flex;align-items:center;justify-content:center;
  width:34px;height:34px;border-radius:50%;color:#fff;font-weight:700;
  font-size:13px;flex-shrink:0;margin-top:1px;}
.hdm-comment-replies .hdm-avatar{width:28px;height:28px;font-size:11px;}
.hdm-comment-main{min-width:0;}

.hdm-comment-bubble{background:var(--hdm-bg);border:1px solid var(--hdm-border);
  border-radius:0 var(--hdm-radius-sm) var(--hdm-radius-sm) var(--hdm-radius-sm);
  padding:8px 12px;position:relative;}
.hdm-comment-bubble::before{content:'';position:absolute;top:0;left:-6px;
  border-width:0 6px 6px 0;border-style:solid;
  border-color:transparent var(--hdm-border) transparent transparent;}
.hdm-comment-bubble::after{content:'';position:absolute;top:1px;left:-4px;
  border-width:0 5px 5px 0;border-style:solid;
  border-color:transparent var(--hdm-bg) transparent transparent;}
.hdm-comment-meta{display:flex;gap:8px;align-items:baseline;margin-bottom:4px;}
.hdm-comment-author{font-weight:700;font-size:12px;color:var(--hdm-text);}
.hdm-comment-date{font-size:11px;color:var(--hdm-text-muted);}
.hdm-comment-body{font-size:13px;color:var(--hdm-text);line-height:1.6;word-break:break-word;}
.hdm-comment-body p{margin:0;}

.hdm-comment-actions{display:flex;gap:8px;margin-top:5px;align-items:center;}
.hdm-comment-actions button,.hdm-reply-btn,.hdm-flag-btn{
  background:none;border:none;padding:1px 4px;font-size:11px;
  color:var(--hdm-text-muted);cursor:pointer;
  display:inline-flex;align-items:center;gap:3px;
  border-radius:4px;transition:background .15s,color .15s;}
.hdm-comment-actions button:hover,.hdm-reply-btn:hover{color:var(--hdm-primary);background:var(--hdm-primary-bg);}
.hdm-flag-btn:hover{color:var(--hdm-danger);background:var(--hdm-danger-bg);}

/* Like / Dislike commentaires */
.hdm-like-btn,.hdm-dislike-btn{
  background:none;border:none;padding:2px 5px;font-size:12px;cursor:pointer;
  display:inline-flex;align-items:center;gap:3px;
  color:var(--hdm-text-muted);border-radius:4px;transition:background .15s,color .15s;}
.hdm-like-btn:hover{color:#7C3AED;background:#EDE9FE;}
.hdm-dislike-btn:hover{color:#EF4444;background:#FEE2E2;}
.hdm-like-btn.hdm-reacted{color:#7C3AED;background:#EDE9FE;}
.hdm-dislike-btn.hdm-reacted{color:#EF4444;background:#FEE2E2;}
.hdm-like-count,.hdm-dislike-count{font-size:11px;font-weight:700;}

.hdm-no-comments{color:var(--hdm-text-muted);font-style:italic;font-size:13px;text-align:center;padding:16px 0;}

.hdm-add-comment-form{background:var(--hdm-bg);border:1px solid var(--hdm-border);
  border-radius:var(--hdm-radius-sm);padding:14px;margin-top:16px;}
.hdm-add-comment-form h5{margin:0 0 10px;font-size:11px;font-weight:700;
  color:var(--hdm-text);text-transform:uppercase;letter-spacing:.5px;}
.hdm-comment-name,.hdm-comment-email,.hdm-comment-content{
  border:1px solid var(--hdm-border);border-radius:var(--hdm-radius-sm);
  padding:8px 11px;font-size:13px;background:var(--hdm-card-bg);color:var(--hdm-text);
  width:100%;margin-bottom:7px;display:block;transition:border-color .2s,box-shadow .2s;}
.hdm-comment-name:focus,.hdm-comment-email:focus,.hdm-comment-content:focus{
  outline:none;border-color:var(--hdm-primary);box-shadow:0 0 0 3px var(--hdm-primary-bg);}
.hdm-comment-content{resize:vertical;min-height:70px;}
.hdm-comment-feedback{font-size:12px;padding:7px 10px;border-radius:4px;margin-top:6px;}
.hdm-comment-feedback.success{background:var(--hdm-success-bg);color:var(--hdm-success);}
.hdm-comment-feedback.error{background:var(--hdm-danger-bg);color:var(--hdm-danger);}



/* ── RESPONSIVE ──────────────────────────────────────────── */
@media(max-width:768px){
  .hdm-cards.hdm-grid{grid-template-columns:1fr;}
  .hdm-filter-row{flex-direction:column;align-items:stretch;}
  .hdm-view-toggle{margin-left:0;}
  /* Sur mobile, la modal est en bas de l'écran */
  .hdm-modal-content{border-radius:var(--hdm-radius) var(--hdm-radius) 0 0;width:100%;max-width:100%;margin:auto 0 0;}
  .hdm-modal-overlay{align-items:flex-end !important;padding:0 !important;}
  .admin-bar .hdm-modal-overlay{padding:0 !important;padding-top:0 !important;}
  .hdm-cards.hdm-list-view .hdm-card{flex-direction:column;}
  .hdm-cards.hdm-list-view .hdm-card-footer{border-left:none;border-top:1px solid var(--hdm-border);flex-direction:row;}
}

/* ── Titre de page dans le formulaire front ────────────────── */
.hdm-form-page-header {
  padding: 0 0 16px;
  border-bottom: 1px solid var(--hdm-border);
  margin-bottom: 20px;
}
.hdm-form-page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--hdm-primary);
  margin: 0;
  line-height: 1.3;
}

/* ════════════════════════════════════════════════════════
   FORMULAIRE MODERNE — style HAM / HPM  v1.0.12
   ════════════════════════════════════════════════════════ */

/* Wrapper modernisé */
.hdm-form-wrapper.hdm-hpm-style {
  background: var(--hdm-card-bg);
  border: 1px solid var(--hdm-border);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.06);
  overflow: hidden;
}

/* Hero header */
.hdm-form-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px 20px;
  background: linear-gradient(135deg, #F8FAFF 0%, #EFF4FF 100%);
  border-bottom: 1px solid #E0E7FF;
  color: #1E3A5F;
}
.hdm-form-hero-icon {
  font-size: 36px;
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hdm-form-hero-title {
  font-size: 22px; font-weight: 800;
  color: #fff; margin: 0 0 4px;
  line-height: 1.2;
}
.hdm-form-hero-sub {
  font-size: 14px; color: rgba(255,255,255,.8);
  margin: 0; line-height: 1.4;
}

/* Inner du formulaire */
.hdm-hpm-style .hdm-form-inner { padding: 24px 28px 28px; }
.hdm-hpm-style .hdm-alert { margin: 0 28px 16px; }

/* Labels HPM — bleu, uppercase, petit */
.hdm-hpm-style .hdm-form-group label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #0072FF !important;
  text-transform: uppercase !important;
  letter-spacing: .7px !important;
  margin-bottom: 6px !important;
}

/* Inputs HPM — grands, arrondis, focus violet */
.hdm-hpm-style .hdm-form-group input,
.hdm-hpm-style .hdm-form-group select,
.hdm-hpm-style .hdm-form-group textarea {
  border: 1.5px solid #E5E7EB !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  font-size: 15px !important;
  color: #111827 !important;
  background: #FAFAFA !important;
  width: 100% !important;
  transition: border-color .2s, box-shadow .2s, background .2s !important;
  font-family: inherit !important;
}
.hdm-hpm-style .hdm-form-group input::placeholder,
.hdm-hpm-style .hdm-form-group textarea::placeholder {
  color: #9CA3AF !important;
  font-size: 14px !important;
}
.hdm-hpm-style .hdm-form-group input:focus,
.hdm-hpm-style .hdm-form-group select:focus,
.hdm-hpm-style .hdm-form-group textarea:focus {
  outline: none !important;
  border-color: #0072FF !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(124,58,237,.1) !important;
}
.hdm-hpm-style .hdm-form-group textarea {
  min-height: 130px !important;
  resize: vertical !important;
}

/* Séparateur visuel entre sections */
.hdm-hpm-style .hdm-form-section-sep {
  height: 1px;
  background: #F3F4F6;
  margin: 20px 0;
}

/* Bouton soumettre — grand, centré, dégradé */
.hdm-hpm-style .hdm-form-actions {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #F3F4F6;
}
.hdm-hpm-style #hdm-submit-btn {
  background: linear-gradient(135deg, #0072FF, #0050CC) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 14px 40px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: transform .15s, box-shadow .15s !important;
  box-shadow: 0 4px 14px rgba(124,58,237,.4) !important;
  letter-spacing: .3px;
}
.hdm-hpm-style #hdm-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(124,58,237,.5) !important;
}
.hdm-hpm-style #hdm-submit-btn:disabled {
  opacity: .6 !important; cursor: default !important;
}

/* Champ hint */
.hdm-hpm-style .hdm-field-hint {
  font-size: 11px;
  color: #9CA3AF;
  margin-top: 4px;
}

/* Grille 2 colonnes dans HPM style */
.hdm-hpm-style .hdm-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .hdm-hpm-style .hdm-form-row-2 { grid-template-columns: 1fr; }
  .hdm-hpm-style .hdm-form-inner { padding: 16px 16px 20px; }
  .hdm-form-hero { padding: 18px 16px; }
}

/* ── Groupe 3 : Carte ouverte (v1.0.14f) ─── */

/* Description avec scroll */
.hdm-modal-desc-scroll {
  max-height: 290px;
  overflow-y: auto;
  padding-right: 6px;
}
.hdm-modal-desc-scroll::-webkit-scrollbar { width: 4px; }
.hdm-modal-desc-scroll::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

/* Accordéon historique */
.hdm-accordion {
  border: 1px solid var(--hdm-border);
  border-radius: 8px;
  margin: 10px 0;
  overflow: hidden;
}
.hdm-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--hdm-text);
  background: var(--hdm-bg);
  list-style: none;
  user-select: none;
  gap: 8px;
}
.hdm-accordion-trigger::-webkit-details-marker { display: none; }
.hdm-accordion-trigger::after {
  content: '+';
  font-size: 16px;
  color: var(--hdm-text-muted);
  margin-left: auto;
  transition: transform .2s;
}
.hdm-accordion[open] > .hdm-accordion-trigger::after { content: '-'; }
.hdm-accordion-count {
  background: var(--hdm-primary-bg);
  color: var(--hdm-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
}
.hdm-accordion-body {
  padding: 12px 14px;
  border-top: 1px solid var(--hdm-border);
  background: #fff;
}

/* Commentaires scroll */
.hdm-comments-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}
.hdm-comments-scroll::-webkit-scrollbar { width: 4px; }
.hdm-comments-scroll::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 2px; }

/* Zone ajout commentaire - fond bleu clair */
.hdm-comment-form-blue {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
}
.hdm-add-comment-label {
  font-size: 12px;
  font-weight: 700;
  color: #1D4ED8;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.hdm-comment-form-blue .hdm-comment-content {
  border: 1.5px solid #BFDBFE !important;
  border-radius: 8px !important;
  background: #fff !important;
}
.hdm-comment-form-blue .hdm-comment-content:focus {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,.12) !important;
}
/* Bulles commentaires fond bleu très clair */
.hdm-comment-bubble {
  background: #F0F9FF !important;
  border-color: #BAE6FD !important;
}
/* Bulles réponses imbriquées : fond vert (priorité sur le bleu) */
.hdm-comment-replies .hdm-comment-bubble {
  background: #F0FDF4 !important;
  border-color: #86EFAC !important;
}
.hdm-comment-replies .hdm-comment-bubble::after {
  border-color: transparent #F0FDF4 transparent transparent !important;
}
.hdm-comment-replies .hdm-comment-bubble::before {
  border-color: transparent #86EFAC transparent transparent !important;
}

/* ── Scroll commentaires + badges colorés filtres (v1.0.14g) ─── */

/* Modal body hauteur max pour activer le scroll commentaires */
.hdm-modal-content {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hdm-modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Badges filtre colorés — la couleur est injectée via JS en --hdm-tab-color */
.hdm-tab[data-status] {
  border-color: var(--hdm-tab-color, var(--hdm-border)) !important;
  color: var(--hdm-tab-color, var(--hdm-text-muted)) !important;
}
.hdm-tab[data-status]:hover {
  background: var(--hdm-tab-color, var(--hdm-primary)) !important;
  border-color: var(--hdm-tab-color, var(--hdm-primary)) !important;
  color: #fff !important;
}
.hdm-tab[data-status].hdm-tab-active {
  background: var(--hdm-tab-color, var(--hdm-primary)) !important;
  border-color: var(--hdm-tab-color, var(--hdm-primary)) !important;
  color: #fff !important;
}

/* Modal description vars */
.hdm-modal-description {
  color: var(--hdm-excerpt-color, var(--hdm-text));
  font-size: var(--hdm-excerpt-size, 14px);
  line-height: var(--hdm-excerpt-lh, 1.7);
}
/* Bordure badges fine */
.hdm-tab { border-width: 1px !important; }

/* ══════════════════════════════════════════════════
   Réglages texte formulaire public + icônes (v1.0.14p)
   ══════════════════════════════════════════════════ */

/* Variables par défaut formulaire */
:root {
  --hdm-form-text-color: #374151;
  --hdm-form-text-size: 15px;
  --hdm-form-text-lh: 1.6;
  --hdm-form-label-color: #0072FF;
}

/* Application sur le formulaire public */
.hdm-hpm-style .hdm-form-group label {
  color: var(--hdm-form-label-color, #0072FF) !important;
}
.hdm-hpm-style .hdm-form-group input,
.hdm-hpm-style .hdm-form-group select,
.hdm-hpm-style .hdm-form-group textarea {
  color: var(--hdm-form-text-color, #374151) !important;
  font-size: var(--hdm-form-text-size, 15px) !important;
  line-height: var(--hdm-form-text-lh, 1.6) !important;
}
.hdm-form-hero-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #1E3A5F;
}
.hdm-form-hero-sub {
  font-size: 14px;
  margin: 0;
  color: #4B6A9B;
}

/* ── Clic sur carte front (titre, extrait, image) ─── */
.hdm-card-title,
.hdm-card-excerpt,
.hdm-card-img-wrap,
.hdm-card-image {
  cursor: pointer;
}
.hdm-card-title:hover { color: var(--hdm-primary); text-decoration: underline; text-decoration-style: dotted; }

/* ══════════════════════════════════════════════════
   v1.0.15 — Barre progression + Partage + Animation
   ══════════════════════════════════════════════════ */

/* ── Barre de progression votes ─── */
.hdm-progress-wrap {
  margin: 8px 0 4px;
}
.hdm-progress-bar {
  height: 6px;
  background: #F3F4F6;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
}
.hdm-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0072FF, #00C6FF);
  border-radius: 10px;
  transition: width .6s ease;
}
.hdm-progress-fill.hdm-progress-done {
  background: linear-gradient(90deg, #059669, #34D399);
}
.hdm-progress-label {
  font-size: 11px;
  color: #6B7280;
  font-weight: 500;
}

/* ── Animation vote ─── */
@keyframes hdm-vote-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.hdm-vote-pop {
  animation: hdm-vote-pop .5s cubic-bezier(.36,.07,.19,.97) forwards;
}
.hdm-confetti {
  position: absolute;
  font-size: 16px;
  pointer-events: none;
  z-index: 99;
  user-select: none;
}
.hdm-card { position: relative; overflow: hidden; }

/* ── Partage social ─── */
.hdm-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  padding: 10px 14px;
  background: #F8FAFF;
  border: 1px solid #E0E7FF;
  border-radius: 10px;
  flex-wrap: wrap;
}
.hdm-share-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 600;
}
.hdm-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: #374151;
  transition: all .15s;
}
.hdm-share-wa:hover  { background: #25D366; border-color: #25D366; color: #fff; }
.hdm-share-li:hover  { background: #0A66C2; border-color: #0A66C2; color: #fff; }
.hdm-share-copy:hover { background: #0072FF; border-color: #0072FF; color: #fff; }
.hdm-copy-feedback {
  font-size: 11px;
  color: #059669;
  font-weight: 600;
  display: none;
}

/* ── Nouveaux boutons partage (v1.0.15b) ─── */
.hdm-share-fb:hover  { background: #1877F2; border-color: #1877F2; color: #fff; }
.hdm-share-x:hover   { background: #000;    border-color: #000;    color: #fff; }
.hdm-share-tg:hover  { background: #26A5E4; border-color: #26A5E4; color: #fff; }

/* ── Champ recherche front ─── */
.hdm-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.hdm-search-input {
  padding: 7px 10px 7px 32px !important;
  border: 1.5px solid var(--hdm-border) !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  background: var(--hdm-card-bg) !important;
  color: var(--hdm-text) !important;
  min-width: 180px;
  transition: border-color .15s;
}
.hdm-search-input:focus {
  border-color: var(--hdm-primary) !important;
  outline: none !important;
}
.hdm-search-icon {
  position: absolute;
  left: 9px;
  color: var(--hdm-text-muted);
  pointer-events: none;
}

/* ── Texte idée dans modal front — couleur noire ─── */
.hdm-modal-description,
.hdm-modal-description p,
.hdm-modal-description * {
  color: #111827 !important;
}

/* ── Description modal plus grande (v1.0.15g) ─── */
.hdm-modal-description {
  font-size: 15px !important;
  line-height: 1.75 !important;
}

/* ══════════════════════════════════════════════════
   HDM Widget — v1.0.16
   ══════════════════════════════════════════════════ */

.hdm-widget {
  font-family: var(--hdm-card-font, inherit);
}

/* ── Stats ─── */
.hdm-widget-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #EFF6FF;
  border-radius: 10px;
  border: 1px solid #DBEAFE;
}
.hdm-widget-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #1D4ED8;
  font-weight: 500;
}
.hdm-widget-stat strong { font-size: 15px; font-weight: 800; }

/* ── Liste commune ─── */
.hdm-widget-list { list-style: none; padding: 0; margin: 0; }
.hdm-widget-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
  position: relative;
}
.hdm-widget-item:last-child { border-bottom: none; }

/* Barre couleur gauche */
.hdm-widget-item-accent {
  width: 3px;
  align-self: stretch;
  min-height: 36px;
  border-radius: 3px;
  flex-shrink: 0;
}

/* Image mode list_image */
.hdm-widget-item-img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #F3F4F6;
}
.hdm-widget-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hdm-widget-item-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenu item */
.hdm-widget-item-content { flex: 1; min-width: 0; }
.hdm-widget-item-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.hdm-widget-badge-feat,
.hdm-widget-badge-prio {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
}
.hdm-widget-item-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--hdm-text, #111827);
  line-height: 1.4;
  margin-bottom: 4px;
  white-space: normal;
}
.hdm-widget-item-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.hdm-widget-meta-votes,
.hdm-widget-meta-comments {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--hdm-text-muted, #6B7280);
}

/* ── Mode Cartes ─── */
.hdm-widget-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hdm-widget-card {
  background: var(--hdm-card-bg, #fff);
  border: 1px solid var(--hdm-border, #E5E7EB);
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .15s;
}
.hdm-widget-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.hdm-widget-card-accent {
  height: 4px;
  width: 100%;
}
.hdm-widget-card-img {
  width: 100%;
  height: 120px;
  overflow: hidden;
}
.hdm-widget-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hdm-widget-card-body { padding: 10px 12px 12px; }
.hdm-widget-card-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.hdm-widget-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--hdm-text, #111827);
  margin: 0 0 6px;
  line-height: 1.4;
}
.hdm-widget-card-meta {
  display: flex;
  gap: 10px;
}
.hdm-widget-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--hdm-text-muted, #6B7280);
}

/* ── Footer widget ─── */
.hdm-widget-footer {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hdm-widget-btn-all {
  display: block;
  text-align: center;
  padding: 8px 14px;
  background: #EFF6FF;
  color: #1D4ED8 !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s;
  border: 1px solid #BFDBFE;
}
.hdm-widget-btn-all:hover { background: #DBEAFE; }
.hdm-widget-btn-propose {
  display: block;
  text-align: center;
  padding: 8px 14px;
  background: #0072FF;
  color: #fff !important;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s;
}
.hdm-widget-btn-propose:hover { background: #005FD9; }

/* ── Vide ─── */
.hdm-widget-empty {
  color: var(--hdm-text-muted, #9CA3AF);
  font-style: italic;
  font-size: 12px;
  text-align: center;
  padding: 12px 0;
}

/* ── Widget — 2 colonnes + extrait (v1.0.16d) ─── */

/* 2 colonnes mode liste */
.hdm-widget-cols-2 .hdm-widget-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.hdm-widget-cols-2 .hdm-widget-item {
  border-bottom: 1px solid #F3F4F6;
}

/* 2 colonnes mode cartes */
.hdm-widget-cols-2 .hdm-widget-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Extrait dans liste */
.hdm-widget-item-excerpt {
  font-size: 11px;
  color: var(--hdm-text-muted, #6B7280);
  line-height: 1.5;
  margin: 3px 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Extrait dans cartes */
.hdm-widget-card-excerpt {
  font-size: 11px;
  color: var(--hdm-text-muted, #6B7280);
  line-height: 1.5;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Responsive — 1 colonne sur mobile */
@media (max-width: 480px) {
  .hdm-widget-cols-2 .hdm-widget-list,
  .hdm-widget-cols-2 .hdm-widget-cards {
    grid-template-columns: 1fr;
  }
}

/* ── Widget — image position + date méta (v1.0.16f) ─── */

/* Image à droite */
.hdm-widget-img-right .hdm-widget-item {
  flex-direction: row-reverse;
}
.hdm-widget-img-right .hdm-widget-item-accent {
  order: -1;
}

/* Image en haut */
.hdm-widget-item-top {
  flex-direction: column !important;
  align-items: flex-start !important;
}
.hdm-widget-item-top .hdm-widget-item-accent {
  width: 100% !important;
  height: 3px !important;
  min-height: 3px !important;
  align-self: auto;
}

/* Méta date */
.hdm-widget-meta-date {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--hdm-text-muted, #6B7280);
}

/* ── Bouton page dédiée sur carte ─── */
.hdm-btn-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #F3F4F6;
  color: #6B7280;
  text-decoration: none;
  transition: all .15s;
  border: 1px solid #E5E7EB;
}
.hdm-btn-page-link:hover {
  background: #EFF6FF;
  color: #0072FF;
  border-color: #BFDBFE;
}

/* Titre widget cliquable */
a.hdm-widget-card-title{display:block;color:inherit;text-decoration:none}
a.hdm-widget-card-title:hover{opacity:.85}
/* Titre carte board cliquable */
.hdm-card-title a{color:inherit;text-decoration:none}
.hdm-card-title a:hover{opacity:.85}

/* ── Radio choix type idée / débat ─────────────────────── */
.hdm-radio-group{display:flex;gap:10px;flex-wrap:wrap}
.hdm-radio-card{
  flex:1;min-width:140px;display:flex;flex-direction:column;align-items:center;
  gap:4px;padding:14px 12px;border:2px solid #E5E7EB;border-radius:12px;
  cursor:pointer;transition:all .15s;text-align:center;position:relative;
  background:#fff;
}
.hdm-radio-card input[type="radio"]{position:absolute;opacity:0;width:0;height:0}
.hdm-radio-card:hover{border-color:var(--hdm-accent,#0072FF);background:#F0F9FF}
.hdm-radio-card.hdm-radio-active{
  border-color:var(--hdm-accent,#0072FF);
  background:#EFF6FF;
}
.hdm-radio-icon{font-size:24px;line-height:1}
.hdm-radio-label{font-size:14px;font-weight:700;color:#111827}
.hdm-radio-desc{font-size:12px;color:#6B7280;line-height:1.3}

/* ═══════════════════════════════════════════════════════════
   HDM — MODE SOMBRE
   Activé par .hdm-dark sur l'élément wrappeur ou body
   Couleur de fond principale : #212529
   ═══════════════════════════════════════════════════════════ */

/* Variables sombres */
.hdm-dark,
body.hdm-dark-mode .hdm-board,
body.hdm-dark-mode .hdm-form-wrapper,
body.hdm-dark-mode .hdm-modal-overlay,
body.hdm-dark-mode .hdm-widget-list,
body.hdm-dark-mode .hdm-idea-page,
body.hdm-dark-mode .hdm-lw {
  --hdm-text:          #F1F3F5;
  --hdm-text-muted:    #9CA3AF;
  --hdm-border:        #3A3F44;
  --hdm-bg:            #212529;
  --hdm-card-bg:       #2C3136;
  --hdm-primary:       #818CF8;
  --hdm-primary-bg:    #2D2F5A;
  --hdm-primary-hover: #6366F1;
  --hdm-success:       #34D399;
  --hdm-success-bg:    #064E3B;
  --hdm-danger:        #F87171;
  --hdm-danger-bg:     #450A0A;
  --hdm-shadow:        0 1px 4px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3);
  --hdm-shadow-hover:  0 4px 16px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.4);
  color-scheme: dark;
}

/* Fond général du board */
body.hdm-dark-mode .hdm-board,
body.hdm-dark-mode .hdm-form-wrapper {
  background: #212529;
  color: #F1F3F5;
}

/* Cartes */
body.hdm-dark-mode .hdm-card {
  background: #2C3136 !important;
  border-color: #3A3F44 !important;
  color: #F1F3F5;
}
body.hdm-dark-mode .hdm-card:hover {
  background: #343A40 !important;
  border-color: #4A5058 !important;
}
body.hdm-dark-mode .hdm-card-footer {
  background: #23272B !important;
  border-color: #3A3F44 !important;
}

/* Filtres + inputs */
body.hdm-dark-mode .hdm-filters-bar,
body.hdm-dark-mode .hdm-tabs-bar {
  background: #23272B;
  border-color: #3A3F44;
}
body.hdm-dark-mode .hdm-filter-select,
body.hdm-dark-mode .hdm-search-input,
body.hdm-dark-mode .hdm-comment-name,
body.hdm-dark-mode .hdm-comment-email,
body.hdm-dark-mode .hdm-comment-content,
body.hdm-dark-mode textarea,
body.hdm-dark-mode input[type="text"],
body.hdm-dark-mode input[type="email"],
body.hdm-dark-mode input[type="search"] {
  background: #2C3136 !important;
  border-color: #3A3F44 !important;
  color: #F1F3F5 !important;
}

/* Onglets statuts */
body.hdm-dark-mode .hdm-tab {
  background: #2C3136;
  border-color: #3A3F44;
  color: #9CA3AF;
}
body.hdm-dark-mode .hdm-tab.hdm-active,
body.hdm-dark-mode .hdm-tab:hover {
  background: #343A40;
  color: #F1F3F5;
}

/* Modal */
body.hdm-dark-mode .hdm-modal-content {
  background: #2C3136 !important;
  border-color: #3A3F44;
  color: #F1F3F5;
}
body.hdm-dark-mode .hdm-modal-body,
body.hdm-dark-mode .hdm-modal-header {
  background: #2C3136;
  color: #F1F3F5;
}

/* Commentaires */
body.hdm-dark-mode .hdm-comment-bubble {
  background: #343A40 !important;
  border-color: #4A5058 !important;
}
body.hdm-dark-mode .hdm-comment-replies .hdm-comment-bubble {
  background: #1E2E28 !important;
  border-color: #2D5A45 !important;
}
body.hdm-dark-mode .hdm-comment-bubble::after {
  border-color: transparent #343A40 transparent transparent !important;
}

/* Historique + partage */
body.hdm-dark-mode .hdm-history-panel {
  background: #23272B;
  border-color: #3A3F44;
}
body.hdm-dark-mode .hdm-share-bar {
  background: #23272B !important;
  border-color: #3A3F44 !important;
}

/* Bouton vote */
body.hdm-dark-mode .hdm-btn-vote:not(.hdm-btn-voted) {
  background: #818CF8;
}
body.hdm-dark-mode .hdm-btn-vote:not(.hdm-btn-voted):hover {
  background: #6366F1;
}

/* Formulaire soumission */
body.hdm-dark-mode .hdm-form-wrapper {
  background: #2C3136;
  border-color: #3A3F44;
}
body.hdm-dark-mode .hdm-form-section {
  background: #343A40;
  border-color: #3A3F44;
}

/* Page individuelle */
body.hdm-dark-mode .hdm-lcard,
body.hdm-dark-mode .hdm-lcomments {
  background: #2C3136 !important;
  border-color: #3A3F44 !important;
}
body.hdm-dark-mode .hdm-lcard-bottom {
  border-color: #3A3F44 !important;
  background: #252A2E;
}
body.hdm-dark-mode .hdm-ldesc,
body.hdm-dark-mode .hdm-ldesc p,
body.hdm-dark-mode .hdm-ldesc * {
  color: #E5E7EB !important;
}

/* Widget */
body.hdm-dark-mode .hdm-widget,
body.hdm-dark-mode .hdm-widget-card,
body.hdm-dark-mode .hdm-widget-item {
  background: #2C3136;
  border-color: #3A3F44;
  color: #F1F3F5;
}

/* Toggle bouton */
.hdm-dark-toggle {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #3A3F44;
  background: #2C3136;
  color: #F1F3F5;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  transition: all .2s;
}
.hdm-dark-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
body:not(.hdm-dark-mode) .hdm-dark-toggle {
  background: #F3F4F6;
  border-color: #E5E7EB;
  color: #374151;
}

/* ── Widget mode sombre explicite (classe hdm-dark sur le widget) ── */
.hdm-widget.hdm-dark {
  --hdm-text:       #F1F3F5;
  --hdm-text-muted: #9CA3AF;
  --hdm-border:     #3A3F44;
  --hdm-bg:         #212529;
  --hdm-card-bg:    #2C3136;
  --hdm-primary:    #818CF8;
  --hdm-primary-bg: #2D2F5A;
  background: #212529;
  color: #F1F3F5;
  border-radius: 8px;
  padding: 8px;
}
.hdm-widget.hdm-dark .hdm-widget-card,
.hdm-widget.hdm-dark .hdm-widget-item {
  background: #2C3136 !important;
  border-color: #3A3F44 !important;
  color: #F1F3F5 !important;
}
.hdm-widget.hdm-dark .hdm-widget-card:hover,
.hdm-widget.hdm-dark .hdm-widget-item:hover {
  background: #343A40 !important;
}
.hdm-widget.hdm-dark .hdm-widget-stats {
  background: #23272B;
  border-color: #3A3F44;
}
.hdm-widget.hdm-dark .hdm-widget-stat { color: #9CA3AF; }
.hdm-widget.hdm-dark .hdm-widget-btn-propose {
  background: #818CF8;
}
.hdm-widget.hdm-dark .hdm-widget-btn-propose:hover {
  background: #6366F1;
}

/* ── Mode sombre — zone commentaires page individuelle ── */
body.hdm-dark-mode .hdm-lc-top,
body.hdm-dark-mode [style*="background:#EFF6FF"],
body.hdm-dark-mode [style*="background:#F8FAFF"],
body.hdm-dark-mode [style*="background:#FAFAFA"] {
  background: #23272B !important;
  border-color: #3A3F44 !important;
}
body.hdm-dark-mode .hdm-add-comment-form,
body.hdm-dark-mode .hdm-lc-bottom {
  background: #23272B !important;
  border-color: #3A3F44 !important;
}
body.hdm-dark-mode .hdm-lc-list {
  background: #2C3136;
}
/* Textes commentaires */
body.hdm-dark-mode [style*="color:#111827"],
body.hdm-dark-mode [style*="color:#1F2937"],
body.hdm-dark-mode [style*="color:#374151"] {
  color: #F1F3F5 !important;
}
body.hdm-dark-mode [style*="color:#6B7280"],
body.hdm-dark-mode [style*="color:#9CA3AF"] {
  color: #9CA3AF !important;
}
/* Items commentaires dans page individuelle */
body.hdm-dark-mode .hdm-comment-item {
  border-color: #3A3F44 !important;
  background: transparent;
}
body.hdm-dark-mode .hdm-comment-item [style*="color:#111827"] {
  color: #F1F3F5 !important;
}
body.hdm-dark-mode .hdm-comment-item p {
  color: #E5E7EB !important;
}
/* Avatar couleur en mode sombre */
body.hdm-dark-mode [style*="background:#EFF6FF"][style*="border-radius:50%"] {
  background: #2D2F5A !important;
}
/* Boutons filtre commentaires */
body.hdm-dark-mode .hdm-filter-btn,
body.hdm-dark-mode .hdm-fb {
  background: #2C3136 !important;
  border-color: #3A3F44 !important;
  color: #9CA3AF !important;
}
body.hdm-dark-mode .hdm-filter-btn.on,
body.hdm-dark-mode .hdm-fb.on {
  background: #818CF8 !important;
  border-color: #818CF8 !important;
  color: #fff !important;
}
/* Formulaire commentaire page individuelle */
body.hdm-dark-mode .hdm-lc-bottom textarea,
body.hdm-dark-mode .hdm-lc-bottom input,
body.hdm-dark-mode .hdm-add-comment-form textarea,
body.hdm-dark-mode .hdm-add-comment-form input[type="text"],
body.hdm-dark-mode .hdm-add-comment-form input[type="email"] {
  background: #2C3136 !important;
  border-color: #3A3F44 !important;
  color: #F1F3F5 !important;
}
body.hdm-dark-mode .hdm-lc-bottom,
body.hdm-dark-mode .hdm-lc-bottom * {
  color: #F1F3F5;
}
/* Pagination commentaires */
body.hdm-dark-mode [style*="background:#FAFAFA"][style*="border"] {
  background: #23272B !important;
  border-color: #3A3F44 !important;
}

/* ── Mode sombre — accordéons page individuelle ── */
body.hdm-dark-mode details {
  border-color: #3A3F44 !important;
  background: #2C3136;
}
body.hdm-dark-mode details summary {
  background: #343A40 !important;
  color: #F1F3F5 !important;
  border-color: #3A3F44 !important;
}
body.hdm-dark-mode details[open] summary {
  border-bottom-color: #3A3F44 !important;
}
body.hdm-dark-mode details > div {
  background: #2C3136 !important;
  color: #E5E7EB !important;
}
/* Accordéons why/what (fond coloré) */
body.hdm-dark-mode .hdm-lcard-bottom [style*="background:#EFF6FF"],
body.hdm-dark-mode .hdm-lcard-bottom [style*="background:#F0F9FF"] {
  background: #1A2640 !important;
  border-color: #2D4A6E !important;
}
body.hdm-dark-mode .hdm-lcard-bottom [style*="background:#F0FDF4"],
body.hdm-dark-mode .hdm-lcard-bottom [style*="background:#D1FAE5"] {
  background: #0D2318 !important;
  border-color: #1A4731 !important;
}
/* Titres h4 dans why/what */
body.hdm-dark-mode .hdm-lcard-bottom h4 {
  color: #93C5FD !important;
}
body.hdm-dark-mode .hdm-lcard-bottom [style*="color:#0C447C"] { color: #93C5FD !important; }
body.hdm-dark-mode .hdm-lcard-bottom [style*="color:#065F46"] { color: #6EE7B7 !important; }
/* Barre progression */
body.hdm-dark-mode .hdm-lcard-bottom [style*="background:#E5E7EB"][style*="border-radius:99px"] {
  background: #3A3F44 !important;
}

/* ── Mode sombre — transition douce sur toute la page ── */
body.hdm-dark-mode,
body.hdm-dark-mode *:not(img):not(video):not(iframe):not(svg):not(canvas) {
  transition: background-color 0.25s ease, color 0.2s ease, border-color 0.2s ease !important;
}
/* Images et médias : pas d'inversion, légère opacité */
body.hdm-dark-mode img,
body.hdm-dark-mode video {
  opacity: 0.92;
}
/* Liens en mode sombre */
body.hdm-dark-mode a:not([class]) {
  color: #93C5FD;
}
body.hdm-dark-mode a:not([class]):hover {
  color: #BFDBFE;
}
/* Texte général */
body.hdm-dark-mode p:not([style]),
body.hdm-dark-mode li:not([style]),
body.hdm-dark-mode span:not([style]),
body.hdm-dark-mode h1:not([style]),
body.hdm-dark-mode h2:not([style]),
body.hdm-dark-mode h3:not([style]),
body.hdm-dark-mode h4:not([style]),
body.hdm-dark-mode h5:not([style]),
body.hdm-dark-mode h6:not([style]) {
  color: #F1F3F5;
}
/* Overrides WPBakery spécifiques */
body.hdm-dark-mode .vc_row,
body.hdm-dark-mode .vc_section,
body.hdm-dark-mode .vc_column_inner,
body.hdm-dark-mode .wpb_wrapper {
  background-color: #212529 !important;
}
body.hdm-dark-mode .vc_separator .vc_sep_line,
body.hdm-dark-mode .vc_row-separator svg path {
  fill: #3A3F44 !important;
  stroke: #3A3F44 !important;
}

/* ── Accordéons modal — flèche rotation ── */
/* Exclure l'accordéon synthèse (.hdm-synthesis-accordion) de la rotation */
.hdm-modal-body details[class="hdm-accordion"] summary span,
.hdm-modal-content details:not(.hdm-synthesis-accordion) summary span {
  display: inline-block;
  transition: transform .2s;
}
.hdm-modal-body details[open] summary span,
.hdm-modal-content details[open]:not(.hdm-synthesis-accordion) summary span {
  transform: rotate(90deg);
}

/* ── Synthèse — Commentaires retenus ── */
.hdm-comment-retained .hdm-comment-bubble {
  border-left: 3px solid #7C3AED !important;
  background: #F5F3FF !important;
}
.hdm-comment-retained .hdm-comment-bubble::before {
  background: #7C3AED !important;
}
.hdm-retain-btn {
  transition: color .15s, font-weight .15s;
}
.hdm-retain-btn:hover {
  color: #7C3AED !important;
}
/* Panneau synthèse — titre toujours horizontal, pas de rotation */
.hdm-synthesis-panel .hdm-synthesis-accordion summary::-webkit-details-marker { display:none; }
.hdm-synthesis-panel .hdm-synthesis-accordion summary span { display: inline !important; transform: none !important; writing-mode: initial !important; }
.hdm-synthesis-form textarea { transition: border-color .15s; }
.hdm-synthesis-form textarea:focus { border-color: #7C3AED !important; outline: none; }
