/* SPDX-License-Identifier: MIT */
/* Design "Acid Pop / sticker" aligné sur le design system Check-in 1:1 (../DESIGN.md).
   Mono-thème light "Hot Magenta", ombre dure (zéro flou) réservée à la carte
   question, boutons secondaires plats. */

:root {
    --bg-base: #fbf9f8;

    --accent-rgb: 255 46 136;           /* magenta */
    --accent: rgb(var(--accent-rgb));
    --accent2-rgb: 255 122 26;          /* orange */

    --blue: #4285f4;
    --blue-dark: #2f6fd6;

    --text-strong: #2b0a1e;
    --hint: #e0186b;

    /* primitives design system (patte sticker) */
    --radius: 3px;
    --shadow-hard: 4px 4px 0 var(--hint);
    --shadow-badge: 3px 3px 0 rgb(var(--accent2-rgb) / 0.6);
    --border-mag: 1.8px solid var(--accent);

    --footer-color: #d6145f;
    --footer-border: rgb(var(--accent-rgb) / 0.22);
    --footer-hover: #b80f50;

    --decor:
        radial-gradient(720px 580px at 6% 4%, rgba(255, 122, 26, 0.08), transparent 60%),
        radial-gradient(760px 600px at 98% 92%, rgba(255, 46, 136, 0.09), transparent 62%);
    --dot-color: rgba(20, 12, 30, 0.04);
}

* { box-sizing: border-box; }

/* Embed-Notion : hauteur auto, pas de overflow:hidden sur body. */
body {
    font-family: 'Archivo', sans-serif;
    margin: 0;
    min-height: 100vh;
    padding: 24px 18px;
    background-color: var(--bg-base);
    color: var(--text-strong);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

/* ===== Décor pleine page ===== */
#bg-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: var(--decor);
}
#bg-decor::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--dot-color) 1px, transparent 1.4px);
    background-size: 7px 7px;
}

/* ===== Interface centrée ===== */
#app {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 780px;
}

#button-container,
#question-container { position: relative; z-index: 2; }

/* toggle thème conservé pour script.js mais masqué (mono-thème) */
#theme-toggle { display: none; }

/* ===== Boutons — une seule ligne ===== */
#button-container {
    display: flex;
    gap: 9px;
    align-items: stretch;
}

.cat-btn,
#boutonChance {
    font-family: inherit;
    flex: 1;
    border: none;
    cursor: pointer;
    padding: 11px 10px;
    line-height: 1.15;
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    border-radius: var(--radius);
    transition: background-color 0.18s, color 0.18s, transform 0.05s;
}

/* Les 3 catégories = GROUPE SECONDAIRE plat : bague fine, pas d'ombre.
   (Le traitement "sticker" ombre dure est réservé au héros + carte question.) */
.cat-btn {
    background-color: transparent;
    color: var(--accent);
    box-shadow: inset 0 0 0 1.5px rgb(var(--accent-rgb) / 0.55);
}

.cat-btn:hover {
    background-color: #fff0f6;
    box-shadow: inset 0 0 0 1.5px var(--accent);
}

.cat-btn:active { transform: translate(1px, 1px); }

/* Catégorie sélectionnée = chip plein magenta, sans ombre (reste un contrôle) */
.cat-btn.is-active,
.cat-btn.is-active:hover {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: none;
}

/* « J'ai de la chance » = seul bouton à part : aplat bleu, plat (pas d'ombre) */
#boutonChance {
    background-color: var(--blue);
    color: #fff;
}
#boutonChance:hover { background-color: var(--blue-dark); }
#boutonChance:active { transform: translate(1px, 1px); }

/* ===== Zone question ===== */
#question-container {
    margin-top: 26px;          /* marge pour le badge qui chevauche la carte */
    display: none;
}
#question-container.is-visible { display: block; }

/* carte sticker autour de la question */
.q-card {
    position: relative;
    background: #ffffff;
    border: var(--border-mag);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hard);
    padding: 18px 20px 19px;
}

#category-badge {
    position: absolute;
    top: -12px;
    left: 16px;
    display: inline-block;
    background-color: var(--accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: var(--radius);
    transform: rotate(-2deg);
    box-shadow: var(--shadow-badge);
    white-space: nowrap;
}
#category-badge:empty { display: none; }

#question {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-strong);
    margin: 0;
    text-wrap: pretty;
}

/* ===== Esquive : Passer à droite, décompte lié à sa gauche ===== */
.pass-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

#pass-hint {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--hint);
    text-align: right;
    line-height: 1.2;
}

#passer {
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: var(--radius);
    background-color: #ffffff;
    color: var(--accent);
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: inset 0 0 0 1.5px rgb(var(--accent-rgb) / 0.55);
    transition: background-color 0.18s, box-shadow 0.18s, opacity 0.18s, transform 0.05s;
}

#passer .ico { flex: none; transition: transform 0.3s ease; }
#passer:hover:not(:disabled) { background-color: #fff0f6; }
#passer:hover:not(:disabled) .ico { transform: translateX(2px); }
#passer:active:not(:disabled) { transform: translate(1px, 1px); }

#passer:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: inset 0 0 0 1.6px rgb(var(--accent-rgb) / 0.35);
}

/* ===== Footer / crédits ===== */
#credits {
    position: relative;
    z-index: 2;
    margin-top: 22px;
    padding-top: 12px;
    border-top: 1px solid var(--footer-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--footer-color);
}

#credits a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--footer-color);
    text-decoration: none;
    transition: color 0.18s;
}

#credits a .gh { flex: none; }
#credits a:hover { color: var(--footer-hover); }
#credits .sep { opacity: 0.5; }

/* ===== Responsive : iframe étroite / mobile → boutons 2×2 ===== */
@media (max-width: 560px) {
    #button-container { flex-wrap: wrap; }
    .cat-btn,
    #boutonChance { flex: 1 1 calc(50% - 4.5px); }
    #question { font-size: 17px; }
}

@media (max-width: 360px) {
    #question { font-size: 16px; }
    .cat-btn,
    #boutonChance { font-size: 11px; padding: 9px 6px; }
}
