/**
 * WP Totem Cookie Consent — charte Cercle de Présence
 * (bleu profond / ivoire / or)
 */

.wptotem-cc {
    --wptotem-cc-ink: #4B372A;
    --wptotem-cc-ink-2: #6B5443;
    --wptotem-cc-ivoire: #F6F1E8;
    --wptotem-cc-ivoire-2: #FAF7F2;
    --wptotem-cc-bleu: #0F1556;
    --wptotem-cc-bleu-2: #0A0E3A;
    --wptotem-cc-gold: #C89B3C;
    --wptotem-cc-gold-soft: #E0BE7A;
    --wptotem-cc-line: rgba(246, 241, 232, 0.16);
    --wptotem-cc-font: 'Manrope', 'Avenir Next', 'Helvetica Neue', sans-serif;
    --wptotem-cc-display: 'Cormorant Garamond', 'Manrope', Georgia, serif;
    --wptotem-cc-radius: 22px;
}

.wptotem-cc[hidden],
.wptotem-cc-reopen[hidden] {
    display: none !important;
}

.wptotem-cc {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: clamp(16px, 3vw, 32px);
}

.wptotem-cc.is-visible {
    display: flex;
}

.wptotem-cc__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 58, 0.52);
    backdrop-filter: blur(3px);
}

.wptotem-cc__dialog {
    position: relative;
    width: min(100%, 560px);
    background: linear-gradient(165deg, var(--wptotem-cc-bleu) 0%, var(--wptotem-cc-bleu-2) 100%);
    color: var(--wptotem-cc-ivoire);
    border: 1px solid rgba(200, 155, 60, 0.22);
    border-radius: var(--wptotem-cc-radius);
    box-shadow: 0 1px 2px rgba(10, 14, 58, 0.1), 0 22px 60px rgba(10, 14, 58, 0.28);
    overflow: hidden;
    font-family: var(--wptotem-cc-font);
}

.wptotem-cc__main {
    padding: 28px 28px 22px;
}

.wptotem-cc__title {
    margin: 0 0 14px;
    font-family: var(--wptotem-cc-display);
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 500;
    font-style: italic;
    line-height: 1.15;
    color: var(--wptotem-cc-ivoire-2);
}

.wptotem-cc__text {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(246, 241, 232, 0.88);
}

.wptotem-cc__actions {
    display: grid;
    gap: 10px;
    margin-bottom: 10px;
}

.wptotem-cc__actions--primary {
    grid-template-columns: 1fr 1fr;
}

.wptotem-cc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--wptotem-cc-font);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.wptotem-cc__btn:hover {
    transform: translateY(-1px);
}

.wptotem-cc__btn--primary {
    background: var(--wptotem-cc-gold);
    color: var(--wptotem-cc-bleu);
}

.wptotem-cc__btn--primary:hover {
    background: #B98C2F;
    color: var(--wptotem-cc-bleu);
}

.wptotem-cc__actions--primary .wptotem-cc__btn--primary:last-child {
    background: transparent;
    color: var(--wptotem-cc-ivoire-2);
    border-color: rgba(246, 241, 232, 0.38);
}

.wptotem-cc__actions--primary .wptotem-cc__btn--primary:last-child:hover {
    background: rgba(246, 241, 232, 0.1);
    color: var(--wptotem-cc-ivoire-2);
}

.wptotem-cc__btn--ghost {
    background: transparent;
    color: var(--wptotem-cc-gold-soft);
    border-color: rgba(224, 190, 122, 0.45);
}

.wptotem-cc__btn--ghost:hover {
    background: rgba(200, 155, 60, 0.12);
    color: var(--wptotem-cc-ivoire-2);
    border-color: var(--wptotem-cc-gold-soft);
}

.wptotem-cc__btn--save {
    margin-top: 8px;
}

.wptotem-cc__prefs {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--wptotem-cc-line);
    display: grid;
    gap: 14px;
}

.wptotem-cc__prefs[hidden] {
    display: none !important;
}

.wptotem-cc__pref {
    display: grid;
    gap: 6px;
    cursor: default;
}

.wptotem-cc__pref-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wptotem-cc__pref-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--wptotem-cc-ivoire-2);
}

.wptotem-cc__pref-desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(246, 241, 232, 0.74);
}

.wptotem-cc__pref-badge {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wptotem-cc-gold-soft);
    white-space: nowrap;
}

.wptotem-cc__pref-input {
    width: 18px;
    height: 18px;
    accent-color: var(--wptotem-cc-gold);
    cursor: pointer;
}

.wptotem-cc__footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 28px 22px;
    border-top: 1px solid var(--wptotem-cc-line);
    background: rgba(10, 14, 58, 0.35);
}

.wptotem-cc__footer a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--wptotem-cc-gold-soft);
    text-decoration: none;
    text-align: center;
}

.wptotem-cc__footer a:hover {
    color: var(--wptotem-cc-ivoire-2);
    text-decoration: underline;
}

.wptotem-cc-reopen {
    position: fixed;
    left: 16px;
    bottom: 46px;
    z-index: 99990;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px 0 10px;
    border: 1px solid rgba(200, 155, 60, 0.35);
    border-radius: 999px;
    background: rgba(246, 241, 232, 0.96);
    color: var(--wptotem-cc-bleu);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(10, 14, 58, 0.14);
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    font-family: var(--wptotem-cc-font);
    font-size: 13px;
    font-weight: 600;
}

.wptotem-cc-reopen__label {
    line-height: 1;
}

.wptotem-cc-reopen.is-visible {
    display: inline-flex;
}

.wptotem-cc-reopen:hover {
    background: #fff;
    border-color: var(--wptotem-cc-gold);
    color: var(--wptotem-cc-bleu);
    transform: translateY(-1px);
}

.wptotem-cc-reopen__icon {
    display: block;
}

/* Contenus bloqués (ex. Google Maps) */
.wptotem-consent-block {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
}

.wptotem-consent-block__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    height: 100%;
    min-height: 280px;
    padding: 28px;
    text-align: center;
    background: linear-gradient(180deg, var(--wptotem-cc-ivoire) 0%, var(--wptotem-cc-ivoire-2) 100%);
    color: var(--wptotem-cc-ink-2);
    font-family: var(--wptotem-cc-font);
}

.wptotem-consent-block__placeholder p {
    margin: 0;
    max-width: 420px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--wptotem-cc-ink);
}

.wptotem-consent-block__placeholder button {
    min-height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: var(--wptotem-cc-gold);
    color: var(--wptotem-cc-bleu);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wptotem-consent-block__placeholder button:hover {
    background: #B98C2F;
}

.wptotem-consent-block iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 560px) {
    .wptotem-cc__actions--primary {
        grid-template-columns: 1fr;
    }

    .wptotem-cc__footer {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 782px) {
    .admin-bar .wptotem-cc-reopen {
        bottom: 102px;
    }
}
