/* Cookie banner, house standard (19/11/2026): the buttons keep their own width at every screen size.
   Before, under 760px the row became a two-column grid and each button stretched to half the bar, which
   looks nothing like the same button on a desktop. Now the row is a flex line: each button is as wide as
   its label, 38px tall, with a 44px tap zone, and the line wraps when there is no room left. */
.cookie .btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.cookie .btn-row .btn {
  position: relative;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  min-height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  white-space: normal;
}
/* the finger gets 44px even though the button is drawn 38px tall (house rule) */
.cookie .btn-row .btn::after {
  content: "";
  position: absolute;
  inset: -3px 0;
}

@media (max-width: 760px) {
  .cookie .btn-row { justify-content: flex-start; }
  .cookie [data-ck="prefs"] { order: 3; flex: 0 0 auto; min-height: 30px; }
}

/* very narrow phones: the label may wrap inside its button, the button still never fills the bar */
@media (max-width: 360px) {
  .cookie .btn-row .btn { padding: 0 11px; font-size: 13px; line-height: 1.2; padding-block: 6px; height: auto; }
}
@media (max-width: 280px) {
  .cookie { padding: 12px; }
  .cookie .btn-row { gap: 6px; }
  .cookie .btn-row .btn { padding: 0 9px; font-size: 12.5px; }
}

/* Under 760px the bar used to be sized with 100vw, which ignores the scrollbar and, on some phones,
   the real layout width: it then stuck out on both sides. It is now pinned to the two edges instead. */
@media (max-width: 760px) {
  .cookie {
    left: max(10px, env(safe-area-inset-left, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    width: auto;
    max-width: none;
    transform: translate(0, 16px);
  }
  .cookie.in { transform: translate(0, 0); }
}

/* ---- one standard banner (19/11/2026): one sentence, one OK button in the site's own colour ---- */
.cookie { gap: 14px 18px; }
.cookie .btn-row .btn--ink,
[data-theme] .cookie .btn-row .btn--ink,
[data-theme] .cookie .btn--ink {
  background: var(--violet, #7A5AF8);
  background-image: none;
  border: 0;
  color: #fff;
  box-shadow: none;
}
.cookie .btn-row .btn--ink:hover,
[data-theme] .cookie .btn-row .btn--ink:hover { background: var(--violet-3, #5E3FE6); }
/* the single button never shrinks below a comfortable size */
.cookie .btn-row .btn { min-width: 64px; }
@media (max-width: 760px) { .cookie { gap: 14px; } }

/* ---- light mode must be light everywhere (house rule) ----
   Every page carries an inline `body{background:#030206}` from the build, which stays black even when the
   visitor asked for light mode: the text then turns dark ink on a near-black body and cannot be read. */
html[data-mode="light"] body { background: var(--paper, #F8F9FC); }

/* the single OK button wears the site's colour, flat, and wins over the later sheets */
.cookie .btn-row .btn--ink {
  background: var(--violet, #7A5AF8) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: none !important;
}
.cookie .btn-row .btn--ink:hover { background: var(--violet-3, #5E3FE6) !important; }
.cookie { gap: 14px 18px !important; }

/* ---- legal pages: the section number is a number, not a badge (19/11/2026) ----
   It was drawn as a violet pill sitting over the heading. Same treatment as the clause numbers:
   small mono figures in the margin, nothing around them. */
.lg-n--sec {
  background: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  color: var(--ink-4) !important;
  font: 500 12.5px/1.4 var(--f-mono) !important;
  letter-spacing: .01em !important;
  top: .34em !important;
  transform: none !important;
  text-align: left !important;
}
@media (max-width: 760px) {
  .lg-n--sec { top: auto !important; margin-top: 3px !important; }
}

/* ---- the banner stays short ---- */
.cookie { padding: 12px 14px 12px 18px !important; }
.cookie p { font-size: 13px !important; line-height: 1.5 !important; }
@media (max-width: 760px) {
  .cookie { padding: 12px 14px !important; gap: 10px !important; }
  .cookie .btn-row { justify-content: flex-end !important; }
  .cookie p { font-size: 12.5px !important; line-height: 1.45 !important; }
}

/* the bar stays one line — text left, button right — down to 560px, instead of stacking at 760px
   and growing to three lines on a laptop window */
@media (min-width: 561px) and (max-width: 760px) {
  .cookie { grid-template-columns: minmax(0, 1fr) auto !important; align-items: center !important; }
  .cookie .btn-row { justify-content: flex-end !important; }
}

/* bulle INO : le bandeau cookies s arrete avant elle */
body:has(.ino-widget) .cookie{right:66px;right:calc(66px + env(safe-area-inset-right,0px))}
