/* Gestion auteur : modifier / supprimer */
.post-owner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.post-owner-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--apple-text-secondary, #ccc);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.post-owner-btn svg {
  width: 0.85rem;
  height: 0.85rem;
}

.post-owner-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--apple-text, #fff);
}

.post-owner-btn--danger:hover {
  border-color: rgba(255, 69, 58, 0.45);
  color: #ff6b6b;
}

.post-owner-btn--primary {
  background: #4c82ff;
  border-color: #4c82ff;
  color: #fff;
}

.post-owner-btn--primary:hover {
  background: #3a6fd8;
}

.edit-post-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.edit-post-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.edit-post-modal__panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: #1a1a2a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px 16px 0 0;
  padding: 1rem 1.1rem 1.25rem;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.45);
}

@media (min-width: 640px) {
  .edit-post-modal {
    align-items: center;
    padding: 1rem;
  }

  .edit-post-modal__panel {
    border-radius: 16px;
  }
}

.edit-post-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.edit-post-modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.edit-post-modal__close {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.edit-post-form {
  display: grid;
  gap: 0.85rem;
}

.edit-post-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #aaa;
}

.edit-post-form input,
.edit-post-form textarea,
.edit-post-form select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.edit-post-form textarea {
  resize: vertical;
  min-height: 72px;
}

.edit-post-fieldset {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.edit-post-fieldset legend {
  padding: 0 0.35rem;
  font-size: 0.78rem;
  color: #888;
}

.edit-post-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.edit-post-image-item {
  position: relative;
  width: 72px;
  height: 72px;
}

.edit-post-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.edit-post-image-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #ff4757;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.edit-post-empty {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #666;
}

.edit-post-file input[type="file"] {
  font-size: 0.8rem;
}

.edit-post-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.25rem;
}
