/* =============================================================================
   EconDoctor - cookie consent bar

   Design repris de l'ancienne .cookie-banner : barre sombre pleine largeur,
   texte blanc, liens en or, boutons .btn du site. Ce qui change est le fond
   juridique, pas le look.

   "Accept all" et "Reject all" partagent .btn-accent : sous le RGPD, refuser
   doit etre aussi simple et aussi visible qu'accepter. Ne jamais restyler l'un
   sans l'autre.
   ========================================================================== */

.ed-consent {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--clr-text);
  color: #fff;
  box-shadow: var(--shadow-md);
  z-index: 1200;
  font-family: var(--ff-sans, system-ui, sans-serif);
}

.ed-consent[hidden] { display: none; }

.ed-consent-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  max-width: 1180px;
  margin: 0 auto;
}

.ed-consent a {
  color: var(--clr-accent);
  text-decoration: underline;
}

.ed-consent-copy {
  flex: 1 1 26rem;
  min-width: 0;
}

.ed-consent-title {
  margin: 0 0 .15rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
}

.ed-consent-text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, .88);
}

/* ----------------------------------------------------------------- actions */
.ed-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.ed-consent-actions .btn { white-space: nowrap; }

/* .btn sets display:inline-flex, which beats the user-agent [hidden] rule and
   would leave "Save my choices" on screen before it is asked for. */
.ed-consent-actions .btn[hidden] { display: none; }

/* ------------------------------------------------------------- preferences */
.ed-consent-panel {
  flex-basis: 100%;
  display: grid;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius, 12px);
  background: rgba(255, 255, 255, .06);
}

.ed-consent-panel[hidden] { display: none; }

.ed-consent-opt {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .6rem;
  align-items: start;
  font-size: .88rem;
  line-height: 1.45;
  cursor: pointer;
}

.ed-consent-opt input[type="checkbox"] {
  width: 1.1em;
  height: 1.1em;
  min-height: 0;
  padding: 0;
  margin-top: .18em;
  accent-color: var(--clr-accent, #FEC100);
}

.ed-consent-opt input:disabled { cursor: not-allowed; opacity: .7; }

.ed-consent-desc {
  display: block;
  margin-top: .1rem;
  font-size: .82rem;
  color: rgba(255, 255, 255, .7);
}

.ed-consent-badge {
  display: inline-block;
  margin-inline-start: .45rem;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .02em;
  vertical-align: middle;
}

@media (max-width: 480px) {
  .ed-consent { padding: 1rem; }
  .ed-consent-inner { flex-direction: column; text-align: center; }
  .ed-consent-actions { width: 100%; flex-direction: column; }
  .ed-consent-actions .btn { width: 100%; }
  .ed-consent-opt { text-align: left; }
}

/* -----------------------------------------------------------------------------
   Consent checkboxes inside forms (registration).
   Plain, readable, never pre-ticked.
   -------------------------------------------------------------------------- */
.form-consent {
  display: grid;
  gap: .7rem;
  margin: .25rem 0 1rem;
  text-align: left;
}

.form-consent-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .55rem;
  align-items: start;
  font-size: .84rem;
  line-height: 1.45;
  color: var(--gray-600, #4b5563);
  cursor: pointer;
}

/* .auth-form input sets padding and min-height:48px for text fields; undo it
   here or the checkbox drifts down next to its label. */
.form-consent-item input[type="checkbox"] {
  width: 1.05em;
  height: 1.05em;
  min-height: 0;
  padding: 0;
  margin-top: .18em;
  border-radius: 0;
  accent-color: var(--brand-600, #22558a);
  flex: none;
}

.form-consent-item a { text-decoration: underline; }
