
/* ===============================
    Overlay
=============================== */
.cookie-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    display: none;
}

/* ===============================
    Bannière cookies
=============================== */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 25px;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 850px;

    background: #ffffff;
    border: 1px solid #d6dce3;
    border-radius: 12px;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);

    padding: 25px;

    z-index: 9999;

    display: none;
}

.cookie-banner h3 {
    margin: 0 0 12px;
    color: #0f4c81;
    font-size: 21px;
}

.cookie-banner p {
    margin: 0 0 20px;
    color: #334155;
    line-height: 1.6;
    font-size: 15px;
}

.cookie-banner a {
    color: #075985;
    font-weight: 600;
    text-decoration: underline;
}

/* ===============================
    Boutons
=============================== */
.cookie-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    flex: 1;
    min-width: 180px;

    border: none;
    border-radius: 7px;

    padding: 13px 18px;

    cursor: pointer;

    font-weight: 600;
    font-size: 15px;

    transition: 0.2s ease;
}

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

.cookie-btn-refuse {
    background: #e2e8f0;
    color: #334155;
}

.cookie-btn-custom {
    background: #e0f2fe;
    color: #075985;
}

.cookie-btn-accept {
    background: #075985;
    color: #ffffff;
}


/* ===============================
    Fenêtre personnalisation
=============================== */

.cookie-modal {
    position: fixed;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: calc(100% - 40px);
    max-width: 650px;

    background: #ffffff;

    border-radius: 12px;

    padding: 28px;

    box-shadow: 0 20px 60px rgba(0,0,0,0.25);

    z-index: 10000;

    display: none;
}

.cookie-modal h3 {
    margin-top: 0;
    color: #075985;
}

.cookie-category {
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 0;

    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.cookie-category:last-child {
    border-bottom: 0;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info strong {
    display: block;
    color: #0f4c81;
    margin-bottom: 5px;
}

.cookie-category-info p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}


/* ===============================
    Switch
=============================== */

.cookie-switch {
    position: relative;
    width: 48px;
    height: 25px;
    flex-shrink: 0;
}

.cookie-switch input {
    display: none;
}

.cookie-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    transition: .3s;
}

.cookie-slider:before {
    content: "";

    position: absolute;

    width: 19px;
    height: 19px;

    left: 3px;
    top: 3px;

    background: white;

    border-radius: 50%;

    transition: .3s;
}

.cookie-switch input:checked + .cookie-slider {
    background: #0284c7;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background: #16a34a;
    cursor: not-allowed;
}


/* ===============================
    Footer modal
=============================== */

.cookie-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 25px;
}

.cookie-modal-actions button {
    border: none;
    padding: 12px 20px;

    border-radius: 6px;

    cursor: pointer;

    font-weight: 600;
}

.cookie-save {
    background: #075985;
    color: white;
}

.cookie-cancel {
    background: #e2e8f0;
    color: #334155;
}


/* ===============================
    Bouton gestion cookies footer
=============================== */

.manage-cookies {
    background: none;
    border: none;

    color: #075985;

    text-decoration: underline;

    cursor: pointer;

    font-size: 14px;
}


@media(max-width: 600px) {

    .cookie-banner {
        bottom: 10px;
        width: calc(100% - 20px);
        padding: 20px;
    }

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

    .cookie-btn {
        width: 100%;
    }

    .cookie-modal {
        max-height: 85vh;
        overflow-y: auto;
    }
}
