/* Cookie consent — premium equestrian (cream, leather, warm tones) */
:root {
    --cc-cream: #f7f3eb;
    --cc-cream-dark: #ebe4d6;
    --cc-leather: #3d2e24;
    --cc-leather-mid: #5c4334;
    --cc-leather-light: #7a5e4a;
    --cc-gold: #b8956a;
    --cc-gold-soft: #d4b896;
    --cc-text: #2c2418;
    --cc-muted: #5c5348;
    --cc-line: rgba(61, 46, 36, 0.18);
    --cc-shadow: 0 -8px 32px rgba(45, 36, 28, 0.12);
    --cc-radius: 14px;
    --cc-z: 10050;
}

.cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--cc-z);
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    pointer-events: none;
    font-family: inherit;
}

/* Au-dessus de la barre d’outils mobile du thème (~70px) */
@media (max-width: 1199px) {
    .cc-banner {
        bottom: 72px;
    }
}

.cc-banner__inner {
    pointer-events: auto;
    max-width: 1100px;
    margin: 0 auto;
    background: linear-gradient(165deg, var(--cc-cream) 0%, var(--cc-cream-dark) 100%);
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-radius);
    box-shadow: var(--cc-shadow);
    padding: 20px 22px 22px;
}

@media (min-width: 768px) {
    .cc-banner__inner {
        padding: 24px 28px 26px;
    }
}

.cc-banner__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cc-leather);
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

.cc-banner__text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--cc-muted);
    margin: 0 0 18px;
    max-width: 52rem;
}

.cc-banner__text a {
    color: var(--cc-leather-mid);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-banner__text a:hover {
    color: var(--cc-leather);
}

.cc-banner__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 576px) {
    .cc-banner__actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

.cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.2;
}

.cc-btn:active {
    transform: scale(0.98);
}

.cc-btn--primary {
    background: var(--cc-leather);
    color: var(--cc-cream);
    border: 1px solid var(--cc-leather);
}

.cc-btn--primary:hover {
    background: var(--cc-leather-mid);
    border-color: var(--cc-leather-mid);
    color: #fff;
}

.cc-btn--outline {
    background: transparent;
    color: var(--cc-leather);
    border: 1px solid var(--cc-leather-light);
}

.cc-btn--outline:hover {
    background: rgba(92, 67, 52, 0.08);
    border-color: var(--cc-leather);
}

.cc-btn--ghost {
    background: transparent;
    color: var(--cc-leather-mid);
    border: 1px solid transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cc-btn--ghost:hover {
    color: var(--cc-leather);
}

/* Modal */
.cc-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--cc-z) + 1);
    background: rgba(45, 36, 28, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cc-modal-overlay.cc-is-open {
    opacity: 1;
    visibility: visible;
}

.cc-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -48%) scale(0.96);
    z-index: calc(var(--cc-z) + 2);
    width: calc(100% - 32px);
    max-width: 520px;
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
    background: var(--cc-cream);
    border: 1px solid var(--cc-line);
    border-radius: var(--cc-radius);
    box-shadow: 0 24px 60px rgba(45, 36, 28, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.cc-modal.cc-is-open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.cc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 12px;
    border-bottom: 1px solid var(--cc-line);
}

.cc-modal__head h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cc-leather);
}

.cc-modal__close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(92, 67, 52, 0.1);
    color: var(--cc-leather);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    line-height: 1;
}

.cc-modal__close:hover {
    background: rgba(92, 67, 52, 0.18);
}

.cc-modal__body {
    padding: 16px 22px;
    overflow-y: auto;
    flex: 1;
}

.cc-modal__foot {
    padding: 16px 22px 20px;
    border-top: 1px solid var(--cc-line);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 480px) {
    .cc-modal__foot {
        flex-direction: row;
        justify-content: flex-end;
    }
}

.cc-cat {
    padding: 14px 0;
    border-bottom: 1px solid var(--cc-line);
}

.cc-cat:last-child {
    border-bottom: none;
}

.cc-cat__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.cc-cat__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--cc-leather);
    margin: 0 0 6px;
}

.cc-cat__desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--cc-muted);
    margin: 0;
}

.cc-badge {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cc-leather-mid);
    background: rgba(184, 149, 106, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Switch */
.cc-switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}

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

.cc-switch__ui {
    position: absolute;
    inset: 0;
    background: var(--cc-cream-dark);
    border: 1px solid var(--cc-line);
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cc-switch__ui::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(45, 36, 28, 0.15);
    transition: transform 0.2s ease;
}

.cc-switch input:checked + .cc-switch__ui {
    background: rgba(92, 67, 52, 0.35);
    border-color: var(--cc-leather-light);
}

.cc-switch input:checked + .cc-switch__ui::after {
    transform: translate(20px, -50%);
}

.cc-switch input:disabled + .cc-switch__ui {
    opacity: 0.85;
    cursor: not-allowed;
    background: rgba(184, 149, 106, 0.25);
}

.cc-switch input:focus-visible + .cc-switch__ui {
    outline: 2px solid var(--cc-gold);
    outline-offset: 2px;
}

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

body.cc-modal-open {
    overflow: hidden;
}
