/* Styles pour l'application CollectIt */

/* Variables CSS */
:root {
  --bg: #fbf7f3;
  --card: #fff;
  --text: #111;
  --muted: #7b7b85;
  --accent: #6b5ce6;
  --shadow: 0 6px 20px rgba(32,32,64,0.06);
  --radius: 14px;
}

/* Reset de base */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(180deg, #fffaf6 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
}

/* Container principal */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 20px;
}

/* Logo et header */
.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.logo-box {
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f7f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-inner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  border-radius: 4px;
}

.app-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

/* Titres */
h1 {
  font-size: 32px;
  margin: 10px 0;
  font-weight: 700;
}

h2 {
  font-size: 24px;
  margin: 10px 0;
  font-weight: 700;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px 0;
}

/* Cartes */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(0,0,0,0.03);
}

/* Formulaires */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(90deg, #ffb8b8, #cdd7ff);
  color: var(--text);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  text-align: center;
}
/* Boutons */
.btn1 {
  display: inline-block;
  padding: 12px 24px;
  background-color:#2b6ce4 ;
  color: var(--text);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  text-align: center;
}
.btn:hover {
  opacity: 0.9;
}

.btn-full {
  width: 100%;
}

.btn-add {
  background: linear-gradient(90deg, #ffeadf, #ffdce8);
  color: #5a2c1f;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
}

.add-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9c7ad;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

/* Liste de collections */
.collection-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.collection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.03);
  text-decoration: none;
  color: inherit;
}

.collection-card.pink {
  background: linear-gradient(90deg, #ffecec, #fff1f3);
}

.collection-card.blue {
  background: linear-gradient(90deg, #e9fbff, #f2feff);
}

.collection-card.peach {
  background: linear-gradient(90deg, #fff5ea, #fff9f4);
}

.collection-info h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
}

.collection-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* Liste d'articles */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.item-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.03);
  text-decoration: none;
  color: inherit;
}

.item-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  background: #f4f4f6;
  overflow: hidden;
  flex-shrink: 0;
}

.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-info {
  flex: 1;
}

.item-info h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.item-info p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* Messages */
.message {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.message-error {
  background: #ffecec;
  color: #a94442;
}

.message-success {
  background: #e6ffed;
  color: #1a7f3a;
}

/* Liens */
.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  color: #2b6ce4;
  text-decoration: none;
  margin-bottom: 16px;
}

.back-link:hover {
  text-decoration: underline;
}

/* Message vide */
.empty {
  padding: 40px;
  text-align: center;
  border: 1px dashed #ddd;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
}

/* Upload d'image */
.image-preview {
  max-width: 200px;
  max-height: 200px;
  margin-top: 10px;
  border-radius: 10px;
}

/* Détails article */
.item-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.item-image {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  margin: 0 auto;
  display: block;
}

.detail-row {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.detail-value {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 16px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  .collection-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

