/* =====================================================================
   Aubin Gilles Digital — Styles du gestionnaire de consentement
   (bannière + centre de préférences + bouton flottant)
   Réutilise la charte du site (variables :root de styles.css).
   ===================================================================== */

.agc-scrim {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(3, 4, 10, .62); backdrop-filter: blur(4px);
  animation: agc-fade .35s var(--ease, ease) both;
}

@keyframes agc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes agc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ----------------------------- Bannière ----------------------------- */
.agc-banner {
  position: fixed; z-index: 9100; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem);
  left: auto; margin: 0; width: min(920px, calc(100vw - 2rem)); box-sizing: border-box;
  max-height: calc(100vh - 2rem); overflow: auto;
  display: flex; flex-direction: column; align-items: stretch; gap: 1rem;
  padding: 1.3rem 1.5rem; border-radius: 18px;
  background: rgba(10, 12, 24, .96); border: 1px solid var(--glass-border, rgba(255,255,255,.12));
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
  color: var(--ink, #f4f6ff); font-family: "Space Grotesk", system-ui, sans-serif;
  animation: agc-rise .45s var(--ease, ease) both;
}
.agc-banner__body { min-width: 0; }
.agc-banner__title { font-family: "Sora", sans-serif; font-size: 1.05rem; font-weight: 600; margin: 0 0 .35rem; }
.agc-banner__text { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--ink-dim, #aab1d4); }
.agc-banner__text a { color: var(--ink, #fff); text-decoration: underline; text-underline-offset: 2px; }
.agc-banner__text a:hover { color: var(--violet, #9a6bff); }
/* Les 3 boutons côte à côte, en dessous du texte, partageant la largeur */
.agc-banner__actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.agc-banner__actions .agc-btn { flex: 1 1 0; min-width: max-content; justify-content: center; text-align: center; }

@media (max-width: 760px) {
  .agc-banner { padding: 1.2rem; }
}

/* ----------------------------- Boutons ----------------------------- */
.agc-btn {
  font-family: "Sora", sans-serif; font-weight: 600; font-size: .85rem;
  padding: .7rem 1.15rem; border-radius: 11px; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s var(--ease, ease), background .25s, border-color .25s, color .25s; white-space: nowrap;
}
.agc-btn:hover { transform: translateY(-1px); }
.agc-btn--primary { background: var(--grad-btn, linear-gradient(120deg,#4f7cff,#9a6bff)); color: #fff; }
.agc-btn--ghost { background: rgba(255,255,255,.04); border-color: var(--glass-border, rgba(255,255,255,.14)); color: var(--ink, #f4f6ff); }
.agc-btn--ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.28); }

/* ------------------------ Centre de préférences ------------------------ */
.agc-modal {
  position: fixed; z-index: 9200; inset: 0; display: grid; place-items: center; padding: 1rem;
}
.agc-modal__panel {
  width: min(620px, 100%); max-height: 88vh; overflow: auto;
  background: rgba(10, 12, 24, .98); border: 1px solid var(--glass-border, rgba(255,255,255,.12));
  border-radius: 22px; padding: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink, #f4f6ff); font-family: "Space Grotesk", system-ui, sans-serif;
  box-shadow: 0 40px 100px -25px rgba(0,0,0,.8); animation: agc-rise .4s var(--ease, ease) both;
}
.agc-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.agc-modal__head h2 { font-family: "Sora", sans-serif; font-size: 1.25rem; font-weight: 600; margin: 0; }
.agc-modal__close { background: rgba(255,255,255,.05); border: 1px solid var(--glass-border, rgba(255,255,255,.12)); color: var(--ink-dim,#aab1d4); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: .9rem; transition: color .2s, background .2s; }
.agc-modal__close:hover { color: #fff; background: rgba(255,255,255,.1); }
.agc-modal__intro { font-size: .9rem; line-height: 1.55; color: var(--ink-dim, #aab1d4); margin: .8rem 0 1.4rem; }
.agc-modal__intro a, .agc-cat__desc a { color: var(--ink, #fff); text-decoration: underline; text-underline-offset: 2px; }

.agc-cats { display: flex; flex-direction: column; gap: .9rem; }
.agc-cat { border: 1px solid var(--glass-border, rgba(255,255,255,.1)); border-radius: 14px; padding: 1rem 1.1rem; background: rgba(255,255,255,.025); }
.agc-cat__head { display: flex; align-items: flex-start; gap: 1rem; }
.agc-cat__name { font-family: "Sora", sans-serif; font-weight: 600; font-size: .98rem; margin: 0 0 .3rem; }
.agc-cat__count { display: inline-block; margin-left: .4rem; font-family: "Space Grotesk", sans-serif; font-weight: 400; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--violet, #9a6bff); vertical-align: middle; }
.agc-cat__desc { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--ink-dim, #aab1d4); }

.agc-modal__actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1.6rem; }
@media (max-width: 560px) { .agc-modal__actions { justify-content: stretch; } .agc-modal__actions .agc-btn { flex: 1 1 auto; } }

/* ------------------------------ Switch ------------------------------ */
.agc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.agc-switch input { opacity: 0; width: 0; height: 0; }
.agc-switch__slider { position: absolute; inset: 0; cursor: pointer; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid var(--glass-border, rgba(255,255,255,.14)); transition: background .3s, border-color .3s; }
.agc-switch__slider::before { content: ""; position: absolute; left: 3px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease, ease); }
.agc-switch input:checked + .agc-switch__slider { background: var(--grad-btn, linear-gradient(120deg,#4f7cff,#9a6bff)); border-color: transparent; }
.agc-switch input:checked + .agc-switch__slider::before { transform: translate(20px, -50%); }
.agc-switch input:disabled + .agc-switch__slider { opacity: .65; cursor: not-allowed; background: linear-gradient(120deg,#3a4a86,#6a54a8); }

/* --------------------------- Bouton flottant --------------------------- */
.agc-fab {
  position: fixed; z-index: 8000; left: clamp(.8rem, 2vw, 1.4rem); bottom: clamp(.8rem, 2vw, 1.4rem);
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1;
  background: rgba(10, 12, 24, .9); border: 1px solid var(--glass-border, rgba(255,255,255,.14));
  color: #fff; box-shadow: 0 12px 30px -10px rgba(0,0,0,.6); transition: transform .25s var(--ease, ease), background .25s;
}
.agc-fab:hover { transform: translateY(-2px) scale(1.05); background: rgba(20, 22, 40, .95); }

@media (prefers-reduced-motion: reduce) {
  .agc-scrim, .agc-banner, .agc-modal__panel { animation: none; }
  .agc-btn:hover, .agc-fab:hover { transform: none; }
}
