/* ==========================================================================
   CONSENTEMENT COOKIES
   ========================================================================== */

.cookie-banner {
    position: fixed;
    z-index: 10000;
    right: 24px;
    bottom: 24px;
    left: 24px;

    max-width: 940px;
    margin-inline: auto;

    color: #ffffff;
    background: #101d2c;

    border: 1px solid rgba(210, 180, 111, .32);
    border-radius: 22px;

    box-shadow:
        0 28px 80px rgba(0, 0, 0, .28);

    padding: 24px;
}

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

.cookie-banner__inner {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: end;

    gap: 28px;
}

.cookie-banner__eyebrow {
    display: block;

    margin-bottom: 7px;

    color: #d2b46f;

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: .14em;
    text-transform: uppercase;
}

.cookie-banner h2,
.cookie-preferences h2 {
    margin: 0 0 10px;

    color: #ffffff;
}

.cookie-banner p {
    max-width: 640px;

    margin: 0;

    line-height: 1.65;

    color: rgba(255, 255, 255, .78);
}

.cookie-banner__note {
    margin-top: 7px !important;

    font-size: .84rem;

    color: rgba(255, 255, 255, .57) !important;
}


/* --------------------------------------------------------------------------
   BOUTONS
   -------------------------------------------------------------------------- */

.cookie-banner__actions,
.cookie-preferences__footer {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;
}

.cookie-button {
    min-height: 46px;

    padding: 10px 18px;

    border-radius: 999px;

    border: 1px solid rgba(255, 255, 255, .22);

    cursor: pointer;

    font: inherit;
    font-weight: 700;

    transition:
        transform .2s ease,
        background-color .2s ease,
        border-color .2s ease;
}

.cookie-button:hover {
    transform: translateY(-1px);
}

.cookie-button:focus-visible {
    outline: 3px solid rgba(210, 180, 111, .62);
    outline-offset: 3px;
}

/*
 * IMPORTANT :
 *
 * Tout accepter et Tout refuser ont volontairement
 * exactement la même présentation.
 */
.cookie-button--choice {
    color: #101d2c;
    background: #d2b46f;
    border-color: #d2b46f;
}

.cookie-button--secondary {
    color: #ffffff;
    background: transparent;
}


/* --------------------------------------------------------------------------
   PRÉFÉRENCES
   -------------------------------------------------------------------------- */

.cookie-preferences {
    width: min(680px, calc(100% - 32px));

    padding: 0;

    overflow: hidden;

    color: #172331;
    background: #ffffff;

    border: 0;
    border-radius: 24px;

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .32);
}

.cookie-preferences::backdrop {
    background: rgba(8, 17, 28, .62);
    backdrop-filter: blur(5px);
}

.cookie-preferences__inner {
    padding: 28px;
}

.cookie-preferences__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 22px;
}

.cookie-preferences__header h2 {
    color: #172331;
}

.cookie-preferences__close {
    width: 42px;
    height: 42px;

    border: 1px solid rgba(16, 29, 44, .15);
    border-radius: 50%;

    cursor: pointer;

    background: transparent;

    font-size: 1.5rem;
}

.cookie-preferences__body {
    display: grid;

    gap: 14px;
}

.cookie-preference {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;

    align-items: center;

    gap: 22px;

    padding: 19px;

    border: 1px solid rgba(16, 29, 44, .10);
    border-radius: 16px;

    background: #f7f9fa;
}

.cookie-preference strong {
    display: block;

    margin-bottom: 5px;
}

.cookie-preference p {
    margin: 0;

    color: #59636d;

    font-size: .9rem;
    line-height: 1.55;
}

.cookie-preference__status {
    color: #64717e;

    font-size: .78rem;
    font-weight: 700;
}


/* --------------------------------------------------------------------------
   SWITCH
   -------------------------------------------------------------------------- */

.cookie-switch {
    position: relative;

    flex: 0 0 auto;

    width: 54px;
    height: 30px;
}

.cookie-switch input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.cookie-switch__slider {
    position: absolute;
    inset: 0;

    cursor: pointer;

    border-radius: 999px;

    background: #c9ced3;

    transition: .2s ease;
}

.cookie-switch__slider::after {
    content: "";

    position: absolute;

    top: 4px;
    left: 4px;

    width: 22px;
    height: 22px;

    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, .20);

    transition: .2s ease;
}

.cookie-switch input:checked
+ .cookie-switch__slider {
    background: #101d2c;
}

.cookie-switch input:checked
+ .cookie-switch__slider::after {
    transform: translateX(24px);
}

.cookie-switch input:focus-visible
+ .cookie-switch__slider {
    outline: 3px solid rgba(210, 180, 111, .60);
    outline-offset: 3px;
}


/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */

.footer-cookie-settings {
    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;

    cursor: pointer;

    font: inherit;
    text-decoration: underline;

    opacity: .72;
}

.footer-cookie-settings:hover,
.footer-cookie-settings:focus-visible {
    opacity: 1;
}


/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {

    .cookie-banner {
        right: 12px;
        bottom: 12px;
        left: 12px;

        padding: 20px;
    }

    .cookie-banner__inner {
        grid-template-columns: 1fr;
    }

    .cookie-banner__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .cookie-button {
        width: 100%;
    }

    .cookie-preferences__inner {
        padding: 20px;
    }

    .cookie-preference {
        grid-template-columns: 1fr auto;
    }

    .cookie-preferences__footer {
        display: grid;
        grid-template-columns: 1fr;
    }
}


@media (prefers-reduced-motion: reduce) {

    .cookie-button,
    .cookie-switch__slider,
    .cookie-switch__slider::after {
        transition: none;
    }
}