.cookie-banner {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 100;
    background: var(--paper);
    border-top: 3px solid var(--ink);
    box-shadow: 0 -5px 0 rgba(17, 17, 17, 0.08);
    max-height: 75vh;
    overflow-y: auto;
}

.cookie-banner__inner {
    max-width: 1240px;
    margin-inline: auto;
    padding: 28px 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
    justify-content: space-between;
}

.cookie-banner__summary {
    flex: 1 1 420px;
    min-width: 0;
}

.cookie-banner__eyebrow {
    margin: 0;
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.cookie-banner__title {
    margin: 10px 0 0;
    font-family: var(--display);
    font-size: 26px;
    line-height: 1.05;
    text-transform: uppercase;
}

.cookie-banner__text {
    margin: 10px 0 0;
    max-width: 680px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-soft);
}

.cookie-banner__decide {
    flex: 0 0 auto;
    min-width: 230px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Sans ça, le « display: flex » ci-dessus bat la règle UA [hidden] et le
   contrôleur ne peut plus escamoter le bloc. */
.cookie-banner__decide[hidden] {
    display: none;
}

.cookie-banner__form {
    display: flex;
    gap: 10px;
}

.cookie-banner__form .btn {
    flex: 1;
    white-space: nowrap;
}

.cookie-banner__detail {
    align-self: center;
}

.cookie-banner__panel {
    flex: 1 1 100%;
}

.cookie-choices__title {
    margin: 0 0 24px;
    font-family: var(--display);
    font-size: 26px;
    line-height: 1.05;
    text-transform: uppercase;
}

.cookie-choices__family {
    padding: 22px 0;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    align-items: start;
}

.cookie-choices__body {
    min-width: 0;
}

.cookie-choices__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cookie-choices__name {
    font-family: var(--display);
    font-size: 20px;
    text-transform: uppercase;
}

.cookie-choices__badge {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 9px;
    background: var(--sand);
    color: var(--ink-soft);
}

.cookie-choices__badge--optional {
    background: none;
    border: 1px solid var(--ink);
    color: var(--ink);
}

.cookie-choices__text {
    margin: 8px 0 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-soft);
}

.cookie-choices__note {
    margin: 24px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
    max-width: 560px;
}

.cookie-choices__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.cookie-toggle {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.cookie-toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 60px;
    height: 32px;
    margin: 0;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--paper);
    cursor: pointer;
}

.cookie-toggle input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: var(--ink);
}

.cookie-toggle input[type="checkbox"]::after {
    content: "✕";
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    font-family: var(--display);
    font-size: 14px;
    line-height: 1;
    color: var(--ink-soft);
}

.cookie-toggle input[type="checkbox"]:checked {
    background: var(--yellow);
}

.cookie-toggle input[type="checkbox"]:checked::before {
    left: auto;
    right: 2px;
}

.cookie-toggle input[type="checkbox"]:checked::after {
    content: "✓";
    right: auto;
    left: 7px;
    color: var(--ink);
}

.cookie-toggle:has(input:disabled) {
    cursor: default;
}

.cookie-toggle input[type="checkbox"]:disabled {
    background: var(--sand);
    border-color: var(--gray-mid);
    cursor: default;
}

.cookie-toggle input[type="checkbox"]:disabled::before {
    background: var(--gray-mid);
}

.cookie-toggle input[type="checkbox"]:disabled::after {
    content: none;
}

.cookie-toggle input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}

.cookie-toggle__state {
    min-width: 10ch;
    text-align: right;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

@media (max-width: 720px) {
    .cookie-banner__inner {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }

    .cookie-banner__decide {
        width: 100%;
        margin-top: 18px;
    }

    .cookie-banner__form {
        flex-direction: column;
    }

    .cookie-banner__form .btn {
        min-height: 52px;
    }

    .cookie-choices__family {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .cookie-toggle {
        order: -1;
        justify-self: end;
    }
}

.cookie-dev {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99;
    padding: 10px 14px;
    border: 2px solid var(--ink);
    background: var(--paper);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
}
.cookie-dev:hover {
    background: var(--yellow);
}
