/* ===== Reset & Body ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: Arial, sans-serif;
  background: #111;
  color: #eee;
  text-align: center;
  padding: 20px;
}

body.not-logged-in {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* ===== Container ===== */
.container {
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

/* ===== Titres & paragraphes ===== */
h1 {
  margin-bottom: 10px;
  color: #ffcc00;
  text-shadow: 2px 2px 4px #000;
}
p {
  margin-bottom: 10px;
}

/* ===== Textarea ===== */
textarea {
  width: 100%;
  min-height: 120px;
  background: #222;
  border: 2px solid #ffcc00;
  color: #fff;
  font-size: 16px;
  padding: 10px;
  margin-bottom: 10px;
  resize: vertical;
}

/* ===== Boutons & Préréglages ===== */
.buttons,
.preset-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
button {
  background: #0055a5;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease;
}
button:disabled {
  background: #444;
  cursor: not-allowed;
}
button:hover:not(:disabled) {
  background: #003f7f;
}

/* style spécifique aux préréglages */
.preset-buttons .preset-btn {
  background: #a38943;
}
.preset-buttons .preset-btn:hover {
  background: #8b7435;
}
.preset-buttons h2 {
  width: 100%;
  color: #ffcc00;
  font-size: 18px;
  margin-bottom: 5px;
}

/* ===== Curseur & Canvas ===== */
.wheel-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  aspect-ratio: 1;       /* garantit un carré */
  margin: 0 auto 20px;
}
.pointer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 20px solid #ffcc00;
  z-index: 10;
}
#wheelCanvas {
  width: 100%;
  height: auto;
/*  background: #000; */
  border: 5px solid #ffcc00;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}

/* ===== Petits écrans ===== */
@media (max-width: 400px) {
  body {
    padding: 10px;
  }
  h1 {
    font-size: 20px;
  }
  button {
    padding: 8px 12px;
    font-size: 14px;
  }
}

/* Résultat en gros */
.result-display {
  font-size: 2rem;
  color: #ffcc00;
  text-shadow: 1px 1px 2px #000;
  margin: 20px 0;
  min-height: 2.5em;    /* espace réservé même si vide */
  display: flex;
  align-items: center;
  justify-content: center;
}

#authSection {
  background: #222;
  padding: 20px;
  border: 2px solid #ffcc00;
  border-radius: 5px;
  max-width: 400px;
  width: 100%;
}

#authSection h1 {
  color: #ffcc00;
  margin-bottom: 10px;
}

#authSection h2 {
  color: #fff;
  margin-bottom: 15px;
}

#authSection input {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  font-size: 16px;
  background: #111;
  border: 1px solid #ffcc00;
  color: #fff;
}

#authSection button {
  width: 100%;
  margin-bottom: 10px;
}

#authMessage {
  color: #ffcc00;
  font-size: 0.9rem;
}

#authSection,
.container {
  display: none;
}
#logoutBtn {
  background: #a50000;
}
#logoutBtn:hover {
  background: #7a0000;
}
