* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fafafa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  color: #262626;
}

/* App container */
.app {
  max-width: 600px;
  margin: 0 auto;
}

/* Top bar */
.topbar {
  background: #fff;
  border-bottom: 1px solid #dbdbdb;
  padding: 12px;
  text-align: center;
  position: sticky;
  top: 0;
}

.logo {
  font-family: 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 20px;
}

/* Feed */
.feed {
  padding: 16px 0;
}

/* Post card */
.post {
  background: #fff;
  border: 1px solid #dbdbdb;
  margin-bottom: 24px;
}

/* Header */
.post-header {
  display: flex;
  align-items: center;
  padding: 12px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f09433, #bc1888);
  margin-right: 10px;
}

.username {
  font-weight: 600;
  font-size: 14px;
}

/* Image */
.post-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.post-image img {
  height:100%;
  width:100%;
  object-fit: contain;
}

/* Actions */
.post-actions {
  padding: 8px 12px;
  font-size: 20px;
}

/* Content */
.post-content {
  padding: 0 12px 12px;
  font-size: 14px;
  line-height: 1.4;
}

.post-content .username {
  margin-right: 5px;
}

/* Carousel */
.carousel {
  position: relative;
}

.carousel-track {
  display: flex;
  transition: transform 0.3s ease;
}


.carousel img {
  width: 100%;
  flex-shrink: 0;
}

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  margin: 0 3px;
}

.dot.active {
  background: #0095f6;
}

/* Carousel arrows */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.carousel-arrow.left {
  left: 8px;
}

.carousel-arrow.right {
  right: 8px;
}

.carousel-arrow:hover {
  opacity: 1;
}

/* Masquer les flèches sur mobile (optionnel) */
@media (hover: none) {
  .carousel-arrow {
    display: none;
  }
}

.post-content textarea {
  width: 100%;
  min-height: 70px;
  resize: vertical;
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  padding: 8px;
  font-family: inherit;
  font-size: 14px;
  margin-top: 6px;
}

.save-btn {
  margin-top: 6px;
  background: #0095f6;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}

.save-btn:hover {
  background: #007fd1;
}

/* Caption */
.caption {
  font-size: 14px;
  line-height: 1.4;
}

.caption-text {
  white-space: pre-wrap;
}

/* Editor hidden by default */
.caption-editor {
  display: none;
  width: 100%;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  resize: none;
  margin-top: 4px;
}

/* Button */
.edit-toggle {
  background: none;
  border: none;
  color: #0095f6;
  font-size: 13px;
  padding: 0;
  margin-top: 6px;
  cursor: pointer;
}

/* Edit mode */
.editable.editing .caption {
  display: none;
}

.editable.editing .caption-editor {
  display: block;
}

