
.nexya-cookie {
    position: fixed;
    z-index: 999999;
    inset: auto 0 0 0;
    display: flex;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}

.nexya-cookie[hidden] {
    display: none;
}

.nexya-cookie [hidden] {
    display: none !important;
}

.nexya-cookie.is-left {
    justify-content: flex-start;
}

.nexya-cookie.is-right {
    justify-content: flex-end;
}

.nexya-cookie-box {
    pointer-events: auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--nexya-cookie-radius, 12px);
    box-shadow: 0 18px 48px rgba(15, 36, 35, .20);
    font-size: var(--nexya-cookie-size-text, 14px);
    line-height: 1.5;
    color: var(--nexya-cookie-text, #50575e);
}

.nexya-cookie.is-center .nexya-cookie-box {
    max-width: 560px;
}

.nexya-cookie-box p,
.nexya-cookie-box li,
.nexya-cookie-box span,
.nexya-cookie-box label,
.nexya-cookie-box strong,
.nexya-cookie-box em,
.nexya-cookie-box small,
.nexya-cookie-box a {
    font-size: inherit;
    line-height: inherit;
    letter-spacing: normal;
}

.nexya-cookie-box h2 {
    margin: 0 0 8px;
    font-size: var(--nexya-cookie-size-title, 17px);
    line-height: 1.3;
    color: var(--nexya-cookie-title, #1d2327);
}

.nexya-cookie-message p {
    margin: 0 0 8px;
}

.nexya-cookie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 10px 0 0;
}

