/* Question du jour / communauté */
/* ====================================================== question du jour

   Même langage que le chat : orb, cartes type suggestions, bulles assistant. */

.day-page .day {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.8rem 1.4rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.quiz {
    animation: riseIn .45s ease both;
}

.day-hero {
    text-align: center;
    padding: .4rem 0 1.35rem;
}

.day-hero .orb {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.1rem;
}

.quiz-kicker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: .35rem .5rem;
    margin: 0 0 .45rem;
    font-size: .72rem;
    font-weight: 650;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--faint);
}
.quiz-sep { opacity: .55; }

.quiz-series {
    margin: 0 0 .55rem;
    font-size: .9rem;
    font-weight: 650;
    color: var(--accent);
    letter-spacing: -.01em;
}

.quiz h1 {
    margin: 0 auto;
    max-width: 28ch;
    font-size: clamp(1.35rem, 3.4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.25;
    color: var(--ink);
}

.quiz-personal {
    margin: .75rem auto 0;
    max-width: 42ch;
    font-size: .84rem;
    color: var(--muted);
    line-height: 1.4;
}

.quiz-foot {
    margin: .85rem 0 0;
    text-align: center;
    font-size: .76rem;
    color: var(--faint);
}

.options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    counter-reset: day-opt;
}
.options > li {
    margin: 0;
    padding: 0;
    list-style: none;
}
.option {
    counter-increment: day-opt;
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    width: 100%;
    min-height: 100%;
    text-align: left;
    padding: .85rem .95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: .92rem;
    line-height: 1.35;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
    position: relative;
    overflow: hidden;
}
.option::before {
    content: counter(day-opt, decimal-leading-zero);
    flex: 0 0 auto;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
    margin-top: .2rem;
}
.option .label { min-width: 0; flex: 1; }
.option:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    background: var(--surface-2);
}
.option:disabled { cursor: default; opacity: .78; }
.option:disabled:hover { transform: none; }
.option.is-mine {
    opacity: 1;
    border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
        var(--surface);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}
.option.is-mine::before { color: var(--accent); }
.option .tick { display: none; }

/* ------------------------------------------------------- dépouillement */

.day-page .results,
.day-page .verdict {
    animation: riseIn .4s ease both;
}

.day-bubble {
    width: 100%;
    padding: 1rem 1.1rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.day-page .results.msg,
.day-page .verdict.msg {
    gap: .85rem;
}

.day-page .msg.bot .avatar::after {
    display: none;
}

.results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: 1rem;
}
.results-count { font-size: .9rem; color: var(--muted); }
.results-count strong {
    color: var(--ink);
    font-size: 1.2rem;
    font-variant-numeric: tabular-nums;
}

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.bar-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .4rem;
}
.bar-label { font-size: .9rem; }
.bar-share {
    font-size: .84rem;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.bar-track {
    height: 8px;
    border-radius: 99px;
    background: var(--surface-2);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}
.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    transition: width .8s cubic-bezier(.2, .8, .2, 1);
}
.bar-row.is-mine .bar-label { font-weight: 700; }
.bar-row.is-mine .bar-label::after {
    content: "votre choix";
    margin-left: .5rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--accent);
}
.bar-row.is-mine .bar-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* ---------------------------------------------------- lecture du vote */

.verdict-title {
    margin: 0 0 .75rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--faint);
}
.verdict .thinking {
    display: flex;
    align-items: baseline;
    gap: .25rem;
    color: var(--muted);
    font-size: .92rem;
}
.verdict .markdown {
    font-size: .98rem;
    line-height: 1.6;
}
.verdict .actions {
    opacity: 1;
    margin-top: .85rem;
}

.tomorrow {
    display: block;
    margin: .25rem auto 0;
    max-width: 520px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.tomorrow div { display: flex; flex-direction: column; line-height: 1.35; gap: .2rem; }
.tomorrow strong { font-size: .92rem; color: var(--ink); }
.tomorrow span { color: var(--faint); font-size: .8rem; }

/* ------------------------------------------------------ série et archives */

.streak-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
}
.streak-mark,
.streak-flame {
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--surface-2), var(--border-soft));
    border: 1px solid var(--border);
    flex: 0 0 auto;
    position: relative;
}
.streak-mark::after,
.streak-flame::after {
    content: "";
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: var(--faint);
}
.streak-mark.is-lit,
.streak-flame.is-lit {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 28%, transparent);
}
.streak-mark.is-lit::after,
.streak-flame.is-lit::after {
    background: #fff;
}
.streak-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.streak-text strong { font-size: .86rem; color: var(--ink); }
.streak-text span { color: var(--faint); font-size: .72rem; }

.past {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.past::-webkit-scrollbar { width: 6px; }
.past::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }
.past-item {
    display: grid;
    gap: .15rem;
    text-align: left;
    width: 100%;
    padding: .55rem .65rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    animation: slideIn .25s ease both;
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.past-item:hover {
    background: var(--surface);
    border-color: var(--border-soft);
    color: var(--text);
}
.past-day {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--faint);
}
.past-prompt {
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
}
.past-top { font-size: .74rem; color: var(--accent); }

/* ========================================================== responsive

   Ces règles vivaient dans shell.css, chargé avant cette feuille : à poids égal la dernière
   déclaration gagne, et la mise en page de bureau écrite ici les annulait toutes. Sur
   téléphone, les quatre réponses restaient donc sur deux colonnes, à deux ou trois mots par
   ligne. */

@media (hover: none) {
    .option { min-height: 48px; }
    .past-item { min-height: 44px; }
}

@media (max-width: 820px) {
    .day-page .day { padding: 1.35rem 1rem 1.8rem; gap: 1.1rem; }
    /* Une réponse par ligne : sur 360 px, deux colonnes coupaient les intitulés en trois. */
    .options { grid-template-columns: 1fr; gap: .55rem; }
    .option { font-size: .9rem; padding: .8rem .9rem; }
    .day-hero { padding-bottom: 1rem; }
    .day-hero .orb { width: 58px; height: 58px; margin-bottom: .85rem; }
    .quiz h1 { font-size: clamp(1.25rem, 5.6vw, 1.6rem); }
    .results-head { flex-wrap: wrap; }
    .day-bubble { padding: .9rem .95rem 1rem; }
    .tomorrow { padding: .85rem .95rem; }
}

/* Le libellé « votre choix » collé après l'intitulé faisait déborder la barre : sur les
   écrans étroits il passe sous le texte plutôt que de le pousser. */
@media (max-width: 480px) {
    .bar-top { flex-wrap: wrap; }
    .bar-row.is-mine .bar-label::after { margin-left: .35rem; }
    .quiz-kicker { font-size: .66rem; letter-spacing: .06em; }
    .streak-card { padding: .6rem .65rem; }
}

@media (max-width: 380px) {
    .day-page .day { padding-left: .75rem; padding-right: .75rem; }
    .option { font-size: .86rem; padding: .7rem .75rem; gap: .55rem; }
}

/* Téléphone couché : la vignette et les marges rendent leur place aux réponses. */
@media (max-width: 940px) and (orientation: landscape) and (max-height: 500px) {
    .day-page .day { padding-top: .9rem; gap: .85rem; }
    .day-hero { padding: 0 0 .75rem; }
    .day-hero .orb { width: 40px; height: 40px; margin-bottom: .5rem; }
    .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

