:root {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #7a7a7a;
  --border: #ececee;
  --shadow: 0 1px 2px rgba(16, 16, 16, 0.04), 0 8px 24px rgba(16, 16, 16, 0.04);
  --radius: 18px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 50% -80px, rgba(0, 0, 0, 0.035), transparent 60%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.page {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  padding: 1.25rem 0 2.5rem;
}

.page[hidden] {
  display: none !important;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 2.25rem;
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 0.35rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1.5px solid #d8d8d8;
  color: var(--text);
  background: transparent;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.icon-btn:active {
  transform: scale(0.96);
}

.logo {
  width: 44px;
  height: 44px;
  color: var(--text);
  display: grid;
  place-items: center;
  transition: transform 0.35s var(--ease);
}

.logo-mark {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 0;
  overflow: visible;
  display: grid;
  place-items: center;
  background: transparent;
  padding: 0;
  box-sizing: border-box;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo:hover {
  transform: rotate(-8deg) scale(1.04);
}

.hero {
  text-align: center;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.7s var(--ease) both;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
  font-weight: 500;
}

.nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.55rem 1rem 1.35rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 168px;
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), border-color 0.28s var(--ease);
  animation: fadeUp 0.7s var(--ease) both;
}

.nav-card:nth-child(1) { animation-delay: 0.04s; }
.nav-card:nth-child(2) { animation-delay: 0.08s; }
.nav-card:nth-child(3) { animation-delay: 0.12s; }
.nav-card:nth-child(4) { animation-delay: 0.16s; }
.nav-card:nth-child(5) { animation-delay: 0.2s; }
.nav-card:nth-child(6) { animation-delay: 0.24s; }

.nav-card:hover {
  transform: translateY(-4px);
  border-color: #dedee2;
  box-shadow: 0 10px 28px rgba(16, 16, 16, 0.08);
}

.nav-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  color: #222;
}

.nav-icon svg,
.nav-icon img {
  width: 30px;
  height: 30px;
  display: block;
}

.nav-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nav-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.35;
  font-weight: 500;
  max-width: 14ch;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1.75rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d0d0d0;
}

.dot.active {
  background: #3a3a3a;
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.drawer.open {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.28);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(300px, 86vw);
  background: var(--surface);
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.08);
  padding: 1rem 1.1rem 1.5rem;
  transform: translateX(-105%);
  transition: transform 0.35s var(--ease);
}

.drawer.open .drawer-backdrop {
  opacity: 1;
}

.drawer.open .drawer-panel {
  transform: translateX(0);
}

.drawer-right .drawer-panel {
  left: auto;
  right: 0;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
  transform: translateX(105%);
}

.drawer-right.open .drawer-panel {
  transform: translateX(0);
}

