/* Bannière + modal consentement RGPD — Essentiana (nom de fichier sans « cookie » pour les bloqueurs) */

#essentiana-cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    color: #f5f5f5;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
    font-family: 'Nunito Sans', sans-serif;
    font-size: 0.875rem;
    line-height: 1.45;
}

#essentiana-cc-banner[hidden] {
    display: none !important;
}

/* S’assurer que la bannière est visible une fois le consentement demandé */
#essentiana-cc-banner:not([hidden]) {
    display: block !important;
}

.essentiana-cc-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.essentiana-cc-banner-text {
    flex: 1 1 220px;
    margin: 0;
}

.essentiana-cc-banner-text a {
    color: #ffb3b3;
    text-decoration: underline;
}

.essentiana-cc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.essentiana-cc-btn {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.essentiana-cc-btn:hover {
    opacity: 0.92;
}

.essentiana-cc-btn:active {
    transform: scale(0.98);
}

.essentiana-cc-btn--primary {
    background: #F77F77;
    color: #fff;
}

.essentiana-cc-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.essentiana-cc-btn--muted {
    background: #444;
    color: #eee;
}

#essentiana-cc-modal[hidden] {
    display: none !important;
}

#essentiana-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.essentiana-cc-modal-open {
    overflow: hidden;
}

#essentiana-cc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.essentiana-cc-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    color: #222;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    font-family: 'Nunito Sans', sans-serif;
}

.essentiana-cc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 0.5rem;
    border-bottom: 1px solid #eee;
}

.essentiana-cc-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1a1a1a;
}

.essentiana-cc-modal-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0.15rem;
}

.essentiana-cc-modal-body {
    padding: 1rem 1.25rem 1.25rem;
}

.essentiana-cc-modal-intro {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 1rem;
}

.essentiana-cc-cat {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
}

.essentiana-cc-cat--locked {
    opacity: 0.85;
    background: #fafafa;
}

.essentiana-cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.essentiana-cc-cat-head label {
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    margin: 0;
}

.essentiana-cc-cat-desc {
    font-size: 0.78rem;
    color: #666;
    margin: 0.45rem 0 0;
    line-height: 1.4;
}

.essentiana-cc-switch {
    width: 44px;
    height: 24px;
    accent-color: #F77F77;
    cursor: pointer;
}

.essentiana-cc-modal-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 0.5rem;
}

@media (max-width: 576px) {
    .essentiana-cc-banner-actions {
        width: 100%;
        justify-content: stretch;
    }
    .essentiana-cc-banner-actions .essentiana-cc-btn {
        flex: 1 1 auto;
        text-align: center;
    }
}

.footer-link.essentiana-cc-open-preferences:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* Crisp — bulle en bas à droite ; le bouton « retour haut » est juste à sa gauche */
#crisp-chatbox,
#crisp-chatbox-button,
.crisp-client #crisp-chatbox-button,
.crisp-client #crisp-chatbox {
    right: 25px !important;
    left: auto !important;
    bottom: 25px !important;
}

@media (max-width: 991.98px) {
    #crisp-chatbox,
    #crisp-chatbox-button,
    .crisp-client #crisp-chatbox-button,
    .crisp-client #crisp-chatbox {
        right: 16px !important;
        bottom: 16px !important;
    }
}

/* Société des Avis Garantis — snippet flottant en bas à gauche */
.agJsWidget {
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    z-index: 99990 !important;
}