.nexya-cookie-links a {
    color: var(--nexya-cookie-link, #50575e);
}

.nexya-cookie-details {
    margin-top: 16px;
    border-top: 1px solid var(--nexya-cookie-border, #d5d8dc);
}

.nexya-cookie-category {
    padding: 12px 0;
    border-bottom: 1px solid var(--nexya-cookie-border, #d5d8dc);
}

.nexya-cookie-category p {
    margin: 4px 0 0 52px;
}

.nexya-cookie-category-head {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: var(--nexya-cookie-title, #1d2327);
}

.nexya-cookie-category-head em {
    font-style: normal;
    font-weight: 400;
    opacity: .65;
}

/* Two blocks: the header, then the content. The content scrolls on its own when the details
   are open, so the header stays in view without being pinned. The box itself paints nothing:
   a white box under a dark header showed a pale edge along the rounded corners. */
.nexya-cookie-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 14px 20px 12px;
    border-radius: var(--nexya-cookie-radius, 12px) var(--nexya-cookie-radius, 12px) 0 0;
    background: var(--nexya-cookie-header, #282727);
}

.nexya-cookie-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 20px 18px;
    border-radius: 0 0 var(--nexya-cookie-radius, 12px) var(--nexya-cookie-radius, 12px);
    background: var(--nexya-cookie-bg, #ffffff);
}

/* On a wide screen the open details widen the window and sit in two columns, rather than
   stretching it past the screen's height. */
@media (min-width: 900px) {
    .nexya-cookie .nexya-cookie-box:has(.nexya-cookie-details:not([hidden])) {
        max-width: 820px;
    }

    .nexya-cookie-details:not([hidden]) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 28px;
    }
}

.nexya-cookie-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: .01em;
    opacity: .92;
}

.nexya-cookie-brand svg {
    display: block;
    width: auto;
    height: 13px;
}

.nexya-cookie-switch {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 22px;
}

.nexya-cookie-switch input {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.nexya-cookie-switch-track {
    position: relative;
    display: block;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    background: var(--nexya-cookie-off, #b2ddd3);
    transition: background .16s ease;
    pointer-events: none;
}

.nexya-cookie-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 36, 35, .18);
    transition: transform .16s ease;
}

.nexya-cookie-switch input:checked + .nexya-cookie-switch-track {
    background: var(--nexya-cookie-button, #1d2327);
}

.nexya-cookie-switch input:checked + .nexya-cookie-switch-track::after {
    transform: translateX(18px);
}

.nexya-cookie-switch input:disabled {
    cursor: default;
}

.nexya-cookie-switch.is-locked .nexya-cookie-switch-track::after {
    box-shadow: inset 0 0 0 2px var(--nexya-cookie-button, #1d2327);
}

.nexya-cookie-category-head.is-locked {
    cursor: default;
}

.nexya-cookie-switch input:focus-visible + .nexya-cookie-switch-track {
    outline: 2px solid var(--nexya-cookie-button, #1d2327);
    outline-offset: 2px;
}

.nexya-cookie-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.nexya-cookie-actions [data-nexya-customize],
.nexya-cookie-actions [data-nexya-save] {
    grid-column: 1 / -1;
    order: -1;
}

.nexya-cookie-btn {
    padding: 10px 18px;
    font-size: 12.5px;
    border: 1px solid transparent;
    border-radius: var(--nexya-cookie-radius-button, 6px);
    background: var(--nexya-cookie-button, #1d2327);
    color: var(--nexya-cookie-button-text, #ffffff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease;
}

.nexya-cookie-box .nexya-cookie-btn,
.nexya-cookie-box .nexya-cookie-btn:hover,
.nexya-cookie-box .nexya-cookie-btn:focus,
.nexya-cookie-box .nexya-cookie-btn:active {
    border-style: solid;
    border-width: 1px;
}

.nexya-cookie-btn:hover {
    background: var(--nexya-cookie-button-hover, #3c4146);
}

.nexya-cookie-btn.is-ghost {
    background: var(--nexya-cookie-bg, #ffffff);
    border-color: var(--nexya-cookie-off, #b6d4d0);
    color: var(--nexya-cookie-link, #27544f);
    font-weight: 500;
}

.nexya-cookie-actions [data-nexya-reject] {
    border-color: var(--nexya-cookie-button, #3f8d82);
    color: var(--nexya-cookie-title, #0f2423);
    font-weight: 600;
}

.nexya-cookie-actions [data-nexya-customize],
.nexya-cookie-actions [data-nexya-save] {
    padding: 7px 14px;
    font-size: 12px;
}

.nexya-cookie-btn.is-ghost:hover {
    background: var(--nexya-cookie-soft, #f3faf8);
    border-color: var(--nexya-cookie-button, #3f8d82);
}

.nexya-cookie-btn:focus {
    outline: none;
}

.nexya-cookie-btn:focus-visible {
    outline: 2px solid var(--nexya-cookie-button, #1d2327);
    outline-offset: 2px;
}

/* Themes style every <button> of the page ([type=button], button: colour, border, padding,
   font size, radius), and their sheet often loads after this one or gets merged ahead of it by
   an optimiser. The banner's buttons restate every one of those properties at a weight a
   theme's element or attribute selector cannot reach. */
.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn,
.nexya-cookie-embed .nexya-cookie-embed-veil button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--nexya-cookie-radius-button, 6px);
    background: var(--nexya-cookie-button, #1d2327);
    box-shadow: none;
    color: var(--nexya-cookie-button-text, #ffffff);
    font-family: inherit;
    font-size: inherit;
    font-style: normal;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
}

.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn:hover,
.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn:focus,
.nexya-cookie-embed .nexya-cookie-embed-veil button:hover,
.nexya-cookie-embed .nexya-cookie-embed-veil button:focus {
    border-color: transparent;
    background: var(--nexya-cookie-button-hover, #3c4146);
    color: var(--nexya-cookie-button-text, #ffffff);
    box-shadow: none;
    text-decoration: none;
}

.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn.is-ghost {
    border-color: var(--nexya-cookie-off, #b6d4d0);
    background: var(--nexya-cookie-bg, #ffffff);
    color: var(--nexya-cookie-link, #27544f);
    font-weight: 500;
}

.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn.is-ghost:hover,
.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn.is-ghost:focus {
    border-color: var(--nexya-cookie-button, #3f8d82);
    background: var(--nexya-cookie-soft, #f3faf8);
    color: var(--nexya-cookie-link, #27544f);
}

.nexya-cookie .nexya-cookie-box .nexya-cookie-actions button[data-nexya-reject],
.nexya-cookie .nexya-cookie-box .nexya-cookie-actions button[data-nexya-reject]:hover,
.nexya-cookie .nexya-cookie-box .nexya-cookie-actions button[data-nexya-reject]:focus {
    border-color: var(--nexya-cookie-button, #3f8d82);
    color: var(--nexya-cookie-title, #0f2423);
    font-weight: 600;
}

.nexya-cookie .nexya-cookie-box .nexya-cookie-actions button[data-nexya-customize],
.nexya-cookie .nexya-cookie-box .nexya-cookie-actions button[data-nexya-save] {
    padding: 7px 14px;
    font-size: 12px;
}

.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn[hidden] {
    display: none;
}

.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn:focus:not(:focus-visible) {
    outline: none;
}

.nexya-cookie .nexya-cookie-box button.nexya-cookie-btn:focus-visible,
.nexya-cookie-embed .nexya-cookie-embed-veil button:focus-visible {
    outline: 2px solid var(--nexya-cookie-button, #1d2327);
    outline-offset: 2px;
}

.nexya-cookie-footer {
    margin: 1em 0;
    text-align: center;
}

.nexya-cookie-embed {
    position: relative;
    display: block;
    min-height: 180px;
    background: #eef1f3;
    border-radius: var(--nexya-cookie-radius, 12px);
    overflow: hidden;
}

.nexya-cookie-embed-veil {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    text-align: center;
    font-size: var(--nexya-cookie-size-text, 14px);
    color: var(--nexya-cookie-text, #50575e);
}

.nexya-cookie-embed-veil p {
    margin: 0;
    max-width: 46ch;
}

.nexya-cookie-embed-veil button {
    padding: 9px 16px;
    border: 0;
    border-radius: var(--nexya-cookie-radius-button, 6px);
    background: var(--nexya-cookie-button, #1d2327);
    color: var(--nexya-cookie-button-text, #ffffff);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.nexya-cookie-embed.is-allowed .nexya-cookie-embed-veil {
    display: none;
}

.nexya-cookie-embed.is-allowed {
    min-height: 0;
    background: none;
}

/* ── La page de politique ───────────────────────────────────────────────────
   Every value is a custom property with a fallback, so a theme dresses this page in its
   own palette by setting six variables rather than fighting these rules with !important.
   The fallbacks are a quiet neutral that sits correctly on a white page on its own.      */

.nexya-cookie-policy {
    --policy-card: var(--nexya-cookie-card, #f6f8f8);
    --policy-inner: var(--nexya-cookie-card-inner, #ffffff);
    --policy-line: var(--nexya-cookie-border, #dde5e3);
    --policy-ink: var(--nexya-cookie-ink, #16241f);
    --policy-muted: var(--nexya-cookie-muted, #5d7570);
    --policy-radius: var(--nexya-cookie-radius, 20px);
    --policy-radius-inner: var(--nexya-cookie-radius-inner, 12px);

    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0 0;
    color: var(--policy-ink);
}

/* Each heading is its own card, and the services sit inside it: the boundary between
   "statistics" and "functional" has to be visible before the names are read, or a page of
   fifty switches is one undifferentiated list. Two levels, two grounds — the group is the
   tinted one, its members are white, so nesting reads as nesting and not as repetition. */
.nexya-cookie-policy-category {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 26px;
    border: 1px solid var(--policy-line);
    border-radius: var(--policy-radius);
    background: var(--policy-card);
}

/* Heading on the left, the sweeping answer for the whole group on the right. */
.nexya-cookie-policy-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.nexya-cookie-policy-head > div {
    min-width: 0;
}

.nexya-cookie-policy-category h2 {
    margin: 0 0 6px;
    font-size: 1.15em;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: var(--policy-ink);
}

.nexya-cookie-policy-category > .nexya-cookie-policy-head p {
    margin: 0;
    max-width: 60ch;
    font-size: .93em;
    line-height: 1.6;
    color: var(--policy-muted);
}

.nexya-cookie-policy-count {
    margin-left: 10px;
    font-size: .62em;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--policy-muted);
    white-space: nowrap;
}

.nexya-cookie-policy-always {
    flex: none;
    align-self: center;
    font-size: .74em;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--policy-muted);
    white-space: nowrap;
}

.nexya-cookie-policy-none {
    margin: 0;
    font-size: .93em;
    color: var(--policy-muted);
}

/* One card per host the survey found, and a card says one thing: this name, your answer.
   Stacked in a single column: at fifty of them a grid turns into a wall of near-identical
   tiles the eye has to scan in two directions, while a column is read down once, and every
   name has the full width — so nothing wraps and the switches line up under each other. */
.nexya-cookie-services {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The card is a <label> when it is answerable, and it fills the row rather than sitting in
   it: the target has to be the whole card, not the text inside it. */
.nexya-cookie-services > li {
    display: flex;
    min-width: 0;
}

.nexya-cookie-service {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--policy-line);
    border-radius: var(--policy-radius-inner);
    background: var(--policy-inner);
    transition: border-color .15s ease, background-color .15s ease;
}

/* At rest the card is a statement and behaves like one; editing is what makes it pressable.
   Hover and keyboard focus say so with the ground, not with a ring: an outline drawn outside
   a card that already has a coloured border reads as two borders, which is what it is. */
.nexya-cookie-policy.is-editing label.nexya-cookie-service {
    cursor: pointer;
    user-select: none;
}

.nexya-cookie-policy.is-editing label.nexya-cookie-service:hover,
.nexya-cookie-policy.is-editing label.nexya-cookie-service:focus-within {
    background: var(--nexya-cookie-card-hover, #eaf5f1);
}

.nexya-cookie-policy.is-editing label.nexya-cookie-service:active {
    background: var(--nexya-cookie-card-pressed, #ddeee8);
}

/* The banner draws a ring around the switch itself, which is right there: the switch is the
   only target. Here the card is, and it already shows focus with its ground — the ring would
   land inside a card that is itself outlined, and that is the double border again. */
.nexya-cookie-policy .nexya-cookie-switch input:focus-visible + .nexya-cookie-switch-track {
    outline: none;
}

/* Sized so the longest host names a site realistically loads — www.googletagmanager.com,
   connect.facebook.net — sit on one line in one card. The <wbr> the markup puts at each dot
   stays as the fallback: a name longer than that wraps at a joint rather than mid-label. */
.nexya-cookie-service-host {
    min-width: 0;
    font-size: .86em;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: break-word;
}

/* Editing is a state of the page, and it has to look like one: the cards that just became
   answerable say so, rather than the reader discovering it by clicking one. */
.nexya-cookie-policy.is-editing .nexya-cookie-service {
    border-color: var(--nexya-cookie-accent, #3f8d82);
}

.nexya-cookie-policy-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 8px 0 0;
}

.nexya-cookie-policy-said {
    font-size: .9em;
    color: var(--policy-muted);
}

@media (max-width: 520px) {
    .nexya-cookie-policy-category { padding: 20px 18px; }
    .nexya-cookie-policy-head { flex-direction: column; gap: 12px; }
    .nexya-cookie-policy-head .nexya-cookie-switch { align-self: flex-start; }
}

@media (max-width: 600px) {
    .nexya-cookie-actions {
        flex-direction: column;
    }
}
