/**
 * WP Totem Cookie Consent — charte Diane (bleu brume / ivoire)
 */

.wptotem-cc {
    --wptotem-cc-ink: #1b2a33;
    --wptotem-cc-ink-2: #43525c;
    --wptotem-cc-ivoire: #fbf7ef;
    --wptotem-cc-ivoire-2: #fffcf6;
    --wptotem-cc-bleu: #335464;
    --wptotem-cc-bleu-2: #243d49;
    --wptotem-cc-rose: #dec1b5;
    --wptotem-cc-line: rgba(255, 255, 255, 0.14);
    --wptotem-cc-font: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --wptotem-cc-display: 'Newsreader', 'Cormorant Garamond', 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(27, 42, 51, 0.42);
    backdrop-filter: blur(2px);
}

.wptotem-cc__dialog {
    position: relative;
    width: min(100%, 560px);
    background: var(--wptotem-cc-bleu-2);
    color: var(--wptotem-cc-ivoire);
    border-radius: var(--wptotem-cc-radius);
    box-shadow: 0 1px 2px rgba(27, 42, 51, 0.08), 0 18px 48px rgba(27, 42, 51, 0.22);
    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: 400;
    line-height: 1.15;
    color: var(--wptotem-cc-ivoire-2);
}

.wptotem-cc__text {
    margin: 0 0 22px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(251, 247, 239, 0.86);
}

.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-ivoire-2);
    color: var(--wptotem-cc-bleu-2);
}

.wptotem-cc__btn--primary:hover {
    background: #fff;
}

.wptotem-cc__btn--ghost {
    background: transparent;
    color: var(--wptotem-cc-ivoire-2);
    border-color: rgba(255, 255, 255, 0.32);
}

.wptotem-cc__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.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(251, 247, 239, 0.72);
}

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

.wptotem-cc__pref-input {
    width: 18px;
    height: 18px;
    accent-color: var(--wptotem-cc-rose);
    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);
}

.wptotem-cc__footer a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--wptotem-cc-rose);
    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;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(51, 84, 100, 0.18);
    border-radius: 50%;
    background: rgba(251, 247, 239, 0.96);
    color: #335464;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(27, 42, 51, 0.12);
    transition: background 0.15s ease, transform 0.15s ease;
}

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

.wptotem-cc-reopen:hover {
    background: #fff;
    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, #e8eff2 0%, #dce6ea 100%);
    color: #43525c;
    font-family: var(--wptotem-cc-font);
}

.wptotem-consent-block__placeholder p {
    margin: 0;
    max-width: 420px;
    font-size: 15px;
    line-height: 1.55;
}

.wptotem-consent-block__placeholder button {
    min-height: 42px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: #335464;
    color: #fbf7ef;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

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

.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;
    }
}