.drawer-empty {
  margin: 1.5rem 0.4rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.drawer-header strong {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.drawer-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.drawer-panel li a {
  display: block;
  padding: 0.75rem 0.55rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease;
}

.drawer-panel li a:hover {
  background: #f4f4f5;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  background: #1c1c1c;
  color: #fff;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  z-index: 50;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1100px) {
  .nav-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 1.25rem, var(--max));
    padding-top: 0.85rem;
  }

  .hero {
    margin-bottom: 1.6rem;
  }

  .hero h1 {
    font-size: 1.55rem;
  }

  .hero p {
    font-size: 0.92rem;
    padding: 0 0.5rem;
  }

  .nav-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .nav-card {
    min-height: 150px;
    padding: 1.25rem 0.75rem 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ——— Auth / login ——— */

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background:
    radial-gradient(900px 420px at 50% -120px, rgba(0, 0, 0, 0.045), transparent 55%),
    var(--bg);
}

.auth-shell {
  width: min(100%, 400px);
  animation: fadeUp 0.65s var(--ease) both;
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand .logo {
  width: 104px;
  height: 104px;
  margin: 0 auto 1rem;
  color: var(--text);
}

.auth-brand .logo-mark {
  width: 104px;
  height: 104px;
}

.auth-brand h1 {
  margin: 0 0 0.45rem;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  font-size: 0.84rem;
  font-weight: 650;
  color: #333;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e2e6;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  background: #fafafa;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

.field textarea {
  min-height: 10rem;
  resize: vertical;
  padding: 0.65rem 0.9rem;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #bdbdc4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.field[hidden] {
  display: none !important;
}

.auth-error {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #f8ecec;
  color: #8a2f2f;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-submit {
  margin-top: 0.25rem;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #1a1a1a;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s ease;
}

.auth-submit:hover {
  opacity: 0.92;
}

.auth-submit:active {
  transform: scale(0.985);
}

.auth-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.outils-form.is-readonly .field input {
  background: #f3f3f4;
  color: #666;
  cursor: default;
}

.auth-success {
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #eaf5ea;
  color: #1f6b2e;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ——— Paramètres ——— */

.settings-main {
  width: min(100%, 560px);
  margin: 0 auto;
  animation: fadeUp 0.65s var(--ease) both;
}

.settings-main-wide {
  width: min(100%, 720px);
}

.settings-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.settings-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.settings-hero p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.settings-section {
  display: grid;
  gap: 1rem;
}

.settings-section-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.settings-section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.outils-empty {
  margin: 0;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed #d8d8d8;
  border-radius: 18px;
  font-weight: 500;
}

.btn-delete-outil {
  margin-left: 0.35rem;
  border: 1px solid #e5d0d0;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: #fbf6f6;
  color: #8a2f2f;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-delete-outil:hover {
  background: #f5e8e8;
}

.btn-delete-outil:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f3f3f4;
  color: #8a8a8a;
  border-color: #e0e0e0;
}

.outil-order {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-shrink: 0;
}

.btn-order {
  width: 28px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e0e0e4;
  border-radius: 8px;
  background: #fafafa;
  color: #333;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-order svg {
  width: 14px;
  height: 14px;
}

.btn-order:hover:not(:disabled) {
  background: #f0f0f2;
  border-color: #cfcfd4;
}

.btn-order:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-secondary.btn-add-outil:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.outils-form {
  display: grid;
  gap: 1rem;
}

.outils-list {
  display: grid;
  gap: 0.9rem;
}

.outil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 0.85rem 1.1rem;
  display: grid;
  gap: 0;
}

.outil-card.is-open {
  padding-bottom: 1.1rem;
  gap: 0.95rem;
}

.outil-card-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.outil-card-toggle {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  color: inherit;
  border-radius: 12px;
  padding: 0.15rem 0.2rem;
  transition: background 0.2s ease;
}

.outil-card-toggle:hover {
  background: #f7f7f8;
}

.outil-preview {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f6f6f7;
  border: 1px solid #ececee;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.outil-preview img {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.outil-card-title {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.outil-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.8px solid #8a8a8a;
  border-bottom: 1.8px solid #8a8a8a;
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex-shrink: 0;
  margin-right: 0.25rem;
}

.outil-card.is-open .outil-chevron {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.outil-fields {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.outil-card.is-open .outil-fields {
  display: grid;
}

.outil-fields .field-full {
  grid-column: 1 / -1;
}

.drawer-account {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid #ececee;
}

@media (max-width: 720px) {
  .outil-fields {
    grid-template-columns: 1fr;
  }

  .outil-card-head {
    flex-wrap: wrap;
  }
}

.profile-main {
  width: min(100%, 560px);
  margin: 0 auto;
  animation: fadeUp 0.65s var(--ease) both;
}

.profile-hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.profile-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.profile-hero p {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: grid;
  gap: 1.15rem;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.profile-grid .field-full {
  grid-column: 1 / -1;
}

.profile-readonly {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #f7f7f8;
  border: 1px solid #efefef;
}

.profile-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.profile-readonly strong {
  font-size: 0.95rem;
  font-weight: 700;
}

.profile-actions {
  display: grid;
  gap: 0.65rem;
}

.profile-save {
  width: 100%;
}

.btn-secondary {
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s var(--ease);
}

.btn-secondary:hover {
  background: #f6f6f7;
}

.btn-secondary:active {
  transform: scale(0.985);
}

.btn-secondary.btn-add-outil {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

a.icon-btn {
  text-decoration: none;
}

@media (max-width: 720px) {
  .profile-grid,
  .profile-readonly {
    grid-template-columns: 1fr;
  }
}

/* ——— Page outil / entrées ——— */

.topbar-outil {
  margin-bottom: 1.25rem;
}

.outil-title {
  margin: 0;
  text-align: center;
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 42px;
  padding: 0 0.9rem;
  border: 1px solid #e2e2e6;
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text);
  transition: background 0.2s ease;
}

.btn-home:hover {
  background: #f6f6f7;
}

.outil-main {
  width: min(100%, 920px);
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  animation: fadeUp 0.65s var(--ease) both;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.search-icon {
  width: 20px;
  height: 20px;
  color: #8a8a8a;
  display: grid;
  place-items: center;
}

.search-icon svg {
  width: 18px;
  height: 18px;
}

.search-bar input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
}

.search-bar input::placeholder {
  color: #9a9a9a;
}

.outil-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.outil-toolbar .search-bar {
  flex: 1;
  margin-bottom: 0;
}

.btn-add-entree {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 14px;
  border: 1px solid #1a1a1a;
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.btn-add-entree-icon {
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.btn-add-entree-label {
  display: inline;
}

.btn-add-entree:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.btn-add-entree.is-disabled,
.btn-add-entree[aria-disabled="true"] {
  background: #c8c8cc;
  border-color: #c8c8cc;
  color: #f5f5f5;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-add-entree.is-disabled:hover,
.btn-add-entree[aria-disabled="true"]:hover {
  background: #c8c8cc;
  transform: none;
}

.entrees-list {
  display: grid;
  gap: 0.75rem;
}

.entrees-cards {
  display: grid;
  gap: 0.75rem;
}

.entree-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.05rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s var(--ease), box-shadow 0.18s ease, border-color 0.18s ease;
}

.entree-card:hover {
  transform: translateY(-1px);
  border-color: #dddde1;
  box-shadow: 0 2px 6px rgba(16, 16, 16, 0.05), 0 12px 28px rgba(16, 16, 16, 0.06);
}

.entree-card-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.membre-card {
  cursor: default;
}

.membre-card:hover {
  transform: none;
}

.membre-card-meta,
.membre-card-role {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.membre-card-role {
  font-weight: 650;
  color: #444;
}

.entrees-empty {
  margin: 0;
  padding: 1.5rem 1.15rem;
  text-align: center;
  color: var(--text-muted);
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.entree-main {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 0 0 2.5rem;
}

.entree-hero {
  margin-bottom: 1.25rem;
}

.entree-outil {
  margin: 0 0 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.entree-hero h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.entree-view,
.entree-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 1.15rem 1.2rem 1.25rem;
  display: grid;
  gap: 0.85rem;
}

.entree-view[hidden],
.entree-form[hidden],
.entree-form-actions[hidden],
.entree-view-field[hidden],
.auth-error[hidden] {
  display: none !important;
}

.entree-view-field {
  display: grid;
  gap: 0.3rem;
}

.entree-view-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.entree-view-field strong {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.entree-view-field a {
  color: #1a1a1a;
  font-weight: 550;
  word-break: break-all;
}

.entree-view-note {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  font-weight: 500;
}

.pieces-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pieces-field {
  gap: 0.55rem;
}

.pieces-list {
  display: grid;
  gap: 0.45rem;
}

.pieces-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.piece-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}

.piece-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.piece-link,
.piece-pending-name {
  text-align: left;
  font-weight: 650;
  color: var(--text);
  word-break: break-word;
}

.piece-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.piece-size {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-piece-delete {
  flex-shrink: 0;
  border: 1px solid #e5d0d0;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: #fbf6f6;
  color: #8a2f2f;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-piece-delete:hover {
  background: #f5e8e8;
}

.pieces-upload {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  width: fit-content;
}

.pieces-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pieces-upload-btn {
  pointer-events: none;
  width: auto;
}

.entree-form-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.35rem;
}

.entree-form-actions .auth-submit,
.entree-form-actions .btn-as-link {
  width: auto;
  min-width: 8rem;
  margin: 0;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.entree-form-actions .btn-secondary {
  width: auto;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-row-danger {
  color: #8a1f1f;
  border-color: #e5c4c4;
}

.btn-row-danger:hover {
  background: #faf2f2;
}

@media (max-width: 720px) {
  .topbar-outil {
    grid-template-columns: auto 1fr auto;
    gap: 0.35rem;
  }

  .btn-home {
    padding: 0 0.7rem;
    font-size: 0.82rem;
  }

  .outil-title {
    font-size: 1.05rem;
  }

  .btn-add-entree {
    width: 48px;
    padding: 0;
  }

  .btn-add-entree-label {
    display: none;
  }
}
