/* Consentement aux témoins (Loi 25) — BANNIÈRE (surface globale) + boutons. Habillage à parité de la
   remise Claude Design (2026-09-23). Feuille dédiée chargée par base.html HORS des couches css-layers
   (même principe que cms-*.css). Volontairement LÉGÈRE (chargée sur chaque page) : le modal
   « Personnaliser », les lignes de catégories et la page de préférences vivent dans consent-modal.css,
   chargée À LA DEMANDE. CSP-safe : aucune règle inline ; couleurs/rayons/ombres UNIQUEMENT via tokens
   --g4g-* ; espacements en px repris de la maquette. */

/* ── Bannière (ancrée en bas, ne masque pas le contenu — aucun scrim) ───────────────────────── */
.g4g-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  background: var(--g4g-surface);
  border: 1px solid var(--g4g-border);
  border-radius: var(--g4g-radius-md);
  box-shadow: var(--g4g-shadow-lg);
}
.g4g-consent-banner[hidden] {
  display: none;
}
.g4g-consent-banner__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
}
.g4g-consent-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}
.g4g-consent-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--g4g-radius-pill);
  background: var(--g4g-primary-soft);
  color: var(--g4g-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.g4g-consent-copy {
  flex: 1;
  min-width: 0;
}
.g4g-consent-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--g4g-text);
  margin: 0 0 3px;
}
.g4g-consent-text {
  font-size: 13px;
  color: var(--g4g-text-muted);
  line-height: var(--g4g-leading-normal);
  margin: 0;
}
.g4g-consent-text b {
  color: var(--g4g-text);
  font-weight: 600;
}
.g4g-consent-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.g4g-consent-link:focus-visible {
  outline: none;
  box-shadow: var(--g4g-focus-ring);
  border-radius: var(--g4g-radius-sm);
}
.g4g-consent-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Boutons (partagés bannière + modal + page) ────────────────────────────────────────────────── */
.g4g-consent-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--g4g-radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
  white-space: nowrap;
  text-decoration: none;
}
.g4g-consent-btn:focus-visible {
  outline: none;
  box-shadow: var(--g4g-focus-ring);
}
/* Paire d'ÉGALE prééminence — Refuser & Tout accepter partagent EXACTEMENT ce style (Loi 25). */
.g4g-consent-btn--equal {
  background: var(--g4g-surface);
  border: 1.5px solid var(--g4g-primary);
  color: var(--g4g-primary);
}
.g4g-consent-btn--equal:hover {
  background: var(--g4g-primary-soft);
  color: var(--g4g-primary);
}
/* Tertiaire, volontairement discret. */
.g4g-consent-btn--ghost {
  background: transparent;
  border: 1.5px solid transparent;
  color: var(--g4g-primary);
  padding: 0 12px;
}
.g4g-consent-btn--ghost:hover {
  background: var(--g4g-primary-tint);
  color: var(--g4g-primary);
}
/* Action d'enregistrement (≠ paire d'équivalence). */
.g4g-consent-btn--primary {
  background: var(--g4g-primary);
  border: 1.5px solid var(--g4g-primary);
  color: var(--g4g-primary-contrast);
}
.g4g-consent-btn--primary:hover {
  background: var(--g4g-primary-hover);
  border-color: var(--g4g-primary-hover);
  color: var(--g4g-primary-contrast);
}
.g4g-consent-btn--block {
  flex: 1;
}

/* ── Mobile : bannière en panneau ancré, actions empilées (cibles ≥ 44 px) ──────────────────── */
@media (max-width: 640px) {
  .g4g-consent-banner {
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: var(--g4g-radius-lg);
  }
  .g4g-consent-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px;
  }
  .g4g-consent-head {
    align-items: flex-start;
  }
  /* Actions empilées : Refuser + Tout accepter côte à côte (rangée 1, largeur égale — Loi 25),
     Personnaliser pleine largeur dessous (rangée 2). */
  .g4g-consent-actions {
    flex-wrap: wrap;
    gap: 9px;
  }
  .g4g-consent-actions [data-consent-refuse] {
    order: 1;
    flex: 1 1 0;
  }
  .g4g-consent-actions [data-consent-accept] {
    order: 2;
    flex: 1 1 0;
  }
  .g4g-consent-actions .g4g-consent-btn--ghost {
    order: 3;
    flex: 1 1 100%;
  }
}
