/* ==========================================================================
   CODEX — VOILE PHOTOSENSIBLE DU LORE CACHÉ
   css/secret-veil.css — « Le Voile de l'Architecte »
   Thème Killtime : variables partagées (css/themes.css), Cinzel + Jakarta.
   Chargé par les pages d'accès au lore caché (site Killtime).
   ========================================================================== */

/* ---------- repli de spécificité 0 si css/themes.css n'est pas chargé ---------- */
:where(:root),
:where([data-theme="dark"]) {
    --bg-surface: #111827;
    --bg-surface-elevated: #182235;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.25);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #38bdf8;
    --text-gold: #fbbf24;
    --arcane-cyan: #38bdf8;
    --arcane-cyan-glow: rgba(56, 189, 248, 0.35);
    --temporal-amber: #f59e0b;
    --temporal-glow: rgba(245, 158, 11, 0.25);
    --vital-ruby: #f43f5e;
    --matrix-emerald: #10b981;
    --matrix-glow: rgba(16, 185, 129, 0.25);
}

:where([data-theme="light"]) {
    --bg-surface: #ffffff;
    --bg-surface-elevated: #e2e8f0;
    --border-subtle: rgba(0, 0, 0, 0.12);
    --border-glow: rgba(2, 132, 199, 0.3);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-accent: #0284c7;
    --text-gold: #b45309;
    --arcane-cyan: #0284c7;
    --arcane-cyan-glow: rgba(2, 132, 199, 0.2);
    --temporal-amber: #d97706;
    --temporal-glow: rgba(217, 119, 6, 0.2);
    --vital-ruby: #e11d48;
    --matrix-emerald: #059669;
    --matrix-glow: rgba(5, 150, 105, 0.2);
}

/* ---------- fond + carte ---------- */
.kt-veil-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 4, 10, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.kt-veil {
    width: min(520px, 94vw);
    max-height: 88vh;
    overflow: auto;
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-glow);
    border-top: 3px solid var(--vital-ruby);
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 30px var(--arcane-cyan-glow);
    padding: 26px 28px 20px;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    text-align: center;
}

.kt-veil-sigil {
    font-size: 30px;
    line-height: 1;
    color: var(--temporal-amber);
    text-shadow: 0 0 18px var(--temporal-glow);
    margin-bottom: 10px;
}

.kt-veil-title {
    font-family: var(--font-title, 'Cinzel', serif);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    color: var(--text-gold);
    margin: 0 0 12px;
}

.kt-veil-desc {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

/* ---------- case mémoire ---------- */
.kt-veil-remember {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 16px;
    cursor: pointer;
}

.kt-veil-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--arcane-cyan);
}

/* ---------- boutons ---------- */
.kt-veil-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.kt-veil-btn {
    border-radius: 10px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-primary);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.kt-veil-btn:hover {
    transform: translateY(-1px);
}

.kt-veil-btn:focus-visible {
    outline: 2px solid var(--text-accent);
    outline-offset: 2px;
}

.kt-veil-safe {
    border-color: var(--matrix-emerald);
    color: var(--matrix-emerald);
    box-shadow: 0 0 16px var(--matrix-glow);
}

.kt-veil-full {
    border-color: var(--vital-ruby);
    color: var(--vital-ruby);
}

.kt-veil-cancel {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
    font-weight: 500;
}

.kt-veil-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

/* ---------- mode sûr : aucun flash, aucune secousse ---------- */
html.kt-no-flash *,
html.kt-no-flash *::before,
html.kt-no-flash *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
}

/* ---------- défense en profondeur : mouvement réduit OS ---------- */
@media (prefers-reduced-motion: reduce) {
    .kt-veil-btn:hover {
        transform: none;
    }
}
