/* Broken Kingdoms : brokenkingdoms.app. Couleurs et polices de la charte du jeu (docs/charte-graphique/). */

@font-face {
  font-family: "Cinzel";
  src: url("polices/cinzel-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("polices/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("polices/source-sans-3-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --pierre-950: #131b23;
  --pierre-900: #1b2530;
  --pierre-800: #24323f;
  --pierre-700: #2f4858;
  --pierre-300: #a8b7c1;
  --pierre-100: #e6ecf0;
  --chaux: #fbf8f1;
  --chaux-ombree: #f1ebdd;
  --filet: #d9ceb8;
  --encre: #1f242b;
  --encre-douce: #4b5661;
  --sur-pierre: #ffffff;
  --sur-pierre-doux: #c9d4dc;
  --or-700: #8a6210;
  --or-500: #dda62a;
  --or-300: #ffd98a;
  --voile: rgba(19, 27, 35, 0.62);
  --voile-pierre: rgba(19, 27, 35, 0.74);
  --font-titre: "Cinzel", Georgia, serif;
  --font-texte: "Source Sans 3", -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  font-family: var(--font-texte);
  font-size: 17px;
  line-height: 1.45;
  color: var(--sur-pierre);
  background-color: var(--pierre-950);
  background-image:
    linear-gradient(180deg, var(--voile) 0%, var(--voile-pierre) 55%, var(--pierre-950) 100%),
    url("images/paysage.webp");
  background-size: cover;
  background-position: center top;
  background-attachment: scroll;
}

.cadre {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.icone {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 2px solid var(--or-500);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.nom {
  margin: 0;
  font-family: var(--font-titre);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--or-300);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.filet-or {
  width: 64px;
  height: 2px;
  border: 0;
  margin: 0;
  background: var(--or-500);
}

.bientot {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sur-pierre-doux);
}

.accroche {
  margin: 0;
  font-size: 18px;
  color: var(--sur-pierre);
}

.carte {
  width: 100%;
  padding: 24px 20px;
  border-radius: 12px;
  background: var(--chaux);
  color: var(--encre);
  border-bottom: 3px solid var(--or-500);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.libelle {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--encre-douce);
}

.code {
  margin: 0;
  padding: 14px 8px;
  border-radius: 8px;
  background: var(--chaux-ombree);
  border: 1px solid var(--filet);
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-indent: 0.18em; /* compense l'espace ajouté après la dernière lettre : le code reste centré */
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--encre);
  user-select: all;
  -webkit-user-select: all;
}

.consigne {
  margin: 0;
  font-size: 16px;
  color: var(--encre-douce);
}

.boutons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bouton {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 10px;
  font-family: var(--font-texte);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  -webkit-tap-highlight-color: transparent;
}

.bouton:focus-visible {
  outline: 3px solid var(--azur, #244e9e);
  outline-offset: 2px;
}

/* Une seule chose dorée par écran : le bouton qui fait avancer. */
.bouton-principal {
  background: var(--or-500);
  color: var(--encre);
  box-shadow: inset 0 -3px 0 var(--or-700);
}

.bouton-principal:active {
  box-shadow: inset 0 -1px 0 var(--or-700);
  transform: translateY(1px);
}

.bouton-secondaire {
  background: var(--pierre-700);
  color: var(--sur-pierre);
  box-shadow: inset 0 -3px 0 var(--pierre-900);
}

.bouton-secondaire:active {
  box-shadow: inset 0 -1px 0 var(--pierre-900);
  transform: translateY(1px);
}

.aide {
  margin: 0;
  font-size: 14px;
  color: var(--encre-douce);
}

.annonce {
  min-height: 1.45em;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--encre);
}

.pied {
  margin: 0;
  font-size: 14px;
  color: var(--sur-pierre-doux);
}

.pied a {
  color: var(--or-300);
}

[hidden] {
  display: none !important;
}

@media (min-width: 600px) {
  .nom {
    font-size: 44px;
  }
  .code {
    font-size: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bouton:active {
    transform: none;
  }
}
