:root {
  /* Palette Arcane / client LoL */
  --bg-base: #050810; --bg-card-x: #0d1117; --bg-card-hover: #111827;
  --border-x: rgba(201, 155, 60, 0.2); --border-hover: rgba(201, 155, 60, 0.6);
  --accent-gold-x: #C89B3C; --accent-blue-x: #0BC4E2; --accent-glow: rgba(11, 196, 226, 0.15);
  --text-main: #E8D5A3; --text-secondary-x: #7A8A99; --text-muted: #3D4F5C;
  --danger: #C0392B; --success: #27AE60;
  /* Alias héritage (toute l'UI existante pointe dessus) */
  --bg-primary: var(--bg-base); --bg-secondary: #0a0f1a; --bg-card: var(--bg-card-x);
  --border: var(--border-x); --text-primary: var(--text-main); --text-secondary: var(--text-secondary-x);
  --accent-red: var(--danger); --accent-orange: #e67e22; --accent-yellow: #e8c468;
  --accent-blue: var(--accent-blue-x); --accent-purple: #8e7cf0; --accent-green: var(--success);
  --accent-gold: var(--accent-gold-x); --accent-teal: var(--accent-blue-x);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: radial-gradient(ellipse 80% 60% at 50% 40%, #0f1a2e 0%, #050810 70%); color: var(--text-main); font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; min-height: 100vh; font-size: 15px; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: .4px; }
h1, h2, h3 { font-weight: 700; }
button { cursor: pointer; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-primary); border-radius: 8px; padding: 10px 16px; font-size: 14px; transition: all .15s; font-family: inherit; }
button:hover:not(:disabled) { border-color: var(--accent-blue); transform: translateY(-1px); }
button:disabled { opacity: .35; cursor: not-allowed; }
select {
  background: #0d1117;
  border: 1px solid rgba(201, 155, 60, 0.3);
  color: #E8D5A3;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  appearance: none;
  cursor: pointer;
  margin-bottom: 14px;
}
#org-select:focus {
  outline: none;
  border-color: #C89B3C;
  box-shadow: 0 0 0 3px rgba(201, 155, 60, 0.15);
}
select:focus, input:focus { outline: none; border-color: var(--border-hover); }

/* START */
#start-screen { max-width: 900px; margin: 0 auto; padding: 7vh 20px 60px; text-align: center; display: flex; flex-direction: column; justify-content: center; min-height: 92vh; }
#start-screen h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #C89B3C;
  text-shadow: 0 0 40px rgba(200, 155, 60, 0.35), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
#start-screen .subtitle { color: #7A8A99; font-style: italic; letter-spacing: 0.05em; margin-top: 8px; margin-bottom: 34px; font-size: 16px; }
#org-name { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); padding: 12px 18px; border-radius: 8px; font-size: 18px; width: 320px; max-width: 90%; text-align: center; margin-bottom: 14px; display: none; }
.profile-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 16px 0 30px;
}
.profile-card {
  background: linear-gradient(135deg, #0d1117 0%, #111827 100%);
  border: 1px solid rgba(201, 155, 60, 0.15);
  border-radius: 8px;
  padding: 28px 24px;
  width: auto;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #C89B3C, transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.profile-card:hover {
  border-color: rgba(201, 155, 60, 0.5);
  box-shadow: 0 0 30px rgba(11, 196, 226, 0.08), 0 4px 20px rgba(0,0,0,0.5);
  transform: translateY(-2px);
}
.profile-card:hover::before {
  opacity: 1;
}
.profile-card.selected {
  border-color: #C89B3C;
  box-shadow: 0 0 20px rgba(201, 155, 60, 0.2);
}
.profile-card h3 { margin-bottom: 4px; font-size: 18px; }
.profile-card .pc-tagline { color: var(--accent-blue); font-size: 12px; margin-bottom: 12px; font-style: italic; }
.profile-card ul { list-style: none; font-size: 13px; color: var(--text-secondary); }
.profile-card li { margin-bottom: 5px; }
.profile-card .risk { color: var(--accent-orange); font-size: 12px; margin-top: 10px; font-style: italic; }
#start-btn {
  background: linear-gradient(135deg, #C89B3C, #a07c2e);
  color: #050810;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  padding: 16px 48px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(201, 155, 60, 0.3);
}
#start-btn:hover {
  box-shadow: 0 6px 30px rgba(201, 155, 60, 0.5);
  transform: translateY(-1px);
}
#resume-btn {
  background: transparent;
  color: #0BC4E2;
  border: 1px solid rgba(11, 196, 226, 0.5);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 40px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: 12px;
}
#resume-btn:hover {
  background: rgba(11, 196, 226, 0.08);
  border-color: #0BC4E2;
  box-shadow: 0 0 20px rgba(11, 196, 226, 0.2);
}
#start-warning { max-width: 620px; margin: 24px auto 0; font-size: 12px; color: var(--text-secondary); font-style: italic; border-top: 1px dashed var(--border); padding-top: 14px; line-height: 1.6; }

