/**
 * Editorial restyle of the Complianz consent banner — dark asymmetric header
 * (site mark + italic serif headline) over a paper body, quieter category
 * rows, brand typography.
 *
 * The header reuses the footer's dark pair (--ag-deep-navy / --ag-cream); the
 * body stays on paper. The brand mark is a data-URI SVG, so its fill can't
 * read a CSS token — the literal #f4eee0 in the base64 below *is* --ag-cream
 * and has to be re-encoded by hand if that token ever moves.
 *
 * Complianz renders every banner class/id from its own generated stylesheet
 * (wp-content/uploads/complianz/css/banner-*.css), which is unlayered and
 * loads without a predictable order relative to this file — the !important
 * flags below are the same escape hatch style.css already uses against
 * WordPress's own unlayered theme.json button styles (see DESIGN.md).
 *
 * `.cmplz-logo` and `.cmplz-close` are intentionally left hidden/untouched:
 * Complianz's generated CSS forces `.cmplz-logo{display:none}` because no
 * {logo} content is configured, and `.cmplz-close{display:none}` is this
 * site's deliberate CNIL-aligned choice (no ambiguous "X closes without a
 * choice" affordance — only the two equal-weight Accept/Refuse buttons and
 * Paramétrer). We repurpose `.cmplz-logo` as a static brand-mark vignette
 * instead of reintroducing a close icon.
 */

/* Dark band, same pair as the site footer (--ag-deep-navy / --ag-cream).
   The negative margins are the banner's own padding (15px 20px, set by
   Complianz's generated stylesheet) turned inside out, so the band bleeds to
   the banner edges instead of floating inside them; the top radius therefore
   has to be repeated here or the navy would square off the two rounded
   corners it now covers. */
