/* Module « Oiseau totem » : s'appuie sur les variables du thème du site. */
.totem-page { --totem-card: var(--surface-hover, #fffbf1); --totem-line: color-mix(in srgb, var(--navy, #090979) 18%, transparent); --totem-text: inherit; --totem-muted: color-mix(in srgb, currentColor 65%, transparent); --totem-warn-bg: #fff0c9; --totem-warn-text: #5c4100; --totem-track: color-mix(in srgb, currentColor 14%, transparent); --accent: var(--gold, #ffa600); --accent-strong: color-mix(in srgb, var(--accent) 62%, #000); --accent-bar: var(--accent); }
:root[data-theme="dark"] .totem-page { --totem-card: var(--t-surface, #1a1a4a); --totem-line: var(--t-border, #3d3da8); --totem-warn-bg: #3a2f10; --totem-warn-text: #f3d98b; --accent-strong: color-mix(in srgb, var(--accent) 55%, #000); --accent-bar: color-mix(in srgb, var(--accent) 70%, #fff); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .totem-page { --totem-card: var(--t-surface, #1a1a4a); --totem-line: var(--t-border, #3d3da8); --totem-warn-bg: #3a2f10; --totem-warn-text: #f3d98b; --accent-strong: color-mix(in srgb, var(--accent) 55%, #000); --accent-bar: color-mix(in srgb, var(--accent) 70%, #fff); }
}
.totem-wrap { width: 100%; max-width: 680px; margin: clamp(2rem, 6vh, 4rem) auto 0; padding: 0 16px 32px; box-sizing: border-box; }
.totem-card { background: var(--totem-card); border: 1px solid var(--totem-line); border-radius: var(--radius, 8px); padding: 22px; margin: 0 0 16px; box-shadow: var(--shadow, none); box-sizing: border-box; }
.totem-center { text-align: center; }
.totem-card h1, .totem-card h2 { margin-top: 0; }
.totem-card p { margin: 0 0 12px; }
.totem-muted { color: var(--totem-muted); }
.totem-notice { background: var(--totem-warn-bg); color: var(--totem-warn-text); padding: 10px 14px; border-radius: var(--radius-sm, 5px); }
.totem-field { display: block; text-align: left; margin: 16px 0; }
.totem-field input { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--t-input-border, var(--totem-line)); border-radius: var(--radius-sm, 5px); font: inherit; }
:root[data-theme="dark"] .totem-field input { background: var(--t-input-bg, #23236a); color: var(--t-text, #f3e9d2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .totem-field input { background: var(--t-input-bg, #23236a); color: var(--t-text, #f3e9d2); } }
.totem-ghost { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--totem-muted); cursor: pointer; text-decoration: underline; }
.totem-page [hidden] { display: none !important; }
.totem-links { text-align: center; font-size: .95em; }

.totem-progress { height: 6px; border-radius: 3px; background: var(--totem-track); overflow: hidden; margin-bottom: 10px; }
.totem-progress i { display: block; height: 100%; width: 0; background: var(--gold, #ffa600); transition: width .25s; }
#totem-question, #totem-bonusq { outline: none; }
.totem-answers { display: grid; gap: 10px; margin: 16px 0; }
.totem-answer { text-align: left; padding: 14px 16px; border: 1px solid var(--totem-line); border-radius: var(--radius, 8px); background: transparent; color: inherit; font: inherit; font-size: var(--fs-body); cursor: pointer; min-height: 48px; }
.totem-answer:hover, .totem-answer:focus-visible { border-color: var(--gold, #ffa600); background: color-mix(in srgb, var(--gold, #ffa600) 12%, transparent); outline: none; }
.totem-answer.totem-on { border-color: var(--gold, #ffa600); box-shadow: inset 0 0 0 1px var(--gold, #ffa600); }

.totem-result .totem-hero { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius, 8px); margin: 8px 0 16px; }
.totem-ph { display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 25%, var(--totem-card)); text-align: center; font-weight: 600; padding: 12px; border-radius: var(--radius, 8px); }
.totem-tag { display: inline-block; vertical-align: middle; font-size: .6em; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--accent-strong); color: #fff; text-shadow: none; }
.totem-latin { font-style: italic; color: var(--totem-muted); margin-top: -6px; }
.totem-why { padding: 10px 14px; border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-radius: 0 var(--radius-sm, 5px) var(--radius-sm, 5px) 0; }
.totem-row { display: flex; gap: 14px; align-items: center; }
.totem-row .totem-thumb { flex: 0 0 96px; width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius, 8px); font-size: .7em; }
.totem-row p { margin: 0 0 6px; }

.totem-gauges { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.totem-gauges li { display: grid; grid-template-columns: 110px 1fr 48px; gap: 10px; align-items: center; }
.totem-bar { display: block; height: 10px; border-radius: 5px; background: var(--totem-track); overflow: hidden; }
.totem-bar i { display: block; height: 100%; background: var(--accent-bar); border-radius: 5px; }
.totem-gauges em { font-style: normal; text-align: right; color: var(--totem-muted); font-variant-numeric: tabular-nums; }
.totem-gauges.totem-stats li { grid-template-columns: 150px 1fr 64px; }

.totem-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; margin: 0 0 12px; }
.totem-credits { color: var(--totem-muted); font-size: .78em; text-align: center; margin: 0; }
.totem-badge { text-align: center; }
.totem-badge img { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto 16px; border-radius: var(--radius, 8px); border: 1px solid var(--totem-line); }

@media (max-width: 480px) {
  .totem-gauges li, .totem-gauges.totem-stats li { grid-template-columns: 1fr 48px; }
  .totem-gauges li > span { grid-column: 1 / -1; }
  .totem-gauges li > .totem-bar { grid-column: 1; }
  .totem-row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) { .totem-progress i { transition: none; } }

/* Neutralise les règles globales du site (titres centrés, paragraphes centrés, troncatures). */
.totem-card h1, .totem-card h2 { text-align: left; white-space: normal; overflow: visible; text-overflow: clip; margin: 0 0 .5em; }
.totem-card p { text-align: left; padding: 0; }
.totem-center h1, .totem-center h2, .totem-center p, .totem-badge h2, .totem-badge p { text-align: center; }
.totem-card .totem-latin, .totem-card .totem-why { text-align: left; }
.totem-links a, .totem-credits a { background: none; }
.totem-card .totem-why { padding: 12px 16px 12px 20px; }

/* Compte Atlas */
.totem-account { margin: 0 0 16px; }
.totem-account-on { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: .95em; }
.totem-account-on span { font-size: inherit; }
.totem-account summary { cursor: pointer; font-weight: 700; font-size: var(--fs-body); }
.totem-account[open] summary { margin-bottom: 12px; }
.totem-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.totem-tab { border: 1px solid var(--totem-line); background: transparent; color: inherit; font: inherit; font-size: .95em; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.totem-tab.totem-on { background: var(--gold, #ffa600); border-color: var(--gold, #ffa600); color: #090979; font-weight: 700; }
.totem-aform .button { margin: 6px 0 0; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.totem-aform .button:disabled { opacity: .6; cursor: wait; }
.totem-hint { font-size: .85em; margin: -6px 0 10px; }
.totem-check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; text-align: left; }
.totem-check input { margin-top: 5px; }
.totem-check span { font-size: .92em; }
.totem-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.totem-notice.totem-ok { background: #dff3df; color: #1b4d1b; }
:root[data-theme="dark"] .totem-notice.totem-ok { background: #17341f; color: #b8e6b8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .totem-notice.totem-ok { background: #17341f; color: #b8e6b8; } }
:root[data-theme="dark"] .totem-tab.totem-on { color: #090979; }
.totem-aform input[type=password], .totem-aform input[type=email], .totem-aform input[type=text] { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--t-input-border, var(--totem-line)); border-radius: var(--radius-sm, 5px); font: inherit; }
:root[data-theme="dark"] .totem-aform input { background: var(--t-input-bg, #23236a); color: var(--t-text, #f3e9d2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .totem-aform input { background: var(--t-input-bg, #23236a); color: var(--t-text, #f3e9d2); } }
.totem-aform input[type=checkbox] { width: auto; }

/* Twitch */
.totem-twitch code { background: color-mix(in srgb, currentColor 12%, transparent); padding: 1px 6px; border-radius: 4px; font-size: .95em; }

/* Boutons-liens : le site colore les liens visités dans les paragraphes (p a:visited), ce qui rend le texte des boutons peu lisible. */
.totem-page a.button:visited { color: #fff; }
.totem-page a.button:visited:hover, .totem-page a.button:visited:focus-visible { color: var(--navy, #090979); }
.totem-actions button.button { border: 0; cursor: pointer; font: inherit; font-weight: 700; }