/* GAME */
#game-screen { display: none; max-width: 1300px; margin: 0 auto; padding: 16px; }
#header { background: #0a0f1a; border: 1px solid rgba(201, 155, 60, 0.15); border-radius: 8px; padding: 14px 20px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
#gv-budget { font-size: 13px; font-weight: 700; }
#gv-budget.budget-danger { color: #C0392B; animation: budgetPulse 2s ease-in-out infinite; }
@keyframes budgetPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
#header .org-title { font-size: 20px; font-weight: 700; cursor: pointer; user-select: none; }
#header .date-display { color: var(--accent-gold); font-weight: 600; font-size: 16px; }
.hdr-tools { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.hdr-tools button { font-size: 11px; padding: 4px 10px; }
#latepay-badge { display: none; background: rgba(229,62,62,.2); border: 1px solid var(--accent-red); color: var(--accent-red); border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 700; }
.gauges { display: flex; gap: 18px; flex-wrap: wrap; }
.gauge { min-width: 100px; }
.gauge .g-label { font-size: 11px; color: var(--text-secondary); display: flex; justify-content: space-between; margin-bottom: 3px; }
.gauge .g-bar { height: 8px; background: var(--bg-primary); border-radius: 4px; overflow: hidden; }
.gauge .g-fill { height: 100%; border-radius: 4px; transition: width .4s, background .4s; }
#columns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--bg-card-x); border: 1px solid var(--border-x); border-radius: 8px; padding: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.card h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin-bottom: 12px; font-weight: 600; }

#event-card { border-left: 4px solid var(--accent-red); }
#event-card.ev-positive { border-left-color: var(--accent-green); }
#event-card.ev-mixed { border-left-color: var(--accent-yellow); }
#event-card.ev-special { border-left-color: var(--accent-gold); }
#event-card.ev-ecosystem { border-left-color: var(--accent-teal); }
#event-card .ev-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--accent-red); }
#event-card.ev-positive .ev-title { color: var(--accent-green); }
#event-card.ev-mixed .ev-title { color: var(--accent-yellow); }
#event-card.ev-special .ev-title { color: var(--accent-gold); }
#event-card.ev-ecosystem .ev-title { color: var(--accent-teal); }
.ev-desc { font-size: 13px; line-height: 1.5; margin-bottom: 10px; }
.ev-flavor { font-size: 12px; color: var(--text-secondary); font-style: italic; margin-bottom: 12px; border-top: 1px dashed var(--border); padding-top: 8px; }
.ev-choice { display: block; width: 100%; text-align: left; margin-bottom: 8px; font-size: 13px; }
.ev-choice:hover { border-color: var(--accent-gold); }
.ev-risk { font-size: 11px; color: var(--accent-orange); display: block; margin-top: 3px; }
#event-card.no-event { border-left-color: var(--border); }
#event-preview { font-size: 12px; color: var(--accent-purple); border-top: 1px dashed var(--border); padding-top: 8px; margin-top: 8px; }

#ecosystem-card { border-left: 4px solid var(--accent-teal); background: #131722; display: none; }
#ecosystem-card .eco-headline { font-size: 14px; font-weight: 700; color: var(--accent-teal); margin-bottom: 6px; }
#ecosystem-card .eco-news { font-size: 12px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 6px; }
#ecosystem-card .eco-market { font-size: 12px; color: var(--accent-gold); border-top: 1px dashed var(--border); padding-top: 6px; }
#vote-card, #relation-event-card { border-left: 4px solid var(--accent-purple); display: none; }
#vote-card .ev-title, #relation-event-card .ev-title { color: var(--accent-purple); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
#ultras-event-card { border-left: 4px solid var(--accent-blue); display: none; }
#ultras-event-card .ev-title { color: var(--accent-blue); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
#conduct-card { border-left: 4px solid var(--accent-orange); display: none; }
#conduct-card .ev-title { color: var(--accent-orange); font-size: 15px; font-weight: 700; margin-bottom: 6px; }
#journal-card { display: none; max-height: 300px; overflow-y: auto; }
.journal-entry { font-size: 12px; line-height: 1.6; border-bottom: 1px dashed var(--border); padding: 6px 0; color: var(--text-secondary); }
.journal-entry .j-date { color: var(--accent-gold); font-weight: 600; }

.action-btn { display: block; width: 100%; text-align: left; margin-bottom: 8px; font-size: 13px; }
.action-btn .a-cost { color: var(--accent-orange); font-size: 11px; }
.action-btn .a-fx { color: var(--text-secondary); font-size: 11px; display: block; margin-top: 2px; }
.action-btn.pivot { border-color: var(--accent-teal); }
#actions-left { font-size: 13px; color: var(--accent-yellow); margin-bottom: 10px; }
#mercato-note { font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; }
#basket { margin-bottom: 10px; }
.basket-item { display: flex; justify-content: space-between; align-items: center; font-size: 12px; background: var(--bg-secondary); border: 1px solid var(--accent-green); border-radius: 6px; padding: 6px 10px; margin-bottom: 6px; }
.basket-item button { padding: 2px 8px; font-size: 11px; border-color: var(--accent-red); color: var(--accent-red); }
#next-month-btn { width: 100%; background: var(--accent-blue); color: #fff; font-weight: 700; font-size: 15px; padding: 14px; border: none; margin-top: 4px; }
#next-month-btn:hover:not(:disabled) { background: #3182ce; }
#regularize-btn { width: 100%; font-size: 12px; margin-top: 8px; border-color: var(--accent-red); color: var(--accent-red); display: none; }

.fin-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.fin-row.total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.pos { color: var(--accent-green); }
.neg { color: var(--accent-red); }
#slot-value-display { font-size: 22px; font-weight: 700; color: var(--accent-gold); }
#slot-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
#sell-slot-btn { width: 100%; background: var(--accent-gold); color: #000; font-weight: 800; font-size: 15px; padding: 14px; border: none; letter-spacing: 1px; margin-top: 10px; }
#sell-slot-btn:hover { background: #e8c44a; }
#buyout-btn { width: 100%; background: var(--accent-purple); color: #fff; font-weight: 700; font-size: 13px; padding: 12px; border: none; margin-top: 8px; display: none; }
#calendar-status { font-size: 12px; margin-top: 8px; padding: 6px 10px; border-radius: 6px; background: var(--bg-secondary); }
#pending-effects { font-size: 12px; color: var(--text-secondary); line-height: 1.7; }
#ultras-box { display: none; margin-top: 12px; }
#ultras-box .g-label { font-size: 11px; color: var(--text-secondary); display: flex; justify-content: space-between; margin-bottom: 3px; }
#ultras-box .g-bar { height: 10px; background: var(--bg-primary); border-radius: 5px; overflow: hidden; }
#ultras-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--accent-blue), var(--accent-red)); transition: width .4s; }
body.simple-mode #log-card, body.simple-mode #radar-card, body.simple-mode .fin-row:not(.total), body.simple-mode .a-fx { display: none; }
#radar-card { text-align: center; }
#radar-svg { max-width: 240px; margin: 0 auto; display: block; }
.radar-label { font-size: 10px; fill: var(--text-secondary); }
#footer { margin-top: 16px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; }
#match-result { font-size: 14px; margin-bottom: 8px; }
#match-result .mr-win { color: var(--accent-green); font-weight: 700; }
#match-result .mr-loss { color: var(--accent-red); font-weight: 700; }
#news-ticker { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; border-top: 1px dashed var(--border); padding-top: 8px; }
#ticker-text { display: inline-block; padding-left: 100%; animation: ticker 45s linear infinite; }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
#log-card { max-height: 220px; overflow-y: auto; }
#turn-log { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
#turn-log .log-entry { border-bottom: 1px dashed var(--border); padding: 4px 0; }
#turn-log .log-good { color: var(--accent-green); }
#turn-log .log-bad { color: var(--accent-red); }

/* ANNOUNCE */
#announce-overlay { display: none; position: fixed; inset: 0; background: rgba(5,5,10,.92); z-index: 90; align-items: center; justify-content: center; padding: 20px; }
#announce-box { background: var(--bg-card); border: 1px solid var(--accent-gold); border-radius: 14px; padding: 30px; max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto; }
#announce-box .an-date { font-size: 22px; font-weight: 700; color: var(--accent-gold); margin-bottom: 16px; text-align: center; }
#announce-box .an-section { border-top: 1px dashed var(--border); padding: 12px 0; font-size: 13px; line-height: 1.5; }
#announce-box .an-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-secondary); margin-bottom: 6px; }
#announce-box .an-event-title { font-weight: 700; margin-bottom: 4px; }
#announce-go { width: 100%; background: var(--accent-blue); color: #fff; font-weight: 700; font-size: 15px; padding: 14px; border: none; margin-top: 16px; }

/* TUTORIAL */
#tuto-overlay { display: none; position: fixed; inset: 0; background: rgba(5,5,10,.95); z-index: 110; align-items: center; justify-content: center; padding: 20px; }
#tuto-box { background: var(--bg-card); border: 1px solid var(--accent-gold); border-radius: 14px; padding: 36px; max-width: 520px; width: 100%; text-align: center; }
#tuto-step { font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; letter-spacing: 1px; }
#tuto-title { font-size: 24px; margin-bottom: 16px; color: var(--accent-gold); }
#tuto-text { font-size: 14px; line-height: 1.8; color: var(--text-primary); margin-bottom: 24px; white-space: pre-line; }
#tuto-next { background: var(--accent-gold); color: #000; font-weight: 700; border: none; padding: 12px 28px; }
#tuto-skip { margin-left: 10px; font-size: 12px; }

/* ENDING */
#ending-screen { display: none; max-width: 700px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.ending-badge { display: inline-block; padding: 8px 24px; border-radius: 20px; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; }
.badge-red { background: rgba(229,62,62,.15); color: var(--accent-red); border: 1px solid var(--accent-red); }
.badge-orange { background: rgba(237,137,54,.15); color: var(--accent-orange); border: 1px solid var(--accent-orange); }
.badge-yellow { background: rgba(236,201,75,.15); color: var(--accent-yellow); border: 1px solid var(--accent-yellow); }
.badge-blue { background: rgba(66,153,225,.15); color: var(--accent-blue); border: 1px solid var(--accent-blue); }
.badge-gold { background: rgba(212,175,55,.2); color: var(--accent-gold); border: 1px solid var(--accent-gold); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 8px rgba(212,175,55,.4); } 50% { box-shadow: 0 0 30px rgba(212,175,55,.9); } }
#ending-screen h1 { font-size: 36px; margin-bottom: 16px; }
#ending-score { font-size: 24px; color: var(--accent-gold); margin-bottom: 24px; font-weight: 700; }
#ending-flavor { font-size: 15px; line-height: 1.7; color: var(--text-secondary); font-style: italic; max-width: 560px; margin: 0 auto 20px; }
#ending-badges { font-size: 14px; color: var(--accent-gold); margin-bottom: 24px; line-height: 1.8; }
#ending-stats { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; text-align: left; margin-bottom: 30px; font-size: 13px; }
#ending-stats .fin-row { padding: 5px 0; }
#new-game-btn { background: var(--accent-gold); color: #000; font-weight: 700; font-size: 16px; padding: 14px 32px; border: none; }

