/**
 * Lot Brokers partenaires — page /brokers/ et bloc de l'accueil.
 * Cartes centrées (logo, nom, bouton, fiche, avertissement), sans note ni étoiles.
 */

/* ------------------------------------------------------------------ logo (ou initiale) */
.mw-brk-logo { display: grid; place-items: center; flex: none; width: 72px; height: 72px; border-radius: 16px; overflow: hidden; background: var(--mw-surface-2); border: 1px solid var(--mw-line); }
.mw-brk-logo img { width: 100%; height: 100%; object-fit: contain; }
.mw-brk-logo--img { background: transparent; border-color: transparent; }
.mw-brk-logo--sm { width: 48px; height: 48px; border-radius: 12px; }
.mw-brk-logo--fallback { font-family: var(--mw-font-display, inherit); font-size: 1.75rem; font-weight: 700; color: var(--mw-accent); background: var(--mw-accent-soft); border-color: transparent; }
.mw-brk-logo--sm.mw-brk-logo--fallback { font-size: 1.25rem; }

/* ------------------------------------------------------------------ carte */
.mw-brk-grid { display: grid; gap: var(--mw-s-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mw-brk-grid[data-count="1"], .mw-brk-grid[data-count="2"] { grid-template-columns: repeat(auto-fit, minmax(240px, 340px)); justify-content: center; }
.mw-brk-grid > li, .mw-brk-row > li { display: flex; min-width: 0; }
.mw-brk-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--mw-s-2); width: 100%;
  padding: var(--mw-s-5) var(--mw-s-4) var(--mw-s-4); text-align: center;
  background: var(--mw-surface); border: 1px solid var(--mw-line); border-radius: var(--mw-r-lg);
  transition: border-color var(--mw-dur, .2s);
}
.mw-brk-card:hover { border-color: var(--mw-line-strong); }
.mw-brk-card__name { font-family: var(--mw-font-body); font-size: var(--mw-fs-base); font-weight: 700; letter-spacing: 0; color: var(--mw-text); margin-top: 4px; }
.mw-brk-card__reg { display: flex; align-items: flex-start; justify-content: center; gap: 6px; font-size: var(--mw-fs-xs); color: var(--mw-text-2); line-height: 1.4; max-width: 30ch; }
.mw-brk-card__reg .mw-icon { flex: none; width: 14px; height: 14px; margin-top: 1px; color: var(--mw-text-3); }
.mw-brk-cta { margin-top: 6px; }
.mw-brk-card__more { display: inline-flex; align-items: center; min-height: 32px; font-size: var(--mw-fs-sm); font-weight: 600; color: var(--mw-accent); text-decoration: none; }
.mw-brk-card__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.mw-brk-card__risk { margin-top: auto; padding-top: 6px; font-size: 11px; line-height: 1.45; color: var(--mw-text-3); max-width: 34ch; }
.mw-brk-flags { position: absolute; top: 10px; right: 10px; }
.mw-brk-sheet .mw-brk-flags { position: static; margin-left: auto; }

/* ------------------------------------------------------------------ mentions */
.mw-brk-disclosure { display: flex; align-items: flex-start; gap: 6px; font-size: 11px; line-height: 1.45; color: var(--mw-text-3); }
.mw-brk-disclosure .mw-icon { flex: none; width: 13px; height: 13px; margin-top: 1px; }
.mw-brk-adminnote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--mw-warn); border-radius: var(--mw-r-md); background: var(--mw-warn-soft); font-size: var(--mw-fs-sm); color: var(--mw-text-2); }

