// ==========================================================================
// Messages - Messages de contact
// ==========================================================================

@use '../base/variables' as *;
@use '../base/colors' as *;

.admin-messages {
  background: $color-neutral;
  min-height: 100vh;

  .message-list {
    background: $color-light;
    border-radius: $radius-md;
    overflow: hidden;
  }

  .message-item {
    padding: 20px;
    border-bottom: 1px solid $color-neutral;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;

    &.unread {
      // border-bottom-color: $color-secondary-light;
    }

    &:hover {
      border-bottom-color: $color-primary-lighter;
    }
  }

  .message-info {
    flex: 1;

    h3 {
      display: flex;
      color: $color-dark;
      margin-bottom: 5px;
      font-size: 16px;
      gap: 8px;
    }

    p {
      color: $color-primary-dark;
      font-size: 14px;
      margin-bottom: 3px;

      strong {
        font-weight: 600;
      }
    }

    .message-preview {
      color: $color-primary-lighter;
      font-size: 13px;
      font-style: italic;
      margin-top: 5px;
    }

    .badge {
      font-weight: 700;
      background: $color-warning;
      color: $color-light;
    }
  }

  .actions-cell {
    display: flex;
    gap: 10px;
  }

  // Page de détail d'un message
  .message-detail {
    background: $color-light;
    padding: $spacing-lg;
    border-radius: $radius-md;
    box-shadow: $shadow;

    h2 {
      color: $color-dark;
      margin-bottom: 20px;
      font-size: 20px;

      &:not(:first-child) {
        margin-top: 30px;
        margin-bottom: 15px;
      }
    }

    .info-row {
      margin-bottom: 15px;
      padding-bottom: 15px;
      border-bottom: 1px solid $color-neutral;

      &:last-of-type {
        border-bottom: none;
      }

      label {
        display: inline-block;
        width: 120px;
        font-weight: 500;
        color: $color-primary-dark;
      }

      span {
        color: $color-dark;

        a {
          color: $color-primary;
          text-decoration: none;

          &:hover {
            text-decoration: underline;
          }
        }
      }
    }

    .message-content {
      margin-top: 30px;
      padding: 20px;
      background: $color-neutral;
      border-radius: $radius-sm;
      line-height: 1.8;
      color: $color-dark;
    }

    .actions {
      margin-top: 30px;
      display: flex;
      gap: 15px;

      button {
        padding: 10px 20px;
        background: #e74c3c;
        color: $color-light;
        border: none;
        border-radius: $radius-sm;
        cursor: pointer;
        font-size: 14px;
        transition: background 0.2s;

        &:hover {
          background: #c0392b;
        }
      }
    }
  }
}