.cmplz-cookiebanner .cmplz-header {
  display: flex !important;
  grid-template-columns: unset !important;
  gap: var(--ag-space-sm, 16px);
  align-items: center;

  margin: -15px -20px 0;
  padding: 20px;
  border-radius: var(--ag-radius-md, 4px) var(--ag-radius-md, 4px) 0 0;

  background: var(--ag-deep-navy, #101a2a);
  box-shadow: var(--ag-shadow-md, 0 14px 32px rgb(0 0 0 / 12%));
}

/* Landscape phones (height <= 400px): Complianz shrinks its own padding to
   7px/12px !important and caps the header at 10px, so the band — whose negative
   margins mirror the standard 15px/20px padding — spilled outside the box and
   the title rode over it. Realign on the reduced padding and give the band its
   height back.

   `align-self: start` is what keeps that height honest. Above 768px wide the
   banner is also `display: grid; grid-template-rows: minmax(0, 1fr)`, and the
   header is its first child — so on a landscape phone, where the banner gets a
   fixed height, the header inherited the 1fr row and swallowed every spare
   pixel (220px of band around 26px of title). Complianz's 10px cap hid that by
   crushing it; lifting the cap without this would just uncrush it.

   The selector carries .cmplz-show purely for specificity: Complianz's rule is
   also (0,2,0) AND also !important, and its stylesheet loads after this one, so
   an equally specific !important would lose the tie. */
@media (height <= 400px) {
  .cmplz-cookiebanner.cmplz-show .cmplz-header {
    align-self: start;
    max-height: none !important;
    margin: -7px -12px 7px !important;
    padding: 8px 12px;
  }

  /* 64px of brand mark is a third of the band on a 390px-tall screen. */
  .cmplz-cookiebanner.cmplz-show .cmplz-logo {
    width: 36px;
    height: 36px;
  }
}

/* The fixed `height: calc(100vh - 20px)` Complianz sets below 400px tall is
   written for the flex column it also switches to — but above 768px wide its
   own `display: grid` wins, and the fixed height then has to go somewhere: a
   grid row swallows it as blank space. Sizing to content (capped, and scrollable
   past the cap) removes the gap instead of moving it from one row to the next. */
@media (height <= 400px) and (width >= 768px) {
  .cmplz-cookiebanner.cmplz-show {
    overflow-y: auto;
    height: auto;
    max-height: calc(100vh - 20px);
  }
}

/* Complianz's own 3px divider is a pale grey line with a faint shadow: against
   the navy the line disappears and only the shadow lands, reading as a seam.
   The band takes the lift itself (--ag-shadow-md above) so the paper body still
   sits under something — the footer divider below the message keeps its own. */
.cmplz-cookiebanner .cmplz-divider-header {
  display: none;
}

.cmplz-cookiebanner .cmplz-logo {
  display: flex !important;
  flex: none;
  align-items: center;
  justify-content: center;

  width: 64px;
  height: 64px;
  border-radius: var(--ag-radius-md, 4px);

  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTA4MCIgem9vbUFuZFBhbj0ibWFnbmlmeSIgdmlld0J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TY4NzUgMzYzLjA4MjAzMSAzMDcuMTE3MTg4IDMzOC45MDIzNDQgQyAyODIuMzk4NDM4IDMxMy42NDg0MzggMjc0Ljg3NSAyOTQuMzA0Njg4IDI3NC4zMzU5MzggMjU1LjYxMzI4MSBDIDI3NC4zMzU5MzggMjI1LjUyMzQzOCAyNzcuMDIzNDM4IDIxNi4zODY3MTkgMjkwLjQ1NzAzMSAxOTMuODIwMzEyIEMgMzIwLjAxMTcxOSAxNDUuNDYwOTM4IDM4NS4wMzEyNSAxMjUuMDM5MDYyIDQzNS41MzkwNjIgMTQ4LjE0NDUzMSBaIE0gNDM1LjUzOTA2MiAxNDguMTQ0NTMxICIgZmlsbC1vcGFjaXR5PSIxIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 56%;
}

/* {logo} never resolves on this site (no theme custom-logo set) — hide it in
   case Complianz ever populates it, so it doesn't collide with the mark above. */
.cmplz-cookiebanner .cmplz-logo svg,
.cmplz-cookiebanner .cmplz-logo img {
  display: none !important;
}

/* Complianz renders {header} as the title's only content — the mockup's
   "— Quelques cookies" eyebrow has no matching placeholder, so it's injected
   as a ::before rather than forked into the plugin's template. */
.cmplz-cookiebanner .cmplz-title::before {
  content: "— Quelques cookies";

  display: block;

  margin-bottom: 4px;

  font-family: var(--ag-font-mono, monospace);
  font-size: var(--ag-text-xs, 11.5px);
  font-weight: var(--ag-weight-medium, 500);
  font-style: normal;
  color: var(--ag-accent, #d0008b);
  text-transform: uppercase;
  letter-spacing: var(--ag-tracking-eyebrow-lg, 0.18em);
}

.cmplz-cookiebanner .cmplz-title {
  justify-self: unset !important;

  margin: 0;

  font-family: var(--ag-font-display, "Instrument Serif", serif) !important;
  font-size: var(--ag-text-xl, 24px) !important;
  font-weight: 400 !important;
  font-style: italic;
  line-height: var(--ag-leading-tight, 1.1) !important;
  color: var(--ag-cream, #f4eee0) !important;
  text-align: left !important;
  letter-spacing: var(--ag-tracking-snug, -0.01em);
}

.cmplz-cookiebanner .cmplz-message {
  margin-top: 2px;
  font-family: var(--ag-font-body, "Manrope", sans-serif);
}

/* Complianz hides .cmplz-title below 425px (its own generated CSS assumes the
   logo alone carries the header on small screens) — the mockup keeps the
   eyebrow + title on mobile, and since the eyebrow is a ::before on the title
   it would vanish along with it without this override. */
@media (width <= 425px) {
  .cmplz-cookiebanner .cmplz-header .cmplz-title {
    display: block !important;
  }
}

.cmplz-cookiebanner .cmplz-message b,
.cmplz-cookiebanner .cmplz-message strong {
  font-weight: 700;
  color: var(--ag-ink, #142033);
}

/* Category rows: quiet dividers instead of grey cards, brand type. */
.cmplz-cookiebanner .cmplz-categories .cmplz-category {
  margin-bottom: 0 !important;
  border-top: 1px solid var(--ag-rule, #d8dedc);
  border-radius: 0;
  background: transparent;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category:last-child {
  border-bottom: 1px solid var(--ag-rule, #d8dedc);
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header {
  padding: 12px 2px;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-title {
  font-family: var(--ag-font-body, "Manrope", sans-serif);
  font-weight: 700;
}

.cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-description {
  padding: 0 2px 12px;
  font-family: var(--ag-font-body, "Manrope", sans-serif);
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
  font-family: var(--ag-font-body, "Manrope", sans-serif);
  font-weight: 700;
}

/* Complianz stacks the buttons below 768px (its generated banner-*.css), which
   puts Refuser under Accepter — a vertical order the CNIL reads as ranking one
   choice above the other. Only these two are ever visible (Personnaliser is
   hidden on this banner), so a single row fits and keeps them equal-weight. */
@media (width <= 768px) {
  .cmplz-cookiebanner .cmplz-buttons {
    flex-direction: row !important;
  }

  /* Collée au bas de l'écran et pleine largeur, la bannière n'expose plus que
     son bord haut : les deux ombres de Complianz sont décalées vers le bas et
     ne débordent pas au-dessus, donc la page passait au navy sans transition.
     Même grammaire que le drawer panier (style.css) — une seule direction,
     opposée au bord d'où l'élément sort, teintée ink plutôt que noire. */
  .cmplz-cookiebanner {
    box-shadow: 0 -24px 64px -20px rgb(20 32 51 / 28%) !important;
  }
}

.cmplz-cookiebanner .cmplz-links .cmplz-link {
  font-family: var(--ag-font-body, "Manrope", sans-serif);
}