/* ------------------------------------------------------------------ bloc de l'accueil */
.mw-brk-row { display: grid; gap: var(--mw-s-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 48rem) {
  .mw-brk-row[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mw-brk-row[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.mw-brk-row[data-count="1"] { grid-template-columns: minmax(0, 320px); }
.mw-brk-card--mini { padding: var(--mw-s-4) var(--mw-s-3) var(--mw-s-3); gap: 6px; background: var(--mw-bg-2, var(--mw-surface-2)); border-radius: var(--mw-r-md); }
.mw-brk-card--mini .mw-brk-card__name { font-size: var(--mw-fs-sm); }
.mw-brk-card--mini .mw-brk-cta { margin-top: 2px; }
/* Téléphone : une carte par ligne, logo et nom côte à côte, bouton sur toute la largeur. */
@media (max-width: 47.99rem) {
  .mw-brk-row, .mw-brk-row[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
  .mw-brk-card--mini {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--mw-s-3); row-gap: 0; align-items: center; text-align: left;
    grid-template-areas: "flags flags" "logo name" "logo more" "cta cta" "risk risk"; padding: var(--mw-s-3);
  }
  .mw-brk-card--mini .mw-brk-flags { grid-area: flags; position: static; justify-self: start; margin-bottom: 6px; }
  .mw-brk-card--mini .mw-brk-logo { grid-area: logo; }
  .mw-brk-card--mini .mw-brk-card__name { grid-area: name; align-self: end; margin-top: 0; }
  .mw-brk-card--mini .mw-brk-card__more { grid-area: more; align-self: start; min-height: 24px; }
  .mw-brk-card--mini .mw-brk-cta { grid-area: cta; margin-top: 10px; width: 100%; justify-content: center; }
  .mw-brk-card--mini .mw-brk-card__risk { grid-area: risk; max-width: none; padding-top: 8px; }
}

/* ------------------------------------------------------------------ tableau */
.mw-brk-table td, .mw-brk-table th { white-space: normal; vertical-align: top; }
.mw-brk-table th[scope="row"] { white-space: nowrap; font-weight: 700; }
.mw-brk-table__lines { display: block; min-width: 0; }
.mw-brk-table__line { display: block; }
.mw-brk-table__line + .mw-brk-table__line { margin-top: 4px; }
.mw-brk-table__cta { text-align: right; white-space: nowrap; }
.mw-brk-table__cta .mw-brk-cta { margin-top: 0; }

/* ------------------------------------------------------------------ fiches */
.mw-brk-sheets { display: grid; gap: var(--mw-s-5); }
@media (min-width: 64rem) { .mw-brk-sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.mw-brk-sheet { display: grid; gap: var(--mw-s-3); scroll-margin-top: calc(var(--mw-header-h) + var(--mw-s-4)); }
.mw-brk-sheet__head { display: flex; align-items: center; gap: var(--mw-s-3); }
.mw-brk-sheet__tag { display: flex; align-items: flex-start; gap: 6px; font-size: var(--mw-fs-xs); font-weight: 600; color: var(--mw-warn); line-height: 1.35; }
.mw-brk-sheet__tag .mw-icon { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.mw-brk-facts { display: grid; gap: 0; border-top: 1px solid var(--mw-line); }
.mw-brk-facts > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--mw-line); }
@media (min-width: 36rem) { .mw-brk-facts > div { grid-template-columns: 11rem minmax(0, 1fr); gap: var(--mw-s-3); } }
.mw-brk-facts dt { font-size: var(--mw-fs-xs); font-weight: 600; color: var(--mw-text-3); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.mw-brk-facts dd { font-size: var(--mw-fs-sm); color: var(--mw-text); line-height: 1.5; }
.mw-brk-sheet__risk { display: flex; align-items: flex-start; gap: 8px; font-size: var(--mw-fs-sm); color: var(--mw-text-2); }
.mw-brk-sheet__risk .mw-icon { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--mw-warn); }
.mw-brk-sheet__actions { display: flex; flex-wrap: wrap; gap: var(--mw-s-2); }
.mw-brk-sheet__actions .mw-brk-cta { margin-top: 0; }
.mw-brk-sheet__checked { font-size: 11px; color: var(--mw-text-3); }

/* ------------------------------------------------------------------ vérifications */
.mw-brk-checks { display: grid; gap: var(--mw-s-4); margin-block: var(--mw-s-5); }
@media (min-width: 48rem) { .mw-brk-checks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mw-brk-check { display: flex; gap: var(--mw-s-3); padding: var(--mw-s-4); border: 1px solid var(--mw-line); border-radius: var(--mw-r-md); background: var(--mw-surface); }
.mw-brk-check__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--mw-surface-2); color: var(--mw-accent); }
.mw-brk-check__icon .mw-icon { width: 20px; height: 20px; }
.mw-brk-check__title { font-family: var(--mw-font-body); font-size: var(--mw-fs-base); font-weight: 700; letter-spacing: 0; margin-bottom: 4px; }
.mw-brk-check__title .mw-num { color: var(--mw-text-3); }
.mw-brk-check__text { font-size: var(--mw-fs-sm); color: var(--mw-text-2); line-height: 1.55; }
.mw-brk-tools { margin-bottom: var(--mw-s-5); }

/* =====================================================================
 * Page /brokers/ : modèle « comparatif » (colonne de lecture, grandes cartes, sommaire, avis détaillés)
 * ===================================================================== */
.mw-brk-page { padding-block: var(--mw-s-6) var(--mw-s-8); }
.mw-brk-article { max-width: 880px; display: grid; gap: var(--mw-s-6); }
.mw-brk-article p { color: var(--mw-text-2); line-height: 1.65; }
.mw-brk-article p strong { color: var(--mw-text); }
.mw-brk-block { display: grid; gap: var(--mw-s-3); scroll-margin-top: calc(var(--mw-header-h) + var(--mw-s-4)); min-width: 0; }
.mw-brk-h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.2; color: var(--mw-text); margin-bottom: 2px; }
.mw-brk-h3 { font-family: var(--mw-font-body); font-size: var(--mw-fs-base); font-weight: 700; letter-spacing: 0; color: var(--mw-text); }
.mw-brk-h3 .mw-num { color: var(--mw-text-3); }
.mw-brk-logo--xs { width: 32px; height: 32px; border-radius: 8px; }
.mw-brk-logo--xs.mw-brk-logo--fallback { font-size: 1rem; }

/* auteur, langue, mise à jour */
.mw-brk-meta { display: flex; flex-wrap: wrap; gap: var(--mw-s-2) 0; }
.mw-brk-meta > div { padding-inline: var(--mw-s-4); border-left: 1px solid var(--mw-line); }
.mw-brk-meta > div:first-child { padding-left: 0; border-left: 0; }
.mw-brk-meta dt { font-size: var(--mw-fs-xs); color: var(--mw-text-3); }
.mw-brk-meta dd { font-size: var(--mw-fs-sm); font-weight: 600; color: var(--mw-text); }
.mw-brk-intro { font-size: var(--mw-fs-md, 1.0625rem); margin-top: calc(-1 * var(--mw-s-3)); }

/* grandes cartes */
.mw-brk-list { display: grid; gap: var(--mw-s-4); }
.mw-brk-item {
  position: relative; display: grid; gap: var(--mw-s-4); padding: var(--mw-s-5);
  background: var(--mw-surface); border: 1px solid var(--mw-line-strong); border-radius: var(--mw-r-lg);
}
.mw-brk-list > li:first-child .mw-brk-item { border-color: color-mix(in srgb, var(--mw-accent) 55%, transparent); background: linear-gradient(180deg, var(--mw-accent-soft), transparent 70%), var(--mw-surface); }
.mw-brk-item__head { display: flex; align-items: center; gap: var(--mw-s-4); min-width: 0; }
.mw-brk-item__id { display: grid; gap: 2px; min-width: 0; }
.mw-brk-item__name { font-family: var(--mw-font-body); font-size: 1.125rem; font-weight: 700; letter-spacing: 0; color: var(--mw-text); }
.mw-brk-item__more { justify-self: start; font-size: var(--mw-fs-sm); font-weight: 600; color: var(--mw-accent); text-decoration: none; min-height: 24px; }
.mw-brk-item__more:hover { text-decoration: underline; text-underline-offset: 3px; }
.mw-brk-item__stats { display: flex; flex-wrap: wrap; gap: var(--mw-s-3) var(--mw-s-6); }
.mw-brk-item__stats > div { display: grid; gap: 2px; }
.mw-brk-item__stats dd { font-size: 1.125rem; font-weight: 700; color: var(--mw-text); line-height: 1.2; }
.mw-brk-item__stats dt { font-size: var(--mw-fs-xs); color: var(--mw-text-3); }
.mw-brk-cta--block { --mw-btn-h: 52px; justify-content: center; margin-top: 0; font-size: var(--mw-fs-base); }
.mw-brk-item__risk { font-size: 11px; color: var(--mw-text-3); text-align: center; margin-top: calc(-1 * var(--mw-s-2)); }
.mw-brk-item .mw-brk-flags { top: 14px; right: 14px; }

/* note en étoiles (affichée seulement si une note est saisie) */
.mw-brk-rating { display: inline-flex; align-items: center; gap: 6px; font-size: var(--mw-fs-sm); color: var(--mw-text); }
.mw-brk-rating__num { font-weight: 700; }
.mw-brk-stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px; color: var(--mw-line-strong); }
.mw-brk-stars::before { content: "★★★★★"; }
.mw-brk-stars > span { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--mw-warn); }
.mw-brk-stars > span::before { content: "★★★★★"; }

