/* ==========================================================================
   VIVIA — brand.css · identité visuelle : croix dorée, V bleu / vert,
   palette multicolore, signature « Vivre • Grandir • Servir », icônes SVG, sélecteur de langue.
   Chargé après style.css et landing.css.
   ========================================================================== */
:root {
  --b-blue: #1f5fe0; --b-teal: #12a5a0; --b-red: #ea4335; --b-yellow: #f5a31a; --b-green: #34a853; --b-gold: #e5a20f;
  --b-bar: linear-gradient(90deg, var(--b-blue) 0 25%, var(--b-red) 0 50%, var(--b-yellow) 0 75%, var(--b-green) 0);
}

/* ---------- Icônes SVG (héritent de la couleur du texte) ---------- */
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.ic-fill { fill: currentColor; stroke-width: 1; }
.ic-wrap { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.ic-wrap .ic { vertical-align: 0; }
.tools button .ic, .speed button .ic { width: 1.3em; height: 1.3em; }
.ld-icon .ic { width: 24px; height: 24px; }
.ld-platform .s .ic { width: 30px; height: 30px; }
.clock #sky .ic { width: 28px; height: 28px; color: var(--b-yellow); }

/* ---------- Marque : logo officiel (design/Identité visuelle de VIVIA.png) ---------- */
.vv-logo { display: block; height: auto; max-width: 100%; }
.vv-h1 { display: block; margin: 0; line-height: 0; }
.brand .vv-logo { width: 96px; }
.brand { gap: 12px; }
.brand .vv-sub { margin: 6px 0 0; }

/* ---------- Signature : Vivre • Grandir • Servir ---------- */
.vv-tag { display: inline-flex; align-items: center; gap: .7em; font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); font-style: normal; }
.vv-tag > i { width: .4em; height: .4em; border-radius: 50%; background: var(--muted); flex: none; }
.vv-tag-lg { font-size: .8rem; margin: 2px 0 16px; color: var(--ink); }
.vv-tag-row { margin: 0; }
.brand p, .bigbrand p { font-style: normal; }
.ld-foot-brand { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ld-foot-brand strong { color: var(--ink); letter-spacing: .12em; }

/* ---------- Page d'accueil ---------- */
.ld-brand .vv-logo { width: 74px; }
.ld-brand { gap: 10px; }
.ld-nav-right { gap: 18px; }
#landing nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--b-bar); }
.ld-churches-p { color: var(--muted); line-height: 1.7; margin: 0; }
.ld-kicker-gold { color: #e5c779 !important; }
.ld-icon { color: var(--b-blue); }
.ld-feature:nth-child(4n+2) .ld-icon { color: var(--b-red); }
.ld-feature:nth-child(4n+3) .ld-icon { color: var(--b-green); }
.ld-feature:nth-child(4n+4) .ld-icon { color: var(--b-yellow); }
.ld-platform .s { color: var(--b-blue); }
.ld-platform:nth-child(2) .s { color: var(--b-green); }
.ld-platform:nth-child(3) .s { color: var(--b-red); }
.ld-card strong .ic { color: var(--b-gold); }

/* ---------- Écran de création ---------- */
.bigbrand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bigbrand .vv-logo { width: 240px; }
.bigbrand .vv-sub { flex-basis: 100%; margin: 0; }
.bigbrand .vv-tag { font-size: 12px; }
@media (max-width: 800px) { .bigbrand .vv-logo { width: 150px; } }

/* ---------- Sélecteur de langue ---------- */
.lang { display: inline-flex; border: 1px solid var(--line, #ddd2b0); border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .6); }
.lang button {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 6px 11px; border: 0; background: transparent;
  color: var(--muted, #6d7a62); cursor: pointer; min-width: 38px;
}
.lang button:hover { color: var(--b-blue); }
.lang button.on, .lang button[aria-pressed="true"] { background: var(--b-blue); color: #fff; }
.lang button:focus-visible { outline: 3px solid var(--b-gold); outline-offset: -3px; }
.lang-cr { justify-self: end; }
.tools .lang { margin-left: 4px; }
#landing .lang { border-color: var(--line); background: transparent; }
#landing .lang button { color: var(--muted); }
#landing .lang button.on, #landing .lang button[aria-pressed="true"] { background: var(--b-blue); color: #fff; }

@media (prefers-reduced-motion: reduce) { #landing, #landing * { scroll-behavior: auto !important; transition: none !important; } }

.stats li > span:not(.ic-wrap) { margin-right: auto; }
.stats li > .ic-wrap { margin-right: 6px; }

/* ---------- Création rapide ---------- */
.genders { display: flex; gap: 8px; }
.genders .opt { flex: 1; }
details.custom { border: 1px solid var(--line, #ddd2b0); border-radius: 12px; background: rgba(255, 255, 255, .5); }
details.custom summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--green); }
details.custom summary:focus-visible { outline: 3px solid var(--b-gold); outline-offset: 2px; border-radius: 12px; }
.custom-in { display: grid; gap: 14px; padding: 4px 14px 14px; }
.cr-err { margin: 0; min-height: 1.3em; color: #b3261e; font-weight: 600; font-size: 14px; }
.locker input[aria-invalid="true"] { border-color: #b3261e; outline-color: #b3261e; }

/* ---------- Liens institutionnels (accueil et panneau du jeu) ---------- */
.ld-foot-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 12px; }
.ld-foot-nav a, .side-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.ld-foot-nav a:hover, .side-links a:hover { color: var(--b-blue); }
.ld-foot-nav a:focus-visible, .side-links a:focus-visible { outline: 3px solid var(--b-gold); outline-offset: 2px; border-radius: 4px; }
.side-links { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; margin: 0; }

/* ---------- Formulaire de compte ---------- */
.acc-tabs { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line, #ddd2b0); border-radius: 999px; padding: 3px; }
.acc-tab { font: inherit; font-weight: 700; font-size: 14px; border: 0; background: transparent; color: var(--muted, #6d7a62); padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.acc-tab.on { background: var(--b-blue); color: #fff; }
.acc-tab:focus-visible, .acc-google:focus-visible, #accEye:focus-visible { outline: 3px solid var(--b-gold); outline-offset: 2px; }
.acc-google { display: flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line, #ddd2b0); background: #fff; color: var(--ink, #2c3a2a); cursor: pointer; }
.acc-google:hover:not(:disabled) { border-color: var(--b-blue); }
.acc-fb { margin-top: 8px; }
.acc-or { display: flex; align-items: center; gap: 10px; margin: 2px 0; font-size: 12px; color: var(--muted, #6d7a62); }
.acc-or::before, .acc-or::after { content: ''; flex: 1; height: 1px; background: var(--line, #ddd2b0); }
.acc-fld { display: grid; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink, #2c3a2a); }
.acc-fld input { font-size: 15px; font-weight: 400; min-height: 42px; }
.acc-fld input:focus-visible { outline: 3px solid var(--b-gold); outline-offset: 1px; }
.acc-fld input[aria-invalid="true"] { border-color: #b3261e; }
.acc-pass { position: relative; display: block; }
.acc-pass input { width: 100%; padding-right: 44px; }
#accEye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted, #6d7a62); cursor: pointer; border-radius: 8px; }
#accEye:hover { color: var(--b-blue); }
.acc-hint { font-weight: 400; color: var(--muted, #6d7a62); }
.acc-form button[disabled], .acc-google[disabled], .acc-tab[disabled] { opacity: .55; cursor: wait; }
.acc-msg.err { color: #b3261e; font-weight: 600; }

/* ---------- Compte : présentation soignée ---------- */
.account { padding: 16px 16px 14px; gap: 0; background: linear-gradient(180deg, #fffdf4, var(--cream, #f7f1dc)); border-radius: 18px; box-shadow: 0 4px 16px rgba(47, 107, 63, .08); }
#accOut, #accIn { display: grid; gap: 10px; }
.acc-title { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.acc-title [data-ic], .acc-title svg { width: 20px; height: 20px; color: var(--b-blue, #2563eb); flex: none; }
.acc-title small { margin-left: auto; font-size: 11.5px; background: #fff; border: 1px solid var(--line, #ddd2b0); border-radius: 999px; padding: 2px 9px; }
.acc-sub { line-height: 1.45; }
.acc-tabs { width: 100%; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05); }
.acc-tab { transition: background .15s, color .15s; }
.acc-tab:not(.on):hover { color: var(--b-blue, #2563eb); background: rgba(37, 99, 235, .07); }
.acc-google { width: 100%; min-height: 44px; transition: border-color .15s, box-shadow .15s, transform .1s; }
.acc-google:hover:not(:disabled) { box-shadow: 0 3px 10px rgba(0, 0, 0, .1); }
.acc-google:active:not(:disabled) { transform: translateY(1px); }
.acc-google svg { width: 18px; height: 18px; flex: none; }
.acc-form { gap: 12px; margin-top: 0; }
.acc-form input { border-radius: 12px; border: 1px solid var(--line, #ddd2b0); transition: border-color .15s, box-shadow .15s; }
.acc-form input:focus { border-color: var(--green-2, #5f9a5a); box-shadow: 0 0 0 3px rgba(95, 154, 90, .18); outline: none; }
.acc-form .primary { width: 100%; min-height: 46px; border-radius: 999px; font-size: 15px; }
.acc-form .linkbtn { justify-self: center; font-size: 13px; color: var(--muted, #6d7a62); }
.acc-form .linkbtn:hover { color: var(--green, #2f6b3f); }
.acc-msg:empty { display: none; }
.acc-msg:not(:empty) { margin-top: 4px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.4; background: #e8f3e1; color: var(--green, #2f6b3f); border: 1px solid #c4dfb8; }
.acc-msg.err:not(:empty) { background: #fdecea; color: #9b2c22; border-color: #f2c4be; }
.acc-msg.err:not(:empty)::before { content: '⚠ '; }
#accLogout { width: 100%; }

/* ==========================================================================
   Téléphone en mode paysage (écran bas : ≤ 520 px de haut)
   Barre du haut sur une seule ligne fine, commandes tactiles plus petites,
   création du personnage en deux colonnes, accueil et « Premiers pas » compacts.
   ========================================================================== */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { top: 6px; left: 6px; right: 6px; padding: 4px 8px; gap: 6px; flex-wrap: nowrap; border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
  .topbar::-webkit-scrollbar { display: none; }
  .topbar > * { flex: none; }
  .brand, .place, .netchip, .clock small { display: none !important; }
  .clock strong { font-size: 18px; }
  .speed button { padding: 3px 6px; } .speed { gap: 3px; }
  .clock #sky { font-size: 20px; } .clock { gap: 6px; }
  .topbar .lang button { padding: 3px 8px; font-size: 11px; }
  .money { padding: 4px 10px; font-size: 14px; }
  .tools { gap: 4px; }
  .tools button { width: 30px; height: 28px; }
  .side { top: 52px; width: 230px; max-height: calc(100% - 60px); }
  .journal { bottom: 8px; left: 8px; width: min(300px, 40vw); }
  .hint { display: none; }
  .nav-arrow { bottom: 10px; } .toast { top: 52px; }
  /* commandes tactiles */
  .joy { width: 100px; height: 100px; left: 14px; bottom: 12px; }
  .joy i { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .actbtn { width: 62px; height: 62px; right: 18px; bottom: 16px; font-size: 22px; }
  .actbtn2 { width: 48px; height: 48px; font-size: 19px; }
  .jumpbtn { right: 90px; bottom: 14px; } .dancebtn { right: 26px; bottom: 90px; }
  /* « Premiers pas » : à droite sous la barre, replié par défaut, défilable */
  .ob-tasks { top: 52px !important; bottom: auto !important; left: auto; right: 8px; width: min(240px, 42vw); max-height: calc(100vh - 140px); overflow-y: auto; }
  .ob-t-head { padding: 6px 10px; }
  .ob-t-list li { padding: 4px 2px; }
  /* fenêtres du guide */
  .ob-card { padding: 12px 14px 10px; }
  .ob-card:not(.center) { left: auto; }
  .ob-text { font-size: 13px; margin-bottom: 6px; }
  .ob-title { font-size: 17px; }
  .ob-dots { margin: 2px 0 8px; }
  .ob-welcome { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 16px); }
  .ob-hero { padding: 12px 14px 8px; }
  .ob-logo { width: 110px; }
  .ob-pillars { display: none; }
  .ob-welcome > .ob-text { font-size: 13px; }
  .ob-verse { display: none; }
  /* création du personnage : scène à gauche, formulaire à droite */
  .overlay.creator { grid-template-columns: 1fr minmax(300px, 52%); grid-template-rows: none; }
  .locker { border-left: 3px solid var(--green-2); border-top: 0; }
  .locker-in { padding: 14px 16px 18px; gap: 12px; }
  .bigbrand { top: 8px; left: 12px; } .bigbrand .vv-logo { width: 84px; }
  .nameplate { bottom: 14px; font-size: 16px; padding: 4px 16px; }
  .stage-hint { display: none; }
  /* fenêtres */
  .modal { max-height: calc(100vh - 12px); }
  .modal-back { padding: 6px; }
  .sdock { bottom: 6px; } .spanel { max-height: calc(100vh - 70px); }
}

/* ==========================================================================
   Carte de VIVIA City (citymap.js)
   ========================================================================== */
.modal.cm { width: min(1040px, 100%); }
.cm .modal-body { padding: 12px 16px 16px; display: grid; gap: 10px; }
.cm h3.cm-h { margin: 6px 0 0; font-size: 14px; }
.cm-top { display: grid; gap: 8px; }
.cm-search { width: 100%; font: inherit; font-size: 15px; padding: 10px 14px 10px 14px; border-radius: 999px; border: 1px solid var(--line, #ddd2b0); background: #fff; min-height: 42px; }
.cm-search:focus { outline: none; border-color: var(--green-2, #5f9a5a); box-shadow: 0 0 0 3px rgba(95, 154, 90, .2); }
.cm-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.cm-chips::-webkit-scrollbar, .cm-ribbon::-webkit-scrollbar { display: none; }
.cm-chip { flex: none; font: inherit; font-size: 13px; font-weight: 600; border: 1px solid var(--line, #ddd2b0); background: var(--cream, #f7f1dc); color: var(--ink, #2c3a2a); border-radius: 999px; padding: 7px 13px; cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; gap: 4px; }
.cm-chip:hover { border-color: var(--green-2, #5f9a5a); }
.cm-chip.on { background: var(--green, #2f6b3f); color: #fff; border-color: var(--green, #2f6b3f); }
.cm-ribbon { display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; }
.cm-d { flex: 1 0 118px; display: grid; justify-items: center; gap: 2px; font: inherit; font-size: 12.5px; background: #fff; color: var(--ink, #2c3a2a); border: 2px solid var(--line, #ddd2b0); border-radius: 14px; padding: 7px 6px 6px; cursor: pointer; min-height: 62px; transition: border-color .15s, background .15s, transform .1s; }
.cm-d:hover { border-color: var(--green-2, #5f9a5a); }
.cm-d.on { background: #eef5dd; border-color: var(--green, #2f6b3f); box-shadow: 0 2px 0 var(--green-3, #a8cf8f); }
.cm-d.empty { opacity: .45; }
.cm-d-ic { font-size: 20px; line-height: 1; } .cm-d b { font-size: 12.5px; text-align: center; line-height: 1.15; }
.cm-d-tags { display: flex; gap: 3px; min-height: 16px; align-items: center; }
.cm-tag { font-style: normal; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; background: var(--cream-2, #efe6c8); color: var(--muted, #6d7a62); }
.cm-tag.you { background: #fbe7b5; color: #7a5410; } .cm-tag.pin { background: #fbd5d7; } .cm-tag.home { background: #dff0d2; } .cm-tag.n { background: var(--green, #2f6b3f); color: #fff; }
.cm-road { flex: 0 0 12px; align-self: center; height: 6px; background: repeating-linear-gradient(90deg, #b3b0a4 0 6px, transparent 6px 9px); border-radius: 3px; }
.cm-stage { position: relative; border: 2px solid var(--green-2, #5f9a5a); border-radius: 16px; overflow: hidden; background: #e6efd3; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.cm-scroll { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: thin; }
.cm-scroll.grab, .cm-scroll.grab canvas { cursor: grabbing !important; }
.cm-canvas { display: block; cursor: grab; max-width: none; user-select: none; -webkit-user-select: none; }
.cm-tip { position: absolute; z-index: 3; pointer-events: none; background: rgba(35, 56, 36, .94); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.cm-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted, #6d7a62); align-items: center; }
.cm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; }
.cm-lg.you .cm-dot { background: #e0a020; } .cm-lg.others .cm-dot { background: #3a78d8; } .cm-lg.dest .cm-dot { background: #e0525a; } .cm-lg.okk .cm-dot { background: #3fb04a; } .cm-lg.ko .cm-dot { background: #d0453a; }
.cm-drag { margin-left: auto; font-style: italic; }
.cm-card { background: #fff; border: 2px solid var(--green-3, #a8cf8f); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; }
.cm-card.empty { background: var(--cream, #f7f1dc); border: 1px dashed var(--line, #ddd2b0); }
.cm-hint { margin: 0; color: var(--muted, #6d7a62); font-size: 14px; }
.cm-card-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cm-card-ic { width: 46px; height: 46px; border-radius: 14px; background: #eef5dd; display: grid; place-items: center; font-size: 24px; flex: none; }
.cm-card-t { flex: 1; min-width: 140px; } .cm-card-t b { display: block; font-size: 16px; font-family: var(--serif, Georgia, serif); color: var(--green, #2f6b3f); } .cm-card-t small { color: var(--muted, #6d7a62); font-size: 12.5px; }
.cm-hours { margin: 0; font-size: 13px; color: var(--muted, #6d7a62); }
.cm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cm-actions button { border-radius: 999px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; min-height: 42px; }
.cm-actions .primary { border: 0; background: var(--green, #2f6b3f); color: #fff; box-shadow: 0 3px 0 #214c2d; } .cm-actions .ghost { border: 1.5px solid var(--green-2, #5f9a5a); background: transparent; color: var(--green, #2f6b3f); }
.cm-dest { font-size: 13px; font-weight: 600; color: #9b2c22; }
.cm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.cm-item { display: flex; align-items: center; gap: 10px; text-align: left; font: inherit; background: var(--cream, #f7f1dc); border: 1px solid var(--line, #ddd2b0); border-radius: 14px; padding: 8px 12px; cursor: pointer; color: var(--ink, #2c3a2a); min-height: 52px; }
.cm-item:hover { border-color: var(--green-2, #5f9a5a); background: #eef5dd; } .cm-item.on { border-color: var(--gold, #f3c04b); box-shadow: inset 0 0 0 1px var(--gold, #f3c04b); background: #fffbe9; }
.cm-item-ic { font-size: 22px; flex: none; width: 28px; text-align: center; } .cm-item-t { flex: 1; min-width: 0; } .cm-item-t b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cm-item-t small { color: var(--muted, #6d7a62); font-size: 12px; }
.cm button:focus-visible, .cm input:focus-visible { outline: 3px solid var(--b-gold, #f3c04b); outline-offset: 2px; }
@media (max-width: 700px) { .cm .modal-body { padding: 10px 12px 14px; } .cm-drag { display: none; } .cm-d { flex-basis: 104px; } .cm-list { grid-template-columns: 1fr; } }
@media (orientation: landscape) and (max-height: 520px) { .cm-d { min-height: 48px; padding: 4px; } .cm-d-ic { display: none; } }

/* ---------- Foi : ligne du panneau + fenêtre « Ma foi » ---------- */
.stats li.faith-row { display: block; }
.faith-btn { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; width: 100%; font: inherit; font-size: 14px; color: inherit; background: none; border: 0; padding: 2px 0 0; cursor: pointer; text-align: left; border-radius: 8px; }
.faith-btn b { font-weight: 700; color: var(--green, #2f6b3f); }
.faith-btn:hover { background: rgba(95, 154, 90, .1); }
.faith-btn:focus-visible { outline: 3px solid var(--b-gold, #f3c04b); outline-offset: 2px; }
.faith-bar, .fm-bar { display: block; grid-column: 1 / -1; height: 7px; background: var(--cream-2, #efe6c8); border-radius: 5px; overflow: hidden; position: relative; }
.faith-bar i, .fm-bar > i { display: block; height: 100%; border-radius: 5px; background: #5f9a5a; transition: width .5s ease, background .3s; }
[data-lv="fervent"] { background: #2f9a4a !important; } [data-lv="believer"] { background: #5f9a5a !important; } [data-lv="lukewarm"] { background: #d9b13f !important; } [data-lv="carnal"] { background: #d9803f !important; } [data-lv="unbelieving"] { background: #a8504a !important; }
.fm-bar { height: 14px; border-radius: 8px; overflow: visible; background: #e8e2cc; } .fm-bar > i { border-radius: 8px; }
.fm-bar u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: rgba(0, 0, 0, .25); }
.fm-lv { display: grid; gap: 2px; margin-bottom: 10px; } .fm-lv b { font-family: var(--serif, Georgia, serif); font-size: 26px; color: var(--green, #2f6b3f); } .fm-lv small { color: var(--muted, #6d7a62); font-size: 14px; line-height: 1.45; }
.fm-scale { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted, #6d7a62); margin: 6px 0 4px; gap: 4px; } .fm-scale .on { color: var(--green, #2f6b3f); font-weight: 800; }
@media (max-width: 700px) { .fm-scale { font-size: 10px; } }

/* ---------- Jeux de société (Lot 3) ---------- */
.modal.mg { width: min(640px, 100%); }
.mg .modal-body { display: grid; gap: 10px; padding: 12px 16px 16px; }
.mg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.mg-card { display: grid; gap: 8px; align-content: start; padding: 12px; border: 2px solid #e2d3b8; border-radius: 14px; background: #fffaf0; }
.mg-card.soon { opacity: .6; }
.mg-card b { font-size: 17px; } .mg-card small { color: #6b5a40; }
.mg-lv { display: flex; gap: 6px; flex-wrap: wrap; }
.mg-lvb { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1.5px solid #c9b48a; background: #fff; cursor: pointer; }
.mg-lvb.on { background: #8a5a2b; color: #fff; border-color: #8a5a2b; }
.mg-soon { font-size: 12px; font-weight: 700; color: #8a5a2b; }
.aw-score { display: flex; justify-content: space-between; font-size: 15px; } .aw-score b { font-size: 20px; }
.aw-status { min-height: 22px; text-align: center; font-size: 14px; color: #5a4a30; }
.aw-board { background: linear-gradient(#a9743c, #8a5a2b); border-radius: 18px; padding: 12px; display: grid; gap: 10px; box-shadow: inset 0 3px 8px rgba(0,0,0,.3); }
.aw-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.aw-pit { position: relative; aspect-ratio: 1 / 1.05; min-height: 0; border-radius: 50%; border: 0; background: radial-gradient(circle at 50% 35%, #5a3818, #3a230d); color: #fff4d8; display: grid; place-items: center; align-content: center; font: inherit; padding: 4px; cursor: default; transition: transform .12s, box-shadow .15s; }
.aw-pit .aw-n { font-size: clamp(16px, 4.5vw, 24px); font-weight: 800; line-height: 1; }
.aw-pit .aw-dots { font-size: 9px; letter-spacing: 1px; line-height: 1; color: #f4cf7a; word-break: break-all; text-align: center; max-width: 90%; }
.aw-pit.empty { opacity: .65; }
.aw-pit.can { cursor: pointer; box-shadow: 0 0 0 3px rgba(255,200,80,.85); }
.aw-pit.can:hover { transform: translateY(-2px) scale(1.04); }
.aw-pit:disabled { color: #fff4d8; }
.aw-pit.hit { box-shadow: 0 0 0 3px #7fe08a; transform: scale(1.06); }
.aw-pit.from { box-shadow: 0 0 0 3px #fff; }
.aw-pit.took { box-shadow: 0 0 0 4px #ff7a5a; }
.aw-res { text-align: center; font-weight: 800; font-size: 17px; } .aw-res.win { color: #2f6b3f; } .aw-res.lose { color: #8a3a2a; }
.aw-rules summary { cursor: pointer; font-size: 13px; color: #6b5a40; }
@media (max-height: 460px) { .aw-board { padding: 8px; gap: 6px; } .aw-pit .aw-dots { display: none; } .aw-pit { aspect-ratio: 1.3 / 1; } }
.mg .m-actions { justify-content: center; }
.mg .m-actions button { min-height: 40px; }

/* ==========================================================================
   Barre du haut harmonisée : mêmes dimensions, bordures et états pour tous les contrôles
   ========================================================================== */
:root { --ctl: 36px; }
.tools button, .speed button, .preview-tools button {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-width: var(--ctl); height: var(--ctl); padding: 0 8px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--cream); color: var(--green); font-size: 16px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .05s;
}
.tools button:hover, .speed button:hover, .preview-tools button:hover { background: #eef5dd; border-color: var(--green-3); }
.tools button:active, .speed button:active, .preview-tools button:active { transform: translateY(1px); }
.tools button:focus-visible, .speed button:focus-visible, .preview-tools button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tools button[aria-expanded="true"], .tools button.on, .speed button.on, .speed button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.tools button[aria-expanded="true"]:hover, .speed button.on:hover { background: #265a34; }
.money, .place, .netchip { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; height: var(--ctl); padding: 0 14px; }
@media (max-width: 760px) { .money, .place, .netchip { padding: 0 10px; } }

/* Icône du jour : pastille ronde de la même hauteur que les boutons, couleur selon le moment */
.clock #sky {
  display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box;
  width: 36px; height: 36px; border-radius: 50%; color: #fff; background: #e0a526; border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line); transition: background .6s;
}
.clock #sky[data-phase="dusk"] { background: #d9733a; }
.clock #sky[data-phase="night"] { background: #34406b; }
.clock #sky .ic { width: 20px; height: 20px; color: inherit; }
.clock #sky .ic-fill, .clock #sky .ic { stroke-width: 2; }
.tools button[hidden], .speed button[hidden], .preview-tools button[hidden] { display: none; }
.btns button, .primary, .ghost { min-height: 40px; transition: background .15s, border-color .15s, transform .05s; }
.btns button:active, .primary:active, .ghost:active { transform: translateY(1px); }
.btns button:focus-visible, .primary:focus-visible, .ghost:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
