/**
 * assets/css/cookie-consent.css — ong_cade
 * Bannière de consentement cookies
 */
 

/* ── Bannière principale ────────────────────────────────── */

#cade-cookie-banner {
    position: fixed !important;
    bottom: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(120%) !important;
    z-index: 100001 !important;
    width: calc(100% - 48px);
    max-width: 560px;
    background: #fff;
    border-radius: 16px;
    box-shadow:
        0 8px 40px rgba(27, 58, 107, .18),
        0 0 0 1px rgba(27, 58, 107, .08);
    opacity: 0;
    transition: transform 400ms cubic-bezier(.34, 1.2, .64, 1),
                opacity 400ms ease;
    font-family: 'Montserrat', system-ui, sans-serif;
    overflow: hidden;
}

#cade-cookie-banner.is-visible {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
}

#cade-cookie-banner.is-hiding {
    transform: translateX(-50%) translateY(120%) !important;
    opacity: 0 !important;
}

/* Forcer le contexte d'empilement au niveau racine */
#cade-cookie-banner,
#cade-cookie-btn {
    position: fixed !important;
    z-index: 100001 !important;
    /* Sortir du contexte du footer */
    transform-style: flat !important;
    will-change: transform;
}

/* ── Contenu interne ─────────────────────────────────────── */
.ccb-inner {
    padding: 24px 28px 20px;
}

.ccb-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ccb-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.ccb-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1B3A6B;
    margin-bottom: 6px;
}

.ccb-desc {
    font-size: 13px;
    color: #444444;
    line-height: 1.6;
    margin: 0;
}

/* ── Toggles ─────────────────────────────────────────────── */
.ccb-toggles {
    border: 1px solid #E8EEF5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
}

.ccb-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 16px;
    border-bottom: 1px solid #EEF2F7;
    background: #FAFCFF;
}

.ccb-toggle-row:last-child {
    border-bottom: none;
}

.ccb-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.ccb-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #1B3A6B;
}

.ccb-toggle-desc {
    font-size: 11.5px;
    color: #444444;
    line-height: 1.4;
}

.ccb-always-on {
    font-size: 11px;
    font-weight: 700;
    color: #059669;
    background: #D1FAE5;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Switch toggle ───────────────────────────────────────── */
.ccb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.ccb-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ccb-slider {
    position: absolute;
    inset: 0;
    background: #CBD5E1;
    border-radius: 24px;
    transition: background 200ms ease;
}

.ccb-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 200ms ease;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.ccb-switch input:checked + .ccb-slider {
    background: #1B3A6B;
}

.ccb-switch input:checked + .ccb-slider::before {
    transform: translateX(20px);
}

.ccb-switch input:focus-visible + .ccb-slider {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
}

/* ── Boutons actions ─────────────────────────────────────── */
.ccb-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ccb-btn {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 180ms ease;
    white-space: nowrap;
}

.ccb-btn--outline {
    background: transparent;
    border: 1.5px solid #CBD5E1;
    color: #5A6A7A;
}

.ccb-btn--outline:hover {
    border-color: #1B3A6B;
    color: #1B3A6B;
}

.ccb-btn--secondary {
    background: #EEF2F7;
    color: #1B3A6B;
}

.ccb-btn--secondary:hover {
    background: #DCE6F5;
}

.ccb-btn--primary {
    background: #1B3A6B;
    color: #fff;
}

.ccb-btn--primary:hover {
    background: #0F2547;
    transform: translateY(-1px);
}

/* ── Lien politique ──────────────────────────────────────── */
.ccb-legal {
    font-size: 11.5px;
    color: #9AA5B4;
    text-align: center;
    margin: 0;
}

.ccb-legal a {
    color: #1B3A6B;
    text-decoration: underline;
}

/* ── Bouton flottant ─────────────────────────────────────── */
#cade-cookie-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid #E8EEF5;
    box-shadow: 0 2px 12px rgba(27, 58, 107, .15);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

#cade-cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 58, 107, .2);
}

/* ── Placeholder iframes médias bloquées ─────────────────── */
.cade-cookie-media-block {
    position: absolute;
    inset: 0;
    background: #0F2547;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    z-index: 10;
}

.cade-cookie-media-block i {
    font-size: 36px;
    color: rgba(255,255,255,.4);
}

.cade-cookie-media-block p {
    font-size: 14px;
    color: rgba(255,255,255,.75);
    line-height: 1.5;
    max-width: 280px;
    margin: 0;
}

.cade-cookie-media-btn {
    padding: 8px 20px;
    background: #F5A623;
    color: #0F2547;
    font-size: 12.5px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Montserrat', system-ui, sans-serif;
    transition: background 180ms;
}

.cade-cookie-media-btn:hover {
    background: #e09518;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    #cade-cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        transform: translateY(120%);
        border-radius: 20px 20px 0 0;
    }

    #cade-cookie-banner.is-visible {
        transform: translateY(0);
    }

    #cade-cookie-banner.is-hiding {
        transform: translateY(120%);
    }

    .ccb-inner {
        padding: 20px 20px 24px;
    }

    .ccb-actions {
        flex-wrap: wrap;
    }

    .ccb-btn--outline {
        flex: 0 0 100%;
        order: 3;
    }

    #cade-cookie-btn {
        bottom: 16px;
        left: 16px;
    }
}