/* sommaire */
.mw-brk-toc { padding: var(--mw-s-5); border: 1px solid var(--mw-line); border-radius: var(--mw-r-lg); background: var(--mw-surface); }
.mw-brk-toc__title { font-family: var(--mw-font-body); font-size: var(--mw-fs-base); font-weight: 700; letter-spacing: 0; margin-bottom: var(--mw-s-3); }
.mw-brk-toc__list { display: grid; gap: 2px; }
.mw-brk-toc__list a { display: flex; align-items: center; min-height: 36px; padding-left: var(--mw-s-3); border-left: 2px solid var(--mw-line); color: var(--mw-text-2); font-size: var(--mw-fs-sm); text-decoration: none; }
.mw-brk-toc__list a:hover { color: var(--mw-accent); border-left-color: var(--mw-accent); }

/* comparatif */
.mw-brk-compare { margin-top: var(--mw-s-2); }
.mw-brk-table__broker { display: inline-flex; align-items: center; gap: 10px; color: var(--mw-accent); font-weight: 700; text-decoration: none; }
.mw-brk-table__broker:hover span { text-decoration: underline; text-underline-offset: 3px; }
.mw-brk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mw-brk-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; background: var(--mw-surface-2); border: 1px solid var(--mw-line); font-size: var(--mw-fs-xs); color: var(--mw-text-2); white-space: nowrap; }
.mw-brk-tick { display: inline-grid; place-items: center; }
.mw-brk-tick .mw-icon { width: 20px; height: 20px; stroke-width: 2.5; }
.mw-brk-tick--yes { color: var(--mw-up); }
.mw-brk-tick--no { color: var(--mw-down); }
.mw-brk-table td, .mw-brk-table th { vertical-align: middle; }

