/* =============================================================================
   consent.css  ·  bandeau de consentement pub (pixel OpenAI / ChatGPT Ads)
   -----------------------------------------------------------------------------
   Styles injectes par assets/js/consent.js. La CSP interdit le style inline
   (style-src 'self'), d'ou ce fichier auto-heberge. Variables : tokens.css.
   ========================================================================== */

.consent {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 1000;
  width: min(680px, calc(100vw - 2rem));
  box-sizing: border-box;
  padding: 1.15rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lift);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.consent__text { margin: 0; }

.consent__text strong { font-weight: 600; }

.consent__link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__link:hover { color: var(--bleu-light); }

.consent__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Accepter et Refuser : meme taille, meme poids visuel (exigence CNIL :
   refuser doit etre aussi simple qu'accepter). Seule la couleur les distingue. */
.consent__btn {
  flex: 1 1 auto;
  min-width: 8.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.consent__btn--accept {
  background: var(--orange-cta);
  color: var(--white);
}
.consent__btn--accept:hover { background: var(--orange-cta-hover); }

.consent__btn--refuse {
  background: transparent;
  color: var(--white);
  border-color: var(--sur-sombre-filet-fort);
}
.consent__btn--refuse:hover { background: var(--sur-sombre-filet); }

.consent__btn:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* Lien discret pour rouvrir le choix (retrait du consentement aussi simple
   que son octroi). Injecte une fois une decision prise. */
.consent-reopen {
  position: fixed;
  left: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 999;
  padding: 0.4rem 0.7rem;
  background: var(--white);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.18s ease;
}
.consent-reopen:hover { opacity: 1; }
.consent-reopen:focus-visible {
  outline: 2px solid var(--bleu);
  outline-offset: 2px;
}

@media (min-width: 560px) {
  .consent__actions { justify-content: flex-end; }
  .consent__btn { flex: 0 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .consent__btn, .consent-reopen { transition: none; }
}
