/* =============================================
   COMBOTCHA — Cookie Banner
   ============================================= */

/* ── Overlay ── */
#cb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(42, 88, 66, 0.45);
    z-index: 99998;
    backdrop-filter: blur(2px);
}

#cb-overlay.cb-visible {
    display: block;
}

/* ── Bandeau principal ── */
#cb-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 99999;
    width: min(500px, calc(100vw - 4rem));
    box-sizing: border-box;

    background-color: #FFEFE6;
    border-radius: 2rem;
    box-shadow: 0 16px 48px rgba(42, 88, 66, 0.25);
    padding: 2rem 2rem 1.8rem;

    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.5rem;

    opacity: 0;
    transform: translateY(30px);
    transition: opacity .4s ease, transform .45s cubic-bezier(.16,1,.3,1);
}

#cb-banner.cb-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Mascotte — colonne gauche, centrée verticalement ── */
.cb-mascot-wrap {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    align-self: flex-start;
}

.cb-mascot {
    display: block;
    width: 200px;
    height: auto;
}

/* ── Corps — colonne droite, ne déborde pas ── */
.cb-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    box-sizing: border-box;
}

/* ── Titre ── */
.cb-title {
    font-family: 'GillSans-UltraBold', sans-serif;
    font-size: 1.2rem;
    text-transform: uppercase;
    color: #2A5842;
    margin: 0;
}

/* ── Texte ── */
.cb-text {
    font-family: 'Americane-Regular', sans-serif;
    font-size: 0.88rem;
    color: #2A5842;
    line-height: 1.6;
    margin: 0;
}

/* ── Boutons principaux ── */
.cb-actions {
    display: flex;
    gap: 0.6rem;
    width: 100%;
    box-sizing: border-box;
}

.cb-btn {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.5rem;
    border: none;
    border-radius: 999px;
    font-family: 'GillSans-UltraBold', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    transition: transform .15s ease, background-color .2s ease, color .2s ease;
}

.cb-btn:hover     { transform: scale(1.03); }
.cb-btn:active    { transform: scale(.97); }

.cb-btn-primary {
    background-color: #FFA3C8;
    color: #2A5842;
}

.cb-btn-primary:hover {
    background-color: #2A5842;
    color: #FFD3EA;
}

.cb-btn-outline {
    background-color: transparent;
    color: #2A5842;
    border: 2px solid #2A5842;
}

.cb-btn-outline:hover {
    background-color: #2A5842;
    color: #FFEFE6;
}

.cb-btn-full {
    width: 100%;
    flex: none;
    margin-top: 0.4rem;
}

/* ── Lien "Personnaliser" ── */
.cb-link {
    background: none;
    border: none;
    font-family: 'Americane-Regular', sans-serif;
    font-size: 0.85rem;
    color: #6EA14F;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.cb-link:hover { color: #2A5842; }

/* ── Panneau détails — masqué par défaut ── */
#cb-details {
    display: none;
    width: 100%;
    box-sizing: border-box;
    flex-direction: column;
    gap: 0.6rem;
    background-color: #FFD3EA;
    border-radius: 1.2rem;
    padding: 1.2rem 1.4rem;
}

#cb-details.cb-open {
    display: flex;
}

/* ── Toggles ── */
.cb-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.cb-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.cb-toggle-label {
    font-family: 'GillSans-UltraBold', sans-serif;
    font-size: 0.85rem;
    color: #2A5842;
    text-transform: uppercase;
}

.cb-toggle-desc {
    font-family: 'Americane-Regular', sans-serif;
    font-size: 0.75rem;
    color: #2A5842;
    opacity: .75;
}

/* Toggle switch */
.cb-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

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

.cb-slider {
    position: absolute;
    inset: 0;
    background: #FFA3C8;
    border-radius: 24px;
    transition: background .2s;
}

.cb-switch input:checked + .cb-slider {
    background: #2A5842;
}

.cb-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 3px;
    left: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}

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

.cb-switch-disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Bouton fermeture ── */
.cb-close {
    position: absolute;
    top: 0.9rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #2A5842;
    opacity: .5;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    transition: opacity .15s;
}

.cb-close:hover { opacity: 1; }

/* ── Bouton rouvrir (flottant) ── */
.cb-reopen {
    position: fixed;
    bottom: 1.2rem;
    left: 1.2rem;
    z-index: 8999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #2A5842;
    background: #FFEFE6;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42,88,66,.2);
    transition: transform .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-reopen:hover {
    transform: scale(1.1);
    border-color: #FFA3C8;
}

/* ── Responsive mobile ── */
@media (max-width: 540px) {
    #cb-banner {
        bottom: 0;
        left: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding-top: 1.2rem;
    }

    .cb-mascot-wrap {
        width: 100%;
        justify-content: center;
    }

    .cb-mascot { width: 80px; }
    .cb-title  { font-size: 1.1rem; }
    .cb-actions { flex-direction: column; }
}