/* avis détaillés */
.mw-brk-review { display: grid; gap: var(--mw-s-3); padding-top: var(--mw-s-5); margin-top: var(--mw-s-3); border-top: 1px solid var(--mw-line); scroll-margin-top: calc(var(--mw-header-h) + var(--mw-s-4)); min-width: 0; }
.mw-brk-review__title { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.625rem); line-height: 1.25; color: var(--mw-text); }
.mw-brk-review__checked { font-size: var(--mw-fs-xs); color: var(--mw-text-3) !important; }
.mw-brk-mini { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--mw-s-3) var(--mw-s-4); padding: var(--mw-s-4); border: 1px solid var(--mw-line-strong); border-radius: var(--mw-r-md); background: var(--mw-surface); }
.mw-brk-mini__id { display: grid; gap: 2px; flex: 1 1 160px; min-width: 0; }
.mw-brk-mini__name { font-weight: 700; color: var(--mw-text) !important; line-height: 1.3 !important; }
.mw-brk-mini__risk { font-size: 11px; color: var(--mw-text-3) !important; }
.mw-brk-mini__actions { display: grid; gap: 4px; justify-items: center; }
.mw-brk-mini__actions .mw-brk-cta { margin-top: 0; }
.mw-brk-mini__site { font-size: var(--mw-fs-sm); color: var(--mw-accent); text-decoration: none; min-height: 24px; display: inline-flex; align-items: center; }
.mw-brk-mini__site:hover { text-decoration: underline; text-underline-offset: 3px; }
.mw-brk-mini .mw-brk-flags { position: static; }
.mw-brk-box { display: grid; gap: 4px; padding: var(--mw-s-4); border: 1px solid var(--mw-line); border-radius: var(--mw-r-md); background: var(--mw-surface-2); }
.mw-brk-box p { font-size: var(--mw-fs-sm); line-height: 1.55; }
.mw-brk-box__title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--mw-text) !important; margin-bottom: 4px; }
.mw-brk-box__title .mw-icon { width: 18px; height: 18px; color: var(--mw-accent); }
.mw-brk-article ul.mw-brk-bullets { display: grid; gap: 6px; padding-left: 1.25rem; list-style: disc; color: var(--mw-text-2); line-height: 1.55; }
.mw-brk-bullets li::marker { color: var(--mw-text-3); }
.mw-brk-proscons { display: grid; gap: var(--mw-s-3); }
@media (min-width: 40rem) { .mw-brk-proscons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mw-brk-pc { padding: var(--mw-s-4); border-radius: var(--mw-r-md); border: 1px solid var(--mw-line); }
.mw-brk-pc--pros { background: color-mix(in srgb, var(--mw-up) 9%, transparent); border-color: color-mix(in srgb, var(--mw-up) 28%, transparent); }
.mw-brk-pc--cons { background: color-mix(in srgb, var(--mw-down) 9%, transparent); border-color: color-mix(in srgb, var(--mw-down) 28%, transparent); }
.mw-brk-pc__title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--mw-text) !important; margin-bottom: 8px; }
.mw-brk-pc__title .mw-icon { width: 18px; height: 18px; }
.mw-brk-pc--pros .mw-brk-pc__title .mw-icon { color: var(--mw-up); }
.mw-brk-pc--cons .mw-brk-pc__title .mw-icon { color: var(--mw-down); }
.mw-brk-pc ul { display: grid; gap: 6px; padding-left: 1.125rem; list-style: disc; font-size: var(--mw-fs-sm); color: var(--mw-text-2); line-height: 1.5; }

