/*
 * HDM 1.3.60 — Les cartes des idées et des débats : retouches (ÉCRAN 588) et styles (ÉCRAN 589).
 * Kad, 8/11/2026 : « pas de liseré en haut mais juste après l'image » ; « ok pour tout, je veux tout ».
 * Le style est une classe posée sur le tableau (.hdm-style-…) ; la vue « Liste » garde son dessin.
 * Règles fortes (!important) : le thème du site (Essentials, WPBakery) colore et dimensionne après les extensions.
 */

/* ── ÉCRAN 588 — toutes les cartes en grille ─────────────────────────────────────────────────────────────── */
/* ① plus de liseré en haut ; un liseré de 3 px juste sous la photo (sans photo : au-dessus du bandeau des badges) */
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-accent{display:none!important}
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{border-bottom:3px solid var(--hdm-accent,#0068E8)!important}
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card.hdm60-sans-photo .hdm1314-bande{border-top:3px solid var(--hdm-accent,#0068E8)!important}
/* ② les badges : fond pastel très clair, texte en couleur, légèrement arrondis, sans bordure (grille et liste) */
.hdm-board .hdm-card .hdm1314-bande .hdm-theme-badge{background:#F1E8FC!important;color:#8224E3!important;border:0!important;border-radius:6px!important}
.hdm-board .hdm-card .hdm1314-bande .hdm60-st{background:color-mix(in srgb,var(--pz,#6B7280) 12%,#fff)!important;color:var(--pz,#6B7280)!important;border:0!important;border-radius:6px!important}
/* ③ le pied : le cœur et le lien ↗ sans fond ; au survol, au clic (et une fois soutenu) : fond blanc, couleur de la carte */
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-vote,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-page-link{background:transparent!important;color:var(--hdm-sur,#fff)!important;border:0!important;border-radius:6px!important;box-shadow:none!important}
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-vote:hover,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-vote:focus-visible,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-vote:active,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-vote.hdm-btn-voted,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-page-link:hover,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-page-link:focus-visible,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-page-link:active{background:#fff!important;color:var(--hdm-accent,#0068E8)!important}
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-read:hover,
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-read:focus-visible{text-decoration:underline!important;text-underline-offset:3px}

/* ── Pieds « clairs » (Horizontale, Épurée) : pas de bandeau de couleur, les actions à la couleur de la carte ── */
.hdm-board:is(.hdm-style-horizontale,.hdm-style-epuree) .hdm-cards:not(.hdm-list-view) .hdm-card-footer{background:transparent!important;border-top:1px solid #eef0f5!important}
.hdm-board:is(.hdm-style-horizontale,.hdm-style-epuree) .hdm-cards:not(.hdm-list-view) .hdm-card-footer :is(.hdm-btn-vote,.hdm-btn-read,.hdm-btn-page-link){color:var(--hdm-accent,#0068E8)!important;background:transparent!important}
.hdm-board:is(.hdm-style-horizontale,.hdm-style-epuree) .hdm-cards:not(.hdm-list-view) .hdm-card-footer :is(.hdm-btn-vote,.hdm-btn-page-link):is(:hover,:focus-visible,:active,.hdm-btn-voted){background:color-mix(in srgb,var(--hdm-accent,#0068E8) 12%,#fff)!important}

/* ── B — Affiche : la photo occupe toute la carte, le titre écrit dessus en blanc ──────────────────────────── */
.hdm-board.hdm-style-affiche .hdm-cards:not(.hdm-list-view) .hdm-card{position:relative;display:flex!important;flex-direction:column;justify-content:flex-end;min-height:calc(400px * var(--hdm-fs,1));overflow:hidden;background:var(--hdm-accent,#0068E8)!important;border:0!important}
.hdm-board.hdm-style-affiche .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{position:absolute!important;inset:0;height:auto!important;max-height:none!important;margin:0!important;border:0!important;z-index:0}
.hdm-board.hdm-style-affiche .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover}
.hdm-board.hdm-style-affiche .hdm-cards:not(.hdm-list-view) .hdm-card::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,12,20,.25) 0,rgba(10,12,20,0) 22%,rgba(10,12,20,0) 35%,rgba(10,12,20,.86) 78%);pointer-events:none;z-index:1}
.hdm-board.hdm-style-affiche .hdm-cards:not(.hdm-list-view) .hdm-card>:not(.hdm-card-image){position:relative;z-index:2}

/* ── F — Teintée : la photo teintée de la couleur du statut, le titre dessus ───────────────────────────────── */
.hdm-board.hdm-style-teintee .hdm-cards:not(.hdm-list-view) .hdm-card{position:relative;display:flex!important;flex-direction:column;justify-content:flex-end;min-height:calc(260px * var(--hdm-fs,1));overflow:hidden;background:var(--hdm-accent,#0068E8)!important;border:0!important}
.hdm-board.hdm-style-teintee .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{position:absolute!important;inset:0;height:auto!important;max-height:none!important;margin:0!important;border:0!important;z-index:0;filter:grayscale(.35)}
.hdm-board.hdm-style-teintee .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover}
.hdm-board.hdm-style-teintee .hdm-cards:not(.hdm-list-view) .hdm-card::after{content:"";position:absolute;inset:0;background:var(--hdm-accent,#0068E8);mix-blend-mode:multiply;opacity:.8;pointer-events:none;z-index:1}
.hdm-board.hdm-style-teintee .hdm-cards:not(.hdm-list-view) .hdm-card>:not(.hdm-card-image){position:relative;z-index:2}

/* Affiche et Teintée : ce qui est posé sur la photo */
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm1314-bande{position:absolute!important;top:0;left:0;right:0;background:transparent!important;border:0!important;padding:12px!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm1314-bande :is(.hdm-theme-badge,.hdm60-st){background:rgba(255,255,255,.94)!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm1314-plus{color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.5)}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-body{background:transparent!important;padding:0 16px 4px!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card :is(.hdm-card-title,.hdm-card-title a){color:#fff!important;text-shadow:0 1px 3px rgba(0,0,0,.35)}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card :is(.hdm-category-badge,.hdm-card-excerpt,.hdm-card-stats){display:none!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-progress-bar{background:rgba(255,255,255,.3)!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-progress-fill{background:#fff!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-progress-label{color:#fff!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer{background:transparent!important;--hdm-sur:#fff}
.hdm-board.hdm-style-teintee .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-progress-wrap{display:none!important}

/* ── C — Horizontale : la photo à gauche, le texte à droite ; deux cartes par ligne ────────────────────────── */
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view){grid-template-columns:repeat(2,minmax(0,1fr))!important}
.hdm-board.hdm-style-horizontale .hdm-cols{display:none!important}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card{display:grid!important;grid-template-columns:40% minmax(0,1fr);grid-template-rows:auto 1fr auto;border:1px solid #e3e5ec!important;border-left:4px solid var(--hdm-accent,#0068E8)!important}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{grid-column:1;grid-row:1 / 4;height:100%!important;max-height:none!important;min-height:200px;border:0!important;margin:0!important}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image img{width:100%!important;height:100%!important;max-height:none!important;object-fit:cover}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card>:not(.hdm-card-image){grid-column:2}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card.hdm60-sans-photo{grid-template-columns:minmax(0,1fr)}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card.hdm60-sans-photo>*{grid-column:1}
.hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card .hdm1314-bande{background:transparent!important;border-top:0!important}
@media (max-width:900px){
  .hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view){grid-template-columns:minmax(0,1fr)!important}
}
@media (max-width:560px){
  .hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card{grid-template-columns:minmax(0,1fr)}
  .hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card>*{grid-column:1!important}
  .hdm-board.hdm-style-horizontale .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{grid-row:auto;height:180px!important;min-height:0}
}

/* ── D — Épurée : sans photo ; un liseré de couleur en haut, les badges, le texte ─────────────────────────── */
.hdm-board.hdm-style-epuree .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{display:none!important}
.hdm-board.hdm-style-epuree .hdm-cards:not(.hdm-list-view) .hdm-card{border:1px solid #e3e5ec!important;border-top:4px solid var(--hdm-accent,#0068E8)!important}
.hdm-board.hdm-style-epuree .hdm-cards:not(.hdm-list-view) .hdm-card .hdm1314-bande{background:transparent!important;border-top:0!important;padding-top:14px!important}
.hdm-board.hdm-style-epuree .hdm-cards:not(.hdm-list-view) .hdm-card :is(.hdm-card-title,.hdm-card-title a){color:#1f2330!important}

/* ── E — Compacte : une petite vignette, le titre, le statut, la jauge ; trois par ligne ───────────────────── */
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view){grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
.hdm-board.hdm-style-compacte .hdm-cols{display:none!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card{display:grid!important;grid-template-columns:72px minmax(0,1fr) auto;grid-template-areas:"im ba vo" "im ti vo" "im pr vo";column-gap:12px;row-gap:3px;align-items:center;padding:10px 12px!important;border:1px solid #e3e5ec!important;border-left:4px solid var(--hdm-accent,#0068E8)!important;min-height:0!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card.hdm60-sans-photo{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"ba vo" "ti vo" "pr vo"}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image{grid-area:im;width:72px!important;height:72px!important;max-height:none!important;margin:0!important;border:0!important;overflow:hidden}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-image img{width:72px!important;height:72px!important;max-height:none!important;object-fit:cover}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm1314-bande{grid-area:ba;background:transparent!important;border:0!important;padding:0!important;min-height:0!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card :is(.hdm-theme-badge,.hdm1314-plus,.hdm1314-type,.hdm-badge){display:none!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-body{display:contents!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-title{grid-area:ti;margin:0!important;font-size:calc(14px * var(--hdm-fs,1))!important;line-height:1.3!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card :is(.hdm-category-badge,.hdm-card-excerpt,.hdm-card-stats,.hdm-progress-label){display:none!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-progress-wrap{grid-area:pr;margin:2px 0 0!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer{grid-area:vo;background:transparent!important;padding:0!important;border:0!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer :is(.hdm-btn-read,.hdm-btn-page-link){display:none!important}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer .hdm-btn-vote{color:var(--hdm-accent,#0068E8)!important;background:transparent!important;flex-direction:column;gap:0;font-weight:700}
.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer .hdm-btn-vote:is(:hover,:focus-visible,:active,.hdm-btn-voted){background:color-mix(in srgb,var(--hdm-accent,#0068E8) 12%,#fff)!important}
@media (max-width:1100px){.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view){grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:640px){.hdm-board.hdm-style-compacte .hdm-cards:not(.hdm-list-view){grid-template-columns:minmax(0,1fr)!important}}
/* Affiche et Teintée : le texte reste en bas de la photo, jamais sous les badges du haut */
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card{padding-top:calc(52px * var(--hdm-fs,1))!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-body{flex:0 0 auto!important;margin-top:auto!important;height:auto!important;min-height:0!important}
.hdm-board:is(.hdm-style-affiche,.hdm-style-teintee) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer{flex:0 0 auto!important;margin-top:0!important}
/* 1.3.61 (Kad, 8/11 : « les cartes doivent toujours avoir une taille égale ») : une marge du thème ou du constructeur n'a
   plus prise sur une carte de la grille ; toutes celles d'une rangée prennent sa hauteur. */
.hdm-board .hdm-cards:not(.hdm-list-view)>.hdm-card{margin:0!important;align-self:stretch!important;height:auto!important}
/* 1.3.62 — (1) la même protection qu'HPM : un <p> automatique glissé dans la grille par le thème s'efface. */
.hdm-board .hdm-cards>p{display:contents!important}
.hdm-board .hdm-cards>br,.hdm-board .hdm-cards>p:empty,.hdm-board .hdm-cards .hdm-card p:empty,.hdm-board .hdm-cards .hdm-card-footer br{display:none!important}
.hdm-board .hdm-cards:not(.hdm-list-view)>p>.hdm-card{margin:0!important;align-self:stretch!important;height:auto!important}
/* (2) Kad 8/11, 15 h 38 : le bandeau de couleur du bas, moins haut (62 → 48 px) ; le réglage « Hauteur du bas » reste prioritaire */
.hdm-board:not(.hdm-style-compacte) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer{padding-top:5px!important;padding-bottom:5px!important}
.hdm-board:not(.hdm-style-compacte) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer .hdm-btn{min-height:38px!important;padding-top:4px!important;padding-bottom:4px!important}
.hdm-board:not(.hdm-style-compacte) .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-footer .hdm-btn-page-link{width:34px!important;height:34px!important}
/* (3) Kad 8/11, 15 h 38 : le bandeau des badges sans fond de couleur (vue grille) */
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-header.hdm1314-bande{background:transparent!important;border-bottom:0!important}
body.hdm-dark-mode .hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card .hdm-card-header.hdm1314-bande{background:transparent!important}
/* (4) Kad 8/11, 15 h 38 : une fois soutenu, le cœur garde le fond de la carte — l'icône et le chiffre en blanc (le blanc reste au survol) */
.hdm-board .hdm-cards:not(.hdm-list-view) .hdm-card-footer .hdm-btn-vote.hdm-btn-voted:not(:hover):not(:focus-visible):not(:active){background:transparent!important;color:var(--hdm-sur,#fff)!important;filter:brightness(0) invert(1)}   /* le cœur rouge (emoji) devient blanc, comme le chiffre */