/* MODAL */
#modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; align-items: center; justify-content: center; padding: 20px; }
#modal-box { background: var(--bg-card); border: 1px solid var(--accent-gold); border-radius: 12px; padding: 28px; max-width: 480px; text-align: center; max-height: 85vh; overflow-y: auto; }
#modal-box h3 { margin-bottom: 12px; font-size: 18px; }
#modal-box p { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5; white-space: pre-line; text-align: left; }
#modal-box .modal-btns { display: flex; gap: 12px; justify-content: center; }
#modal-confirm { background: var(--accent-gold); color: #000; font-weight: 700; border: none; }




#credit-line { position: fixed; bottom: 8px; left: 12px; z-index: 60; font-size: 12px; color: var(--text-secondary); opacity: .85; }
#credit-line a { color: var(--text-secondary); }
@media (max-width: 768px) { #credit-line { font-size: 11px; bottom: 6px; } }

/* ALPHA BANNER */
#alpha-banner { position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  background: linear-gradient(90deg, #1a0a0a, #1a0f00);
  border-bottom: 1px solid rgba(201, 155, 60, 0.2);
  color: #E8D5A3; font-size: 12px; font-weight: 500; text-align: center; padding: 7px 36px 7px 12px; line-height: 1.4; }
#alpha-banner .ab-version { opacity: .8; font-weight: 400; margin-left: 8px; }
#alpha-banner .ab-close { position: absolute; right: 8px; top: 4px; background: none; border: none; color: #E8D5A3; font-size: 15px; padding: 2px 8px; cursor: pointer; }
body.has-banner #discord-screen, body.has-banner #start-screen { padding-top: 34px; }
/* PRIVACY */
#privacy-link { background: none; border: none; color: var(--text-secondary); font-size: 11px; text-decoration: underline; cursor: pointer; padding: 4px; }
#version-tag { font-size: 11px; color: var(--text-secondary); opacity: .7; }

/* TROPHY ROOM */
#trophy-screen { display: none; max-width: 1000px; margin: 0 auto; padding: 30px 20px; }
#trophy-screen h1 { font-size: 32px; color: var(--accent-gold); margin-bottom: 16px; text-align: center; }
#trophy-progress-bar { height: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 7px; overflow: hidden; max-width: 480px; margin: 0 auto 10px; }
#trophy-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange)); transition: width .5s; }
#trophy-counts { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
#trophy-stats { text-align: center; font-size: 12px; color: var(--text-secondary); margin-bottom: 24px; }
.trophy-section-title { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); margin: 26px 0 12px; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.trophy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.trophy-card { background: var(--bg-card); border: 2px solid var(--border); border-radius: 12px; padding: 16px 12px; min-height: 200px; text-align: center; display: flex; flex-direction: column; justify-content: space-between; transition: transform .15s; }
.trophy-card:hover { transform: translateY(-3px); }
.trophy-card .tc-icon { font-size: 34px; margin: 8px 0; }
.trophy-card .tc-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.trophy-card .tc-name-locked { height: 14px; margin: 0 auto 6px; width: 70%; background: repeating-linear-gradient(90deg, #2a2a3e 0 14px, transparent 14px 20px); border-radius: 3px; }
.trophy-card .tc-text { font-size: 11px; color: var(--text-secondary); font-style: italic; line-height: 1.5; min-height: 34px; }
.trophy-card .tc-diff { font-size: 11px; letter-spacing: 0.08em; margin-top: 8px; color: var(--accent-gold); }
.trophy-card .tc-date { font-size: 10px; color: var(--text-secondary); margin-top: 4px; }
.trophy-card.locked { opacity: .75; }
.trophy-card.unlocked.tier-red { border-color: var(--accent-red); }
.trophy-card.unlocked.tier-orange { border-color: var(--accent-orange); }
.trophy-card.unlocked.tier-yellow { border-color: var(--accent-yellow); }
.trophy-card.unlocked.tier-blue { border-color: var(--accent-blue); }
.trophy-card.unlocked.tier-gold { border-color: var(--accent-gold); box-shadow: 0 0 12px rgba(212,175,55,.4); }
.trophy-card.tier-egg { border-style: dashed; }
.trophy-card.unlocked.tier-egg { border-color: var(--accent-purple); }
.trophy-card.highlight-new { animation: newTrophy 1.2s ease 3; }
@keyframes newTrophy { 0%,100% { box-shadow: 0 0 0 rgba(212,175,55,0); } 50% { box-shadow: 0 0 24px rgba(212,175,55,.9); } }
#trophy-back { display: block; margin: 30px auto 0; background: var(--accent-gold); color: #000; font-weight: 700; border: none; padding: 12px 28px; }
#trophy-room-btn { position: fixed; bottom: 18px; right: 18px; font-size: 13px; z-index: 50; }
#trophy-notif { display: none; position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 130;
  background: var(--bg-card); border: 1px solid var(--accent-gold); border-radius: 12px; padding: 18px 26px;
  box-shadow: 0 0 30px rgba(212,175,55,.5); text-align: center; min-width: 280px; }
#trophy-notif .tn-title { font-size: 13px; color: var(--accent-gold); font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; }
#trophy-notif .tn-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
#trophy-notif .tn-teaser { font-size: 12px; color: var(--text-secondary); font-style: italic; margin-bottom: 6px; }
#trophy-notif .tn-diff { font-size: 11px; color: var(--accent-gold); letter-spacing: 0.08em; }
@media (max-width: 700px) { .trophy-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 900px) {
  #columns { grid-template-columns: 1fr; }
  #header { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  /* Cards profil : 1 par ligne, pleine largeur */
  .profile-cards { grid-template-columns: 1fr; gap: 12px; }
  .profile-card { width: 100%; max-width: none; }
  /* CTA en pile verticale */
  #start-btn, #resume-btn { display: block; width: 100%; max-width: 360px; margin: 0 auto 10px; }
  #resume-btn { margin-left: auto; }
  /* Header de jeu : jauges lisibles */
  .gauges { width: 100%; gap: 10px; }
  .gauge { flex: 1 1 40%; min-width: 130px; }
  #header .org-title { font-size: 17px; }
  #start-screen h1 { font-size: 34px; }
  #start-screen { padding: 24px 14px; }
  select, #org-name { width: 100%; }
  #alpha-banner { font-size: 11px; }
}

/* Écran Discord : même halo atmosphérique */
#discord-screen { background: radial-gradient(ellipse 80% 60% at 50% 40%, #0f1a2e 0%, #050810 70%) !important; }


/* ================================================================
   REDESIGN COCKPIT — pattern hexagonal + layouts dashboard
   ================================================================ */
/* Pattern hexagonal global (4%), sur tous les écrans */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='52' viewBox='0 0 60 52' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 17v18L30 52 0 35V17z' fill='none' stroke='%230BC4E2' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 60px 52px;
  background-repeat: repeat;
  opacity: 0.04;
}
#discord-screen, #start-screen, #game-screen, #ending-screen, #trophy-screen { position: relative; z-index: 1; }

/* ---------- LANDING ---------- */
#landing-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  color: #C89B3C;
  text-shadow: 0 0 40px rgba(200, 155, 60, 0.35), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-bottom: 6px;
}
#login-card {
  background: linear-gradient(135deg, #0d1117 0%, #111827 100%);
  border: 1px solid rgba(201, 155, 60, 0.25);
  border-radius: 8px;
  padding: 34px 36px;
  text-align: center;
  max-width: 380px;
  width: 92%;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

/* ---------- ÉCRAN SÉLECTION : 2 zones ---------- */
#start-screen { display: none; max-width: 1060px; margin: 0 auto; padding: 48px 20px 40px; min-height: 0; text-align: left; }
#select-topbar { text-align: center; margin-bottom: 28px; }
#select-topbar .subtitle { margin-bottom: 0; }
#select-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.select-panel {
  background: linear-gradient(135deg, #0d1117 0%, #111827 100%);
  border: 1px solid rgba(201, 155, 60, 0.15);
  border-radius: 8px;
  padding: 22px;
}
.sb-title { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #7A8A99; font-weight: 600; margin-bottom: 12px; border-bottom: 1px solid rgba(201,155,60,.12); padding-bottom: 7px; }
.sb-hint { font-size: 12px; color: #7A8A99; margin: 12px 0 8px; }
#select-left select { width: 100%; max-width: none; margin-bottom: 0; }
#select-left #org-name { width: 100%; max-width: none; text-align: left; margin-bottom: 0; }
#preset-info { background: rgba(201,155,60,.06); border: 1px solid rgba(201,155,60,.35); border-radius: 6px; padding: 12px 14px; margin-top: 12px; }
#preset-label { font-size: 13px; color: #C89B3C; font-weight: 600; margin-bottom: 4px; }
#preset-year-info { font-size: 12px; color: #7A8A99; }
#preset-skipped-info { font-size: 11px; color: #e67e22; margin-top: 5px; }
#leaderboard-box { margin-top: 18px; background: none; border: none; padding: 0; }
#leaderboard-list { font-size: 12px; line-height: 2; }

/* Cards profil compactes — le détail vit dans #profile-detail */
#select-right .profile-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 14px; }
#select-right .profile-card { padding: 14px 12px; text-align: center; }
#select-right .profile-card h3 { font-size: 14px; margin-bottom: 4px; }
#select-right .profile-card .pc-tagline { font-size: 11px; margin-bottom: 0; }
#select-right .profile-card .pc-detail { display: none; }
#profile-detail {
  min-height: 132px; background: rgba(11,196,226,.03);
  border: 1px dashed rgba(201,155,60,.2); border-radius: 6px; padding: 14px 16px;
  font-size: 12.5px; line-height: 1.65; color: #b9c4d0;
}
#profile-detail ul { list-style: none; margin-bottom: 8px; }
#profile-detail .risk { color: #e67e22; font-style: italic; font-size: 12px; }
#select-footer { display: flex; gap: 14px; justify-content: center; align-items: center; margin: 22px 0 14px; flex-wrap: wrap; }
#select-footer #trophy-room-btn { position: static; }
#start-warning { max-width: 720px; margin: 10px auto 0; text-align: center; border-top: none; padding-top: 0; }

/* ---------- ÉCRAN JEU : cockpit sidebar + main ---------- */
#header { padding: 10px 18px; margin-bottom: 14px; }
#header .hdr-left { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
#header .org-title { font-size: 16px; }
#header .date-display { font-size: 14px; }
#game-layout { display: grid; grid-template-columns: 232px 1fr; gap: 14px; align-items: start; }
#game-sidebar {
  position: sticky; top: 40px;
  display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 56px); overflow-y: auto;
}
.sb-section {
  background: linear-gradient(135deg, #0d1117 0%, #111827 100%);
  border: 1px solid rgba(201, 155, 60, 0.15);
  border-radius: 8px;
  padding: 14px;
}
#game-sidebar .gauges { display: flex; flex-direction: column; gap: 9px; }
#game-sidebar .gauge { min-width: 0; width: 100%; }
#game-sidebar .g-bar { height: 7px; }
#game-sidebar #finance-content { margin-top: 10px; }
#game-sidebar #finance-content .fin-row { font-size: 11.5px; padding: 2.5px 0; }
#game-sidebar #radar-svg { max-width: 100%; margin-top: 8px; }
#game-sidebar #slot-value-display { font-size: 19px; }
#game-sidebar #slot-meta { font-size: 11px; }
#game-sidebar #sell-slot-btn { font-size: 12.5px; padding: 11px; margin-top: 8px; }
#game-sidebar #buyout-btn { font-size: 11.5px; padding: 9px; }
#game-sidebar #rank-display { font-size: 18px; font-weight: 700; }
#game-sidebar #worlds-display { font-size: 11px; color: var(--accent-gold); margin-top: 4px; }
#game-sidebar #calendar-status { font-size: 11px; margin-top: 7px; padding: 5px 8px; }
#game-sidebar #pending-effects { font-size: 11px; line-height: 1.6; margin-top: 8px; border-top: 1px dashed rgba(201,155,60,.12); padding-top: 7px; }
#game-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#game-main #event-card { padding: 24px; }
#game-main #event-card .ev-title { font-size: 19px; }
#game-main #event-card .ev-desc { font-size: 14px; line-height: 1.6; }
/* Options d'événement en grille de cards cliquables */
#game-main #event-card .ev-choice, #game-main #vote-card .ev-choice,
#game-main #conduct-card .ev-choice, #game-main #ultras-event-card .ev-choice,
#game-main #relation-event-card .ev-choice {
  background: linear-gradient(135deg, #0d1117 0%, #131b2c 100%);
  border: 1px solid rgba(201,155,60,.25);
  border-radius: 6px; padding: 13px 15px;
}
#game-main .ev-choice:hover { border-color: #C89B3C; box-shadow: 0 0 16px rgba(11,196,226,.1); transform: translateY(-1px); }
#log-card { max-height: 260px; }
#turn-log .log-entry { padding: 5px 0; }

/* Mode simplifié : adapté au cockpit */
body.simple-mode #log-card, body.simple-mode #radar-svg,
body.simple-mode #game-sidebar #finance-content .fin-row:not(.total),
body.simple-mode .a-fx { display: none; }

/* ---------- MOBILE : sidebar horizontale scrollable ---------- */
@media (max-width: 768px) {
  #select-layout { grid-template-columns: 1fr; }
  #select-right .profile-cards { grid-template-columns: 1fr; }
  #start-screen h1, #landing-title { white-space: normal; }
  #game-layout { display: flex; flex-direction: column; }
  #game-sidebar {
    position: static; max-height: none;
    flex-direction: row; overflow-x: auto; overflow-y: hidden;
    gap: 10px; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .sb-section { min-width: 230px; flex: 0 0 auto; }
}


/* ================================================================
   UX IN-GAME — lisibilité, feedback, navigation
   ================================================================ */
/* Jauge en danger : ligne entière qui pulse, pas juste la couleur */
.gauge.danger .g-label { color: #C0392B; }
.gauge.danger { animation: budgetPulse 2s ease-in-out infinite; }

/* Toast de feedback après un choix d'événement */
#choice-toast {
  display: none; position: fixed; top: 52px; left: 50%; transform: translateX(-50%);
  z-index: 150; background: linear-gradient(135deg, #0d1117, #131b2c);
  border: 1px solid rgba(201, 155, 60, 0.5); border-radius: 8px;
  padding: 12px 22px; font-size: 13.5px; color: #E8D5A3;
  box-shadow: 0 8px 30px rgba(0,0,0,.6), 0 0 20px rgba(11,196,226,.08);
  max-width: 90vw; text-align: center; line-height: 1.6;
}
#choice-toast .ct-up { color: #27AE60; }
#choice-toast .ct-down { color: #C0392B; }
#choice-toast .ct-flat { color: #7A8A99; }

/* Bouton CLÔTURER toujours visible (fixe bas-droite) */
#next-month-btn {
  position: fixed; bottom: 16px; right: 16px; width: auto; z-index: 80;
  padding: 14px 26px; font-size: 14px; border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.55), 0 0 18px rgba(11,196,226,.12);
}
#game-screen { padding-bottom: 70px; }

/* Sidebar scrollable : fade + indication de contenu en dessous */
#game-sidebar.has-overflow::after {
  content: '↓ voir plus';
  position: sticky; bottom: 0; display: block; text-align: center;
  padding: 26px 0 4px; font-size: 11px; color: #7A8A99;
  background: linear-gradient(to bottom, rgba(5,8,16,0), #050810 75%);
  pointer-events: none;
}
@media (max-width: 768px) {
  #next-month-btn { left: 12px; right: 12px; width: auto; }
  #game-screen { padding-bottom: 84px; }
  #game-sidebar.has-overflow::after { display: none; }
}
