body {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 0;
}

header {
  padding: 1rem;
  text-align: center;
  background: #9146ff;
  color: white;
}

.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #aaa;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background: white;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
  margin-bottom: 1rem;
}

.upload-area.dragover {
  border-color: #9146ff;
  background-color: #f0eaff;
}

.upload-area input {
  display: none;
}

.upload-area p {
  margin: 0.5rem 0;
}

/* Section Controls */
.section-controls {
  margin-top: 1rem;
  text-align: center;
}

.section-controls button {
  background: #9146ff;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s;
  margin: 0 0.3rem;
}

.section-controls button:hover {
  background: #772ce8;
}

/* Section */
.section {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: 12px;
  overflow: hidden;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
  background: linear-gradient(to bottom, #7c1334, #150d25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);

  border: 4px solid #7c1334;          

}

.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2); /* l’overlay semi transparent */
  pointer-events: none;
  z-index: 0;
}

/* Inner content overlay */
.section-title,
.grid {
  background: rgba(255, 255, 255, 0.1); /* subtle transparent white */
  border-radius: 8px;
  padding: 0.5rem;
  color: #fff; /* text contrast */
}

.section-title {
  font-family: 'Chewy', cursive;
  font-weight: normal;
  margin-bottom: 1rem;
  color: #fff;
  font-size: 2rem;
  text-align: center;
}

.section-title[contenteditable="true"] {
  border-bottom: 1px dashed #ccc;
  outline: none;
  padding-bottom: 0.3rem;
  cursor: text;
}

/* Active section */
.section.active {
    border: 4px solid #9146ff;

}

/* Grid (4 fixed columns, 112px) */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 112px);
  gap: 10px;
  justify-content: start;
}

/* Emote Container */
.emote-container {
  position: relative;
  display: inline-block;
}

.grid img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  background: transparent;
  border-radius: 8px;
  display: block;
}

/* Delete Button */
.delete-btn {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ff4757;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.delete-btn:hover {
  background: #ff3742;
  transform: scale(1.1);
}

/* Show delete button on hover */
.emote-container:hover .delete-btn {
  display: flex;
}

/* Delete Section Button */
.delete-section-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #ff4757;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none; /* caché par défaut */
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.delete-section-btn:hover {
  background: #ff3742;
  transform: scale(1.1);
}

/* Show delete button on hover of section */
.section {
  position: relative; /* nécessaire pour placer le bouton */
}
.section:hover .delete-section-btn {
  display: flex;
}

/* Branding */
.branding {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

/* Section Branding */
.section-branding {
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #fff;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 300; 
  font-size: 0.85rem; 
  opacity: 0.9;
  padding: 0.5rem 0;
 
}

.section-branding span {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;   /* augmente la taille */
  color: #fff;
}

/* Réduction du logo */
.section-branding .logo-svg {
  height: 1.5rem; 
  width: auto;
}

/* Help Message */
.help-message {
  background: #e8f4fd;
  border: 1px solid #bee5eb;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  color: #0c5460;
}

.help-message.hidden {
  display: none;
}
