/* Composants isolés de gestion du consentement. Aucun style existant du site n'est modifié. */
.cn-consent-banner,
.cn-consent-modal {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #2C3E50;
    box-sizing: border-box;
}

.cn-consent-banner *,
.cn-consent-modal * {
    box-sizing: border-box;
}

.cn-consent-banner {
    position: fixed;
    z-index: 10000;
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #afc59f;
    border-radius: 15px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
}

.cn-consent-banner[hidden],
.cn-consent-modal[hidden] {
    display: none !important;
}

.cn-consent-title {
    margin: 0 0 8px;
    color: #5d7a68;
    font-size: 1.2rem;
    line-height: 1.35;
}

.cn-consent-text {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.55;
}

.cn-consent-text a,
.cn-consent-modal a,
.cn-map-placeholder a {
    color: #5d7a68;
    text-decoration: underline;
}

.cn-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.cn-consent-btn {
    min-height: 44px;
    padding: 10px 17px;
    border: 2px solid #5d7a68;
    border-radius: 999px;
    background: #5d7a68;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cn-consent-btn:hover,
.cn-consent-btn:focus-visible {
    background: #ffffff;
    color: #5d7a68;
    outline: 3px solid rgba(175, 197, 159, 0.55);
    outline-offset: 2px;
}

.cn-consent-btn-secondary {
    background: #ffffff;
    color: #5d7a68;
}

.cn-consent-btn-secondary:hover,
.cn-consent-btn-secondary:focus-visible {
    background: #f1f5ee;
}

.cn-consent-backdrop {
    position: fixed;
    z-index: 10001;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(26, 42, 33, 0.58);
}

.cn-consent-backdrop[hidden] {
    display: none !important;
}

.cn-consent-modal {
    width: min(680px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3);
}

.cn-consent-category {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: start;
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #dce6d6;
    border-radius: 12px;
    background: #f9fbf7;
}

.cn-consent-category h3 {
    margin: 0 0 5px;
    color: #5d7a68;
    font-size: 1rem;
}

.cn-consent-category p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cn-consent-toggle {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    accent-color: #5d7a68;
}

.cn-consent-always-on {
    color: #5d7a68;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.cn-map-placeholder {
    display: flex;
    min-height: 200px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 22px;
    text-align: center;
    border: 1px solid #dce6d6;
    border-radius: 10px;
    background: #f9fbf7;
    color: #2C3E50;
}

.cn-map-placeholder p {
    margin: 0;
    max-width: 560px;
    line-height: 1.5;
}

.cn-cookie-settings {
    cursor: pointer;
}

body.cn-consent-locked {
    overflow: hidden;
}

@media (max-width: 640px) {
    .cn-consent-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 17px;
    }

    .cn-consent-actions,
    .cn-consent-actions .cn-consent-btn {
        width: 100%;
    }

    .cn-consent-modal {
        padding: 18px;
    }

    .cn-consent-category {
        grid-template-columns: 1fr;
    }
}
