/* ============================================================
   Tehono Cookies — Banner + Modal de consentement RGPD
   Design aligne avec le theme Ta'iara Gate (dark, accents verts)
   ============================================================ */

/* ===== Banner bas de page (discret, style CookieYes-like) ===== */
.tc-banner {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 9998;
    font-family: 'Montserrat', sans-serif;
    animation: tc-slide-up 0.4s ease-out;
}
.tc-banner[hidden] { display: none; }

@keyframes tc-slide-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.tc-banner-inner {
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(15, 20, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

.tc-banner-content { min-width: 0; }

.tc-banner-title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.1px;
}

.tc-banner-text {
    margin: 0 0 4px;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.tc-banner-links {
    margin: 0;
    font-size: 11.5px;
}
.tc-banner-links a {
    color: #4ade80;
    text-decoration: underline;
    text-decoration-color: rgba(74, 222, 128, 0.4);
    text-underline-offset: 2px;
}
.tc-banner-links a:hover {
    color: #86efac;
    text-decoration-color: #86efac;
}

.tc-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ===== Boutons ===== */
.tc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}
.tc-btn:active { transform: translateY(1px); }

.tc-btn-primary {
    background: #4ade80;
    color: #0a0a0f;
    border-color: #4ade80;
}
.tc-btn-primary:hover {
    background: #86efac;
    border-color: #86efac;
}

.tc-btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}
.tc-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
}

.tc-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: transparent;
    text-decoration: none;
}
.tc-btn-ghost:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

/* ===== Modal preferences ===== */
.tc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tc-modal[hidden] { display: none; }

.tc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.tc-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(10, 15, 25, 0.98);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 16px;
    padding: 32px 30px 26px;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    animation: tc-modal-in 0.3s ease-out;
}

@keyframes tc-modal-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.tc-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
.tc-modal-close:hover { color: #ffffff; }

.tc-modal-title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
}

.tc-modal-intro {
    margin: 0 0 22px;
    font-size: 13.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
}
.tc-modal-intro a,
.tc-modal-intro a:visited,
.tc-modal-intro a:link {
    color: #4ade80 !important;
    text-decoration: underline !important;
    text-decoration-color: rgba(74, 222, 128, 0.4) !important;
    text-underline-offset: 2px;
    transition: color 0.2s, text-decoration-color 0.2s;
}
.tc-modal-intro a:hover,
.tc-modal-intro a:focus {
    color: #86efac !important;
    text-decoration-color: #86efac !important;
}

/* Anti-Astra : forcer la couleur des liens du bandeau aussi (le selecteur
   etait deja la mais sans !important, Astra pouvait passer devant). */
.tc-banner-links a,
.tc-banner-links a:visited,
.tc-banner-links a:link {
    color: #4ade80 !important;
}
.tc-banner-links a:hover {
    color: #86efac !important;
}

/* ===== Catégories ===== */
.tc-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 12px;
}

.tc-category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.tc-category-name {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
}

.tc-category-locked {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #4ade80;
    padding: 3px 10px;
    border-radius: 30px;
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.tc-category-desc {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Toggle switch ===== */
.tc-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.tc-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.tc-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    transition: background 0.25s, border-color 0.25s;
}
.tc-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s;
}
.tc-toggle input:checked + .tc-toggle-slider {
    background: #4ade80;
    border-color: #4ade80;
}
.tc-toggle input:checked + .tc-toggle-slider::before {
    transform: translateX(20px);
    background: #0a0a0f;
}

/* ===== Modal actions ===== */
.tc-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ===== Bouton flottant icone cookie pour rouvrir ===== */
.tc-revisit {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 9997;
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 25, 0.85);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0.55;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.tc-revisit[hidden] { display: none; }
.tc-revisit:hover {
    opacity: 1;
    background: rgba(74, 222, 128, 0.18);
    border-color: rgba(74, 222, 128, 0.7);
    color: #4ade80;
    transform: scale(1.06);
}
.tc-revisit svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* ===== Lien-bouton inline (shortcode) ===== */
.tc-link-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    padding: 0;
}
.tc-link-btn:hover {
    color: #4ade80;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .tc-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    .tc-banner-inner {
        grid-template-columns: 1fr;
        padding: 18px 20px;
        gap: 16px;
    }
    .tc-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .tc-btn { width: 100%; }
    .tc-modal-content {
        padding: 24px 20px 18px;
    }
    .tc-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .tc-revisit {
        bottom: 12px;
        left: 12px;
        width: 34px;
        height: 34px;
    }
    .tc-revisit svg {
        width: 18px;
        height: 18px;
    }
}
