/**
 * ImproLive - Styles partagés
 *
 * Design pensé pour :
 * - Lisibilité en salle sombre (contraste élevé)
 * - Utilisation smartphone (gros boutons, touch-friendly)
 * - Projection scène (grandes polices)
 */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #1a1a2e;
  color: #eaeaea;
  line-height: 1.4;
}

/* === LAYOUT === */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.container--full {
  max-width: 100%;
  padding: 40px;
}

/* === HEADER === */
.header {
  text-align: center;
  padding: 20px 0;
  border-bottom: 2px solid #16213e;
  margin-bottom: 30px;
}

.header__title {
  font-size: 2rem;
  font-weight: 700;
  color: #e94560;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.header__subtitle {
  font-size: 1rem;
  color: #888;
  margin-top: 5px;
}

/* === STATUS INDICATORS === */
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #16213e;
  border-radius: 8px;
  margin-bottom: 20px;
}

.status__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #666;
  animation: pulse 2s infinite;
}

.status__dot--connected {
  background: #4ecca3;
}

.status__dot--disconnected {
  background: #e94560;
}

.status__text {
  font-size: 0.9rem;
  color: #aaa;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* === FORMS === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input {
  width: 100%;
  padding: 15px;
  font-size: 1.2rem;
  border: 2px solid #16213e;
  border-radius: 8px;
  background: #0f0f23;
  color: #fff;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.form-group input:focus {
  outline: none;
  border-color: #e94560;
}

.form-group input::placeholder {
  color: #444;
  text-transform: none;
  letter-spacing: normal;
}

/* === BUTTONS === */
.btn {
  display: block;
  width: 100%;
  padding: 18px 30px;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
}

.btn--primary {
  background: #e94560;
  color: #fff;
}

.btn--primary:hover {
  background: #ff6b6b;
  transform: translateY(-2px);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: #16213e;
  color: #fff;
}

.btn--secondary:hover {
  background: #1a3a5c;
}

.btn--success {
  background: #4ecca3;
  color: #1a1a2e;
}

.btn--danger {
  background: #e94560;
  color: #fff;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* === CARDS === */
.card {
  background: #16213e;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.card__title {
  font-size: 1rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

.card__value {
  font-size: 3rem;
  font-weight: 700;
  color: #4ecca3;
}

.card__value--small {
  font-size: 1.5rem;
}

/* === LISTS === */
.list {
  list-style: none;
}

.list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: #0f0f23;
  border-radius: 6px;
  margin-bottom: 8px;
}

.list__item:last-child {
  margin-bottom: 0;
}

/* === PING DISPLAY === */
.ping {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 8px 15px;
  background: rgba(22, 33, 62, 0.9);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #666;
}

.ping__value {
  color: #4ecca3;
  font-weight: 600;
}

/* === SCREEN (PROJECTION) SPECIFIC === */
.screen-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  height: 100vh;
  height: 100dvh;
  padding: 40px;
}

.screen-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.screen-sidebar {
  background: #16213e;
  border-radius: 12px;
  padding: 30px;
}

.screen-title {
  font-size: 4rem;
  font-weight: 700;
  color: #e94560;
  text-align: center;
}

.screen-subtitle {
  font-size: 2rem;
  color: #888;
  text-align: center;
  margin-top: 20px;
}

/* === MC SPECIFIC === */
.mc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 30px;
}

.mc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* === MESSAGES === */
.message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.message--error {
  background: rgba(233, 69, 96, 0.2);
  border: 1px solid #e94560;
  color: #e94560;
}

.message--success {
  background: rgba(78, 204, 163, 0.2);
  border: 1px solid #4ecca3;
  color: #4ecca3;
}

.message--info {
  background: rgba(22, 33, 62, 0.8);
  border: 1px solid #16213e;
  color: #888;
}

/* === PHASE BADGES === */
.phase-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.phase-badge--idle {
  background: #333;
  color: #888;
}

.phase-badge--ideas {
  background: #4ecca3;
  color: #1a1a2e;
}

.phase-badge--remote {
  background: #e94560;
  color: #fff;
}

.phase-badge--vote {
  background: #f39c12;
  color: #1a1a2e;
}

/* === HIDDEN UTILITY === */
.hidden {
  display: none !important;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .screen-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr auto;
  }

  .mc-grid {
    grid-template-columns: 1fr;
  }

  .header__title {
    font-size: 1.5rem;
  }

  .screen-title {
    font-size: 2.5rem;
  }
}
