body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f7fb;
  color: #1f1f1f;
}

nav {
  background: white;
  padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.notice,
.alert {
  max-width: 900px;
  margin: 16px auto 0;
  padding: 12px 16px;
  border-radius: 10px;
}

.notice {
  background: #ecfdf3;
  color: #166534;
}

.alert {
  background: #fef2f2;
  color: #991b1b;
}

.auth-page {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 16px;
}

.auth-card,
.danger-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.danger-card {
  margin-top: 24px;
  border-color: #fecaca;
}

.auth-card h1,
.danger-card h2,
.form-section h2 {
  margin-top: 0;
}

.auth-subtitle {
  color: #6b7280;
  margin-bottom: 24px;
}

.form-section {
  padding-top: 8px;
  margin-bottom: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
}

.field textarea {
  resize: vertical;
}

.helper-text {
  color: #6b7280;
  font-size: 14px;
}

.actions {
  margin-top: 24px;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
}

.btn-primary {
  background: #111827;
  color: white;
}

.btn-secondary {
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  display: inline-block;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.page-shell {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 16px;
}

.page-header,
.project-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header h1,
.project-hero h1 {
  margin: 0 0 8px;
  font-size: 48px;
  line-height: 1;
}

.page-subtitle {
  margin: 0;
  color: #6b7280;
  font-size: 18px;
}

.back-link {
  margin-top: 20px;
}

.muted-text {
  color: #6b7280;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 320px;
  gap: 24px;
  align-items: start;
}

.project-card,
.content-card,
.sidebar-card,
.form-card,
.empty-state {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.project-card-title {
  color: #111827;
  text-decoration: none;
}

.project-card-title:hover {
  text-decoration: underline;
}

.project-card-top {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 13px;
  font-weight: 600;
}

.badge-light {
  background: #f3f4f6;
  color: #374151;
}

.project-card-text {
  color: #4b5563;
  min-height: 48px;
}

.project-meta {
  display: flex;
  gap: 16px;
  color: #6b7280;
  font-size: 14px;
  margin: 14px 0;
}

.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.content-section + .content-section,
.dashboard-section + .dashboard-section {
  margin-top: 28px;
}

.content-section h2,
.sidebar-card h2 {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 6px;
}

.section-count {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f3f4f6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.member-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-card {
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.member-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.member-card-link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
}

.member-link {
  text-decoration: none;
  color: inherit;
}

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

.member-role {
  display: inline-block;
  margin-left: 8px;
  color: #6b7280;
  font-size: 14px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.info-list li {
  margin-bottom: 12px;
}

.callout {
  padding: 14px 16px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
}

.callout.success {
  background: #ecfdf3;
  color: #166534;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-errors {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.tech-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
}

.tech-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.tech-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #d9dde7;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
}

.tech-option:hover {
  border-color: #bfc6d4;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 16px;
}

.avatar-preview .profile-avatar {
  width: 88px;
  height: 88px;
  margin-bottom: 0;
  border: 1px solid #d9dde7;
}

.profile-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
}

.profile-hero-main {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-avatar-large {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid #d9dde7;
}

.profile-avatar-fallback {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #eef2ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  border: 1px solid #d9dde7;
}

.profile-hero-content h1 {
  margin-bottom: 8px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
  color: #667085;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-row-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}

.project-row-card:hover {
  text-decoration: none;
  color: inherit;
  border-color: #d1d5db;
}

.project-row-card-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.project-row-card-main {
  min-width: 0;
}

.project-row-card-main strong {
  display: block;
  margin-bottom: 6px;
}

.project-row-card-meta {
  flex-shrink: 0;
}

.nav-user-menu {
  position: relative;
}

.user-dropdown {
  position: relative;
}

.user-dropdown summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.user-dropdown summary::-webkit-details-marker {
  display: none;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: white;
  border: 1px solid #d9dde7;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 20;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: none;
  text-align: left;
}

.dropdown-item:hover {
  background: #f5f6fa;
  text-decoration: none;
  color: inherit;
}

.logout-button {
  font: inherit;
  cursor: pointer;
}

@media (max-width: 900px) {
  .projects-grid,
  .project-layout,
  .form-grid,
  .tech-grid,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .page-header,
  .project-hero,
  .profile-hero-card,
  .profile-hero-main {
    flex-direction: column;
  }

  .profile-hero-main {
    align-items: flex-start;
  }

  .page-header h1,
  .project-hero h1 {
    font-size: 36px;
  }

  .project-row-card-content {
    flex-direction: column;
  }
}

.tech-picker {
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.tech-picker-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 24px;
}

.tech-picker-placeholder {
  color: #6b7280;
  font-size: 14px;
}

.tech-picker-toolbar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 12px;
}

.tech-picker-input,
.tech-picker-category {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 15px;
  box-sizing: border-box;
  background: white;
}

.tech-picker-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-picker-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.tech-picker-result:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.tech-picker-result small {
  color: #6b7280;
  text-transform: capitalize;
}

.tech-picker-empty {
  padding: 10px 12px;
  color: #6b7280;
  font-size: 14px;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 14px;
}

.tech-tag-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

@media (max-width: 900px) {
  .tech-picker-toolbar {
    grid-template-columns: 1fr;
  }

}

.user-avatar-button {
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
}

.navbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.navbar-avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef2ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}


.navbar-username {
  font-weight: 500;
}

.navbar-caret {
  font-size: 12px;
  color: #6b7280;
}

.user-menu-button {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 6px 12px;
  background: white;
}

.search-hero {
  max-width: 1400px;
  margin: 24px auto 32px;
  padding: 0 16px;
}

.project-search-bar {
  display: grid;
  grid-template-columns: minmax(280px, 2.2fr) 1fr 1fr auto;
  gap: 18px;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.search-input-wrap {
  position: relative;
}

.search-input {
  width: 100%;
  padding: 16px 48px 16px 22px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 16px;
  box-sizing: border-box;
}

.search-input-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #111827;
  font-size: 20px;
  pointer-events: none;
}

.search-select {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  font-size: 16px;
  background: #fff;
}

.search-submit {
  border: none;
  border-radius: 999px;
  background: #f7931e;
  color: #111;
  padding: 16px 28px;
  font-size: 18px;
  cursor: pointer;
  white-space: nowrap;
}

.search-submit:hover {
  opacity: 0.95;
}

@media (max-width: 1100px) {
  .project-search-bar {
    grid-template-columns: 1fr 1fr;
    border-radius: 28px;
  }
}

@media (max-width: 700px) {
  .project-search-bar {
    grid-template-columns: 1fr;
  }

  .search-submit {
    width: 100%;
  }
}

.project-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.project-hero-main {
  min-width: 0;
  flex: 1;
}

.project-hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

.project-hero-actions form {
  margin: 0;
}

@media (max-width: 900px) {
  .project-hero {
    flex-direction: column;
  }

  .project-hero-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}


.project-search-box {
  background: #11182e;
  padding: 30px;
  border-radius: 16px;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.search-main-input {
  height: 56px;
  border-radius: 12px;
  font-size: 18px;
}

.search-label {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 8px;
  display: block;
}

.tech-picker-selected .tech-pill,
.tech-picker-selected .tech-tag,
.tech-picker-selected span {
  background: #ff7a00;
  color: #0a0f1f;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tech-picker-selected .remove,
.tech-picker-selected button,
.tech-picker-selected .close {
  background: transparent;
  border: none;
  color: #0a0f1f;
  font-weight: bold;
  cursor: pointer;
}

.tech-picker-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.tech-picker-input {
  flex: 1;               /* ← CRUCIAL */
  min-width: 0;          /* ← CRUCIAL pour éviter overflow */
  width: 100%;
}

.tech-picker-category {
  width: 200px;
  flex-shrink: 0;
}
