/* Masquer .step par défaut */
.step {
  display: none;
}

/* Conteneur principal (iPhone style) */
.phone-container {
  position: relative;
  width: 428px;
  height: 600px;
  margin: 20px auto;
  background: #f8f9fa;
  border-radius: 40px;
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.3);
  border: 6px solid #111;
  overflow: visible;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Caméra + speaker (décor) */
.camera {
  position: absolute;
  top: 12px;
  left: calc(50% + 40px); /* ajuster pour simuler l’emplacement de la caméra */
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #222 50%, #000 100%);
  border-radius: 50%;
  box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3);
}

.speaker {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: #333;
  border-radius: 3px;
}

/* phone-content : zone de contenu interne */
.phone-content {
  width: 100%;
  height: 100%;
  padding: 15px;
  box-sizing: border-box;

  /* On peut scroller si le contenu est trop long */
  overflow-y: auto;
}

/* Tabs (barre d'onglets) */
.custom-tabs {
  display: flex;
  justify-content: center;
  background: #f0f0f0;
  border-radius: 25px;
  margin: 35px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.custom-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  transition: background 0.3s, color 0.3s;
}
.custom-tab.active {
  background: linear-gradient(45deg, #007bff, #00c6ff);
  color: #fff;
}
.custom-tab:not(.active):hover {
  background: #ddd;
}

.tab-content {
  padding: 15px;
  position: relative;
  z-index: 1;
}

/* Icône d'aide ℹ️ + tooltip en pseudo-élément */
.help-icon {
  cursor: pointer;
  font-size: 16px;
  margin-left: 8px;
  display: inline-block;
  position: relative;
}

.help-icon:hover::after {
  content: attr(title); /* ou content: attr(data-tooltip); */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 130%;
  background: rgba(51, 51, 51, 0.95);
  color: #fff;
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  max-width: 300px;
  min-width: 150px;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.25);
  z-index: 9999;
}

.help-icon:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 120%;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(51, 51, 51, 0.95);
}

/* Exemple de boutons */
.btn-primary {
  background-color: #007bff;
  color: #fff;
  padding: 10px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  text-align: center;
}
.btn-primary:hover {
  background-color: #0056b3;
}
.btn-primary:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* Emoji Picker Container */
.emoji-picker {
  position: absolute;
  border: 1px solid #ccc;
  background: #fff;
  padding: 10px;
  max-height: 250px;
  max-width: 100%;
  min-width: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  display: none;
  z-index: 1000;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  white-space: normal;
}
/* Emoji Items */
.emoji-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 5px;
  cursor: pointer;
  font-size: 24px;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
  border-radius: 6px;
}
.emoji-item:hover {
  background: rgba(0, 123, 255, 0.2);
  transform: scale(1.1);
}
.emoji-item.selected {
  background: #007bff;
  color: #fff;
  border-radius: 6px;
  padding: 5px;
}
/* Emoji Categories */
.emoji-category {
  font-weight: bold;
  margin-top: 10px;
  padding: 5px;
  color: #444;
  background: #f0f0f0;
  border-radius: 4px;
  text-align: center;
}
/* Tooltip for Emoji */
.emoji-tooltip {
  position: absolute;
  display: none;
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 12px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

#messageContent {
  min-height: 150px;
}

#charCounterLabel {
  font-size: 0.9rem;
}
#charCounter {
  font-weight: 600;
}
