/* ── Layout ── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 0.82rem;
  color: #aaa;
  margin-top: 0.2rem;
}

/* ── Bouton ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-primary:hover { background: #333; }

/* ── Search ── */
.search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-bar svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #ccc;
  pointer-events: none;
}

.search-input {
  width: 100%;
  max-width: 340px;
  padding: 0.6rem 0.9rem 0.6rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid #e0deda;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}

.search-input:focus { border-color: #aaa; }
.search-input::placeholder { color: #ccc; }

/* ── Grille ── */
.boxes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.box-card {
  background: #fff;
  border: 1px solid #e0deda;
  border-radius: 12px;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.box-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

.box-card.hidden { display: none; }

.box-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.box-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
}

.box-card-desc {
  font-size: 0.8rem;
  color: #aaa;
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.box-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid #f0efeb;
}

.box-card-stats { display: flex; gap: 1rem; }

.box-stat {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #bbb;
}

.box-card-lock { display: flex; align-items: center; color: #ccc; }

.box-card-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: #f0efeb;
  color: #aaa;
  flex-shrink: 0;
}

.box-card-badge.active {
  background: #edf7f0;
  color: #3aac5d;
}

/* ── Section heading ── */
.section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-heading-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #bbb;
  white-space: nowrap;
}

.section-heading-line {
  flex: 1;
  height: 1px;
  background: #e8e7e3;
}

/* ── Uploads ── */
.uploads-surface {
  background: #fff;
  border: 1px solid #e0deda;
  border-radius: 12px;
  overflow: hidden;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #f0efeb;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.upload-item:last-child { border-bottom: none; }
.upload-item:hover { background: #faf9f7; }

.upload-icon {
  width: 30px; height: 30px;
  border-radius: 6px;
  background: #f0efeb;
  display: flex; align-items: center; justify-content: center;
  color: #bbb;
  flex-shrink: 0;
}

.upload-filename {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-box-name {
  font-size: 0.75rem;
  color: #bbb;
  white-space: nowrap;
  flex-shrink: 0;
}

.upload-date {
  font-size: 0.75rem;
  color: #ccc;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 80px;
  text-align: right;
}

.upload-mimetype {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: #f0efeb;
  color: #bbb;
  flex-shrink: 0;
}