
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', sans-serif; min-height: 100vh;
  display: flex; justify-content: center; align-items: flex-start;
  background: linear-gradient(135deg, #1a0a2e, #2d1b4e, #1a0a2e);
  color: #e0e0e0; padding: 16px; padding-top: 60px;
  overflow-x: hidden;
}
#app {
  position: relative; z-index: 1;
  background: rgba(20, 20, 35, 0.55);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 24px;
  padding: 32px 24px 28px; max-width: 1000px; width: 100%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4); text-align: center;
}
.back-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px;
  color: #f0abfc; text-decoration: none; font-size: 0.85rem; font-weight: 600;
}
.back-link:hover { color: #d946ef; }

.entete-entrainement { max-width: 680px; margin: 4px auto 18px; }
.entete-entrainement h1 {
  font-size: 1.9rem; font-weight: 800; margin-bottom: 10px;
  background: linear-gradient(90deg, #f0abfc, #d946ef, #a21caf);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.entete-entrainement p { font-size: 0.9rem; line-height: 1.5; color: #cbd5e1; margin-bottom: 6px; }


.reglages {
  max-width: 680px; margin: 0 auto 24px; padding: 18px 16px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  scroll-margin-top: 64px;
}
.reglages h2 { font-size: 1.1rem; color: #f0abfc; margin-bottom: 12px; }
.reglage { margin-bottom: 14px; }
.reglage-titre { display: block; font-size: 0.82rem; font-weight: 700; color: #f0abfc; margin-bottom: 6px; }
.reglage-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.opt {
  font-family: inherit; font-size: 0.88rem; font-weight: 600; min-height: 44px; padding: 8px 14px;
  border-radius: 10px; cursor: pointer; color: #e2e8f0;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18);
}
.opt[aria-pressed="true"] { background: rgba(162, 28, 175, 0.35); border-color: rgba(217, 70, 239, 0.8); color: #fff; }
@media (hover: hover) {
  .opt:hover { border-color: rgba(217, 70, 239, 0.6); }
}
.btn-distribuer { margin-top: 6px; min-width: 220px; }
.reglages-message { font-size: 0.85rem; color: #fde68a; margin-top: 10px; min-height: 1.3em; }
.reglages-message:empty { min-height: 0; margin-top: 0; }


.btn {
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 700;
  padding: 10px 22px; min-height: 44px; border: none; border-radius: 10px; cursor: pointer;
  color: #fff; transition: transform 0.2s; display: inline-flex;
  align-items: center; justify-content: center; line-height: 1.1; text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled {
  cursor: not-allowed; transform: none; box-shadow: none;
  background: rgba(148,163,184,0.18); color: #94a3b8; border: 1px dashed rgba(148,163,184,0.5);
}
.btn[hidden] { display: none; }
.btn-petit { padding: 8px 14px; font-size: 0.84rem; }
.btn-primary { background: #a21caf; box-shadow: none; }
.btn-secondary { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25); }
.btn-icone {
  min-width: 44px; min-height: 44px; border-radius: 10px; cursor: pointer;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  font-size: 1.1rem; line-height: 1; color: #fff;
}
.btn:focus-visible, .btn-icone:focus-visible, .btn-roi:focus-visible, .opt:focus-visible, .back-link:focus-visible {
  outline: 3px solid #fbbf24; outline-offset: 2px;
}


#table-jeu {
  min-height: 100vh; display: flex; flex-direction: column;
  padding-top: 56px;
}
#table-jeu[hidden] { display: none; }
.info-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 2px 10px; margin-bottom: 8px; min-height: 48px;
  background: rgba(255,255,255,0.06); border-radius: 12px;
  font-size: 0.82rem; flex-wrap: wrap; gap: 4px 10px;
}
.info-bar .timer { font-size: 1.05rem; font-weight: 700; color: #f0abfc; font-variant-numeric: tabular-nums; }
.info-bar .contrat-info { color: #f0abfc; font-weight: 700; }
.info-bar .contrat-info:empty { display: none; }
.info-bar .pli-info { color: #cbd5e1; }

.bandeau-solo {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; font-size: 0.85rem;
  background: rgba(251,191,36,0.14); border: 1px solid rgba(251,191,36,0.45); color: #fde68a;
}
.bandeau-solo[hidden] { display: none; }

.zone-message {
  text-align: center; font-size: 0.98rem; font-weight: 700;
  color: #f0abfc; margin-bottom: 6px; min-height: 2.6em;
  display: flex; align-items: center; justify-content: center;
}

.zone-table .table-tarot { min-height: 342px; }
.zone-table .table-tarot.tt-n3 { min-height: 238px; }
.main-cartes { min-height: calc(var(--carte-h) + 16px); }


.zone-prise {
  margin: 4px auto 10px; padding: 12px 14px; max-width: 560px;
  background: rgba(217,70,239,0.1); border: 1px solid rgba(217,70,239,0.45); border-radius: 14px;
}
.zone-prise[hidden] { display: none; }
.zone-prise-texte { font-size: 0.88rem; color: #e2e8f0; margin-bottom: 10px; line-height: 1.4; }


.zone-chien { text-align: center; margin-bottom: 10px; }
.titre-zone { font-size: 0.95rem; color: #fbbf24; margin-bottom: 8px; }
.chien-cartes { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; }
.ecart-zone { margin: 8px 0 10px; text-align: center; }
.ecart-info { font-size: 0.85rem; color: #cbd5e1; margin-bottom: 8px; }
.ecart-cartes {
  display: flex; gap: 4px; justify-content: center; flex-wrap: wrap;
  min-height: calc(var(--carte-h) + 18px); background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 8px; border: 2px dashed rgba(255,255,255,0.15); margin-bottom: 8px;
}


.zone-main {
  padding: 8px 4px; margin-top: auto;
  background: rgba(255,255,255,0.04); border-radius: 16px 16px 0 0;
}
.main-label { font-size: 0.78rem; color: #cbd5e1; text-align: center; margin-bottom: 4px; }


.overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.7); z-index: 100;
  justify-content: center; align-items: center; padding: 60px 12px 12px;
}
.overlay.visible { display: flex; }
.overlay-content {
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px; padding: 24px 22px; max-width: 520px; width: 100%;
  text-align: center; max-height: calc(100vh - 72px); overflow-y: auto;
}
.overlay-content h2 {
  font-size: 1.5rem; margin-bottom: 12px;
  background: linear-gradient(90deg, #f0abfc, #d946ef, #a21caf);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.overlay-texte { color: #cbd5e1; font-size: 0.86rem; margin-bottom: 10px; }

.overlay-decision { background: rgba(0,0,0,0.25); pointer-events: none; }
.overlay-decision .overlay-content { pointer-events: auto; max-width: 460px; padding: 16px 18px; }
.overlay-decision .overlay-content h2 { font-size: 1.2rem; margin-bottom: 8px; }


.appel-roi-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.btn-roi {
  font-family: inherit; font-size: 1.3rem; font-weight: 800; min-width: 64px; height: 64px; padding: 0 8px;
  border-radius: 12px; background: #f8fafc; border: 2px solid rgba(255,255,255,0.3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.btn-roi:hover { border-color: #d946ef; }
.btn-roi.rouge { color: #b91c1c; }
.btn-roi.noir { color: #0f172a; }


.resultat-repere {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 0.88rem; font-weight: 700; line-height: 1.4;
  color: #fde68a; background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.35);
}
.resultat-repere:empty { display: none; }
.cta-inscription {
  margin-top: 14px; padding: 14px; border-radius: 12px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
}
.cta-inscription p { color: #cbd5e1; font-size: 0.86rem; margin-bottom: 10px; }
.cta-inscription-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.resultat-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

footer { font-size: 0.78rem; color: #94a3b8; margin-top: 32px; text-align: center; }
footer a { color: #f0abfc; text-decoration: none; }

@media (max-width: 640px) {
  .zone-table .table-tarot { min-height: 282px; }
  .zone-table .table-tarot.tt-n3 { min-height: 196px; }
  .overlay-content { padding: 18px 14px; }
}

@media (max-width: 480px) {
  
  body { padding: 16px 4px; padding-top: 60px; }
  #app { padding: 24px 24px 20px; }
  .entete-entrainement h1 { font-size: 1.5rem; }
  .reglages { padding: 14px 10px; }
  .opt { padding: 8px 10px; font-size: 0.84rem; }
  #table-jeu { margin-left: -20px; margin-right: -20px; }
  .info-bar { padding: 2px 6px; }
}
