/* ==========================================================================
   YA KIT — page (en-tête, accueil, pied) et composants d'enquête communs.
   Thème piloté par les variables --tp-* (page) et --eg-* (moteur), définies
   dans le game.css de chaque jeu.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--tp-bg);
    color: var(--tp-text);
    font-family: var(--tp-font-body);
    min-height: 100vh;
    overflow-x: hidden;
}
#tk-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }

/* En-tête */
.tk-header {
    position: relative; z-index: 10;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.8rem;
    padding: 0.9rem 1.5rem;
    background: var(--tp-header-bg);
    border-bottom: 2px solid var(--tp-border);
    backdrop-filter: blur(10px);
}
.tk-brand { display: flex; align-items: center; gap: 0.8rem; }
.tk-brand-icon { font-size: 2.2rem; }
.tk-brand h1 { margin: 0; font-family: var(--tp-font-head); font-size: clamp(1.1rem, 3.5vw, 1.5rem); color: var(--tp-accent); letter-spacing: 0.04em; }
.tk-brand .tk-sub { display: block; font-size: 0.8rem; color: var(--tp-muted); }
.tk-controls { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tk-age { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--tp-muted); }
.tk-select, .tk-btn {
    font: inherit; font-size: 0.85rem; color: var(--tp-text);
    background: var(--tp-card); border: 1px solid var(--tp-border); border-radius: 999px;
    padding: 0.4rem 0.8rem; cursor: pointer; text-decoration: none;
}
.tk-btn:hover, .tk-select:hover { border-color: var(--tp-accent); }

/* Accueil */
main.tk-main { position: relative; z-index: 5; max-width: 980px; margin: 1.5rem auto 2rem; padding: 0 1rem; }
.tk-landing {
    background: var(--tp-card); border: 1px solid var(--tp-border); border-radius: 18px;
    padding: clamp(1.2rem, 4vw, 2.2rem); text-align: center; box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}
.tk-hero { font-size: 4rem; line-height: 1.1; }
.tk-kicker { font-family: var(--eg-font-mono, monospace); font-size: 0.85rem; color: var(--tp-accent-2); letter-spacing: 0.04em; margin: 0.4rem 0; }
.tk-title { font-family: var(--tp-font-head); font-size: clamp(1.6rem, 5vw, 2.5rem); color: var(--tp-accent); margin: 0.2rem 0 0.6rem; }
.tk-desc { max-width: 720px; margin: 0 auto; text-align: left; font-size: 1.08rem; line-height: 1.6; }
.tk-desc p { margin: 0 0 0.8rem; }
.tk-meta { font-family: var(--eg-font-mono, monospace); font-size: 0.85rem; color: var(--tp-muted); margin: 0.6rem 0 1.2rem; }
.tk-play {
    font: inherit; font-family: var(--tp-font-head); font-weight: 800; font-size: 1.2rem;
    padding: 0.9rem 2.2rem; border-radius: 999px; border: none; cursor: pointer;
    background: var(--tp-play-bg); color: var(--tp-play-ink); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s;
}
.tk-play:hover { transform: scale(1.04); }
.tk-egg { max-width: 520px; margin: 1.6rem auto 0; padding: 1rem; border: 1px dashed var(--tp-border); border-radius: 14px; }
.tk-egg h3 { margin: 0; font-size: 1rem; color: var(--tp-accent); text-transform: uppercase; letter-spacing: 0.05em; }
.tk-egg p { margin: 0.4rem 0; font-size: 0.9rem; color: var(--tp-muted); }
.tk-egg-row { display: flex; justify-content: center; gap: 1rem; margin: 0.6rem 0; }
.tk-secret-bit { font-size: 1.8rem; background: none; border: none; cursor: pointer; transition: transform 0.2s, opacity 0.2s; }
.tk-secret-bit:hover { transform: scale(1.15); }
.tk-secret-bit.locked { opacity: 0.45; transform: scale(0.9); }
#tk-secret-status { font-family: var(--eg-font-mono, monospace); font-size: 0.85rem; color: var(--tp-accent); }
.tk-footer { position: relative; z-index: 5; text-align: center; font-size: 0.85rem; color: var(--tp-muted); padding: 1.5rem 1rem 2rem; }
.eg { position: relative; z-index: 5; }

/* ----- Composants d'enquête (dans les salles) ----- */
.eg .small { font-size: 0.88rem; }
.eg .eg-input { max-width: 100%; }
.eg select.eg-input { width: 100%; font-size: 0.88rem; }
.sub-title { margin: 1.2rem 0 0.3rem; font-size: 1.15rem; color: var(--eg-accent); }
.notebook { margin-bottom: 1rem; padding: 0.6rem 0.9rem; background: var(--tp-notebook-bg); border: 1px solid var(--tp-notebook-border); border-left: 4px solid var(--tp-notebook-border); border-radius: 8px; }
.notebook summary { cursor: pointer; font-family: var(--eg-font-mono); font-size: 0.95rem; color: var(--tp-notebook-title); }
.nb-list { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.95rem; line-height: 1.5; }
.nb-list li { margin-bottom: 0.3rem; }
.paper-note { background: #fff6c9; color: #2b2410; border-radius: 4px; padding: 0.7rem 0.9rem; margin: 0.8rem 0; box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.3); font-size: 0.98rem; line-height: 1.45; }
.paper-note .paper-title { display: block; font-family: var(--eg-font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: #7a5b00; margin-bottom: 0.3rem; }
.paper-note.blue { background: #e3f0ff; color: #0f2340; }
.paper-note.blue .paper-title { color: #24508f; }
.rule-box { background: var(--eg-card-2); border: 2px dashed var(--eg-accent); border-radius: 10px; padding: 0.8rem 1rem; margin: 0.8rem 0; }
.secret-obj { background: none; border: none; font-size: 1.3rem; cursor: pointer; opacity: 0.55; padding: 0 0.3rem; transition: opacity 0.2s, transform 0.2s; }
.secret-obj:hover { opacity: 1; transform: scale(1.2); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0.4rem 0; }
.data-table th, .data-table td { border-bottom: 1px solid var(--eg-border); padding: 0.4rem 0.5rem; text-align: left; vertical-align: middle; }
.data-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--eg-muted); }
.radio-list, .check-list { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.5rem 0 0.8rem; }
.radio { display: flex; gap: 0.5rem; align-items: flex-start; cursor: pointer; padding: 0.35rem 0.5rem; border-radius: 8px; border: 1px solid transparent; }
.radio:hover { border-color: var(--eg-border); }
.radio input { margin-top: 0.25rem; accent-color: var(--eg-accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.6rem; margin-bottom: 0.8rem; }
.form-field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.92rem; color: var(--eg-muted); margin: 0.4rem 0; }
.form-field .eg-input { flex: none; }
.report-q { border: 1px solid var(--eg-border); border-radius: 12px; padding: 0.8rem 1rem; margin-bottom: 0.9rem; background: var(--eg-card-2); }
.report-q h3 { display: flex; gap: 0.6rem; align-items: baseline; font-size: 1.08rem; margin: 0 0 0.4rem; }
.q-num { flex: none; display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--eg-accent); color: var(--eg-accent-ink); font-weight: 800; }
.eg-btn.big { font-size: 1.1rem; padding: 0.85rem 1.4rem; }
.tk-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; align-items: start; }

@media (max-width: 720px) {
    .tk-split { grid-template-columns: 1fr; }
    .tk-header { padding: 0.7rem 1rem; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.3rem 0.35rem; }
}