/* critères et profils */
.mw-brk-criteria { display: grid; gap: var(--mw-s-4); }
.mw-brk-criteria li { display: grid; gap: 4px; }
.mw-brk-profiles { display: grid; gap: var(--mw-s-3); }
@media (min-width: 48rem) { .mw-brk-profiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mw-brk-profile { display: grid; gap: 6px; align-content: start; padding: var(--mw-s-4); border: 1px solid var(--mw-line); border-radius: var(--mw-r-md); background: var(--mw-surface); }
.mw-brk-profile p { font-size: var(--mw-fs-sm); }
.mw-brk-profile__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--mw-surface-2); color: var(--mw-accent); margin-bottom: 4px; }
.mw-brk-profile__icon .mw-icon { width: 20px; height: 20px; }
.mw-brk-list--compact { gap: var(--mw-s-3); margin-top: var(--mw-s-2); }

@media (max-width: 39.99rem) {
  .mw-brk-item { padding: var(--mw-s-4); }
  .mw-brk-mini__actions { flex: 1 1 100%; justify-items: stretch; }
  .mw-brk-mini__actions .mw-brk-cta { width: 100%; justify-content: center; }
  .mw-brk-mini__site { justify-content: center; }
}

/* comparatif : tout tient dans la colonne de lecture sur ordinateur */
@media (min-width: 48rem) {
  .mw-brk-compare .mw-table th, .mw-brk-compare .mw-table td { padding: 12px 10px; white-space: normal; }
  .mw-brk-compare .mw-table thead th { font-size: 11px; letter-spacing: .02em; }
  .mw-brk-compare .mw-table th[scope="row"] { white-space: nowrap; }
  .mw-brk-compare .mw-table td.mw-num { white-space: nowrap; }
}
