/* ================================================================
   SubCreaMug Extensions — CSS
   ================================================================ */

/* Barre d'extensions */
#scme-bar {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-family: sans-serif;
}

#scme-bar-sep {
  flex: 1;
}

#scme-bar button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 6px;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

#scme-bar button:hover {
  background: #2a2a2a;
  border-color: #b87333;
  color: #fff;
}

#scme-btn-templates {
  border-color: #b87333 !important;
  color: #b87333 !important;
}
#scme-btn-templates:hover {
  background: #b87333 !important;
  color: #fff !important;
}

#scme-btn-buy {
  border-color: #27ae60 !important;
  color: #27ae60 !important;
}
#scme-btn-buy:hover {
  background: #27ae60 !important;
  color: #fff !important;
}

#scme-login-hint {
  font-size: 12px;
  color: #666;
}
#scme-login-hint a {
  color: #b87333;
  text-decoration: none;
}

/* Modal templates */
#scme-tpl-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#scme-tpl-box {
  background: #111;
  border: 1px solid #b87333;
  border-radius: 12px;
  width: min(720px, 95vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#scme-tpl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #2a2a2a;
}

#scme-tpl-header h3 {
  margin: 0;
  color: #b87333;
  font-size: 16px;
  font-family: sans-serif;
}

#scme-tpl-close {
  background: none;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color .2s;
}
#scme-tpl-close:hover { color: #fff; }

#scme-tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
}

.scme-tpl-card {
  cursor: pointer;
  border: 2px solid #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .2s, transform .15s;
  background: #1a1a1a;
  text-align: center;
  font-family: sans-serif;
}
.scme-tpl-card:hover {
  border-color: #b87333;
  transform: scale(1.03);
}
.scme-tpl-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}
.scme-tpl-card span {
  display: block;
  padding: 6px 8px;
  font-size: 12px;
  color: #ccc;
}

.scme-loading {
  color: #888;
  text-align: center;
  padding: 30px;
  font-family: sans-serif;
  font-size: 14px;
}

/* Menu zone template */
.scme-zone-menu {
  position: fixed;
  z-index: 99999;
  background: #1a1a1a;
  border: 1px solid #b87333;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
  transform: translate(-50%, -50%);
}

.scme-zone-btn {
  cursor: pointer;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 5px;
  color: #ccc;
  padding: 8px 14px;
  font-size: 13px;
  text-align: left;
  display: block;
  width: 100%;
  transition: background .15s;
  font-family: sans-serif;
}
.scme-zone-btn:hover { background: #333; color: #fff; }
.scme-zone-photo { border-color: #b87333 !important; }
.scme-zone-cancel {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  font-family: sans-serif;
}
.scme-zone-cancel:hover { color: #fff; }

/* Modal générique */
#scme-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#scme-modal-box {
  background: #111;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  font-family: sans-serif;
}

#scme-modal-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

#scme-modal-title {
  color: #fff;
  margin: 0 0 10px;
  font-size: 18px;
}

#scme-modal-msg {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}

#scme-modal-close {
  background: #b87333;
  border: none;
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-family: sans-serif;
}
#scme-modal-close:hover { background: #a06228; }
