.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--accent-text);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.page-title__mark {
  color: var(--signature-text);
}

.lead {
  margin: 0 0 var(--space-6);
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.card__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
}

.card__text {
  margin: 0 0 var(--space-4);
  color: var(--muted);
}

.card__text:last-child {
  margin-bottom: 0;
}

/* Staggered entrance; its durations follow the motion setting */
.reveal {
  animation: reveal var(--dur-reveal) var(--ease-out) both;
}

.reveal--2 {
  animation-delay: calc(var(--dur-reveal) / 4);
}

.reveal--3 {
  animation-delay: calc(var(--dur-reveal) / 2);
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-shift));
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.button:hover {
  background: color-mix(in srgb, var(--accent) 85%, black);
}

.button--quiet {
  background: transparent;
  color: var(--accent-text);
  border-color: var(--border);
}

.button--quiet:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--accent);
}

.button__icon {
  width: 18px;
  height: 18px;
}

.alert {
  border: 1px solid var(--danger-text);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  color: var(--text);
  background: color-mix(in srgb, var(--danger-text) 8%, var(--surface));
}

.alert[hidden] {
  display: none;
}

.alert__title {
  display: block;
  color: var(--danger-text);
  font-weight: 600;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.signed-in {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--muted);
}

.signed-in form {
  margin: 0;
}

.signed-in .button {
  min-height: 36px;
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
  white-space: nowrap;
}

/* The address gives way to the header's links: cut with an ellipsis rather than wrap them; on a
   narrow screen the links go under the brand */
.brand__name {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding-block: var(--space-2);
  }
}

.signed-in {
  min-width: 0;
}

.signed-in__email {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.field-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.field {
  width: 100%;
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field:hover,
.field:focus-visible {
  border-color: var(--accent);
}

/* Secrets and links in monospace: 0/O and 1/l/I stay distinct */
.field--secret,
.field--link,
.secret-text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.field--secret {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.quick-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-4);
}

.quick-share__text {
  flex: 1 1 220px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.choices {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.choice:hover {
  border-color: var(--accent);
}

.choice:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.choice input {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--accent);
}

.choice__label {
  font-weight: 600;
}

.choice__text {
  color: var(--muted);
  font-size: var(--text-sm);
}

.form-actions {
  margin-top: var(--space-5);
}

.card--result {
  border-top: 4px solid var(--signature);
}

.link-copy {
  display: flex;
  gap: var(--space-2);
}

.link-copy .field {
  flex: 1;
  min-width: 0;
}

.copy-status {
  min-height: 1.5em;
  margin: var(--space-2) 0 var(--space-3);
  color: var(--accent-text);
  font-size: var(--text-sm);
}

.secret-text {
  max-height: 50vh;
  overflow: auto;
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.card__subtitle {
  margin: var(--space-4) 0 var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}

.field--code {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.field-hint {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.password-choice {
  margin-top: var(--space-4);
}

.e2e-options {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.e2e-options[hidden] {
  display: none;
}

/* A caution, not an error: the brand orange carries it, the danger red stays for refusals */
.notice {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--signature);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--signature) 10%, var(--surface));
  color: var(--text);
  font-size: var(--text-sm);
}

.notice[hidden] {
  display: none;
}

.notice__title {
  color: var(--signature-text);
  font-weight: 600;
}

/* The native file input stays in the tab order, hidden behind its button-styled label */
.file-picker {
  position: relative;
  display: inline-flex;
}

.file-picker__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker:hover .file-picker__button {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-color: var(--accent);
}

.file-picker:focus-within .file-picker__button {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.file-list {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.file-list:empty {
  display: none;
}

.file-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.file-list__name {
  flex: 1 1 180px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-list__size {
  color: var(--muted);
  font-size: var(--text-sm);
}

.file-list__item form {
  margin: 0;
}

.file-list__action {
  min-height: 36px;
  padding-inline: var(--space-3);
  font-size: var(--text-sm);
}

.file-summary {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
}

.file-summary:empty {
  display: none;
}

/* Mes partages: one card per share, its state as a labelled badge, its facts and its openings */
.loading-state {
  margin: 0 0 var(--space-4);
  color: var(--muted);
}

.loading-state[hidden] {
  display: none;
}

.share-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-list:empty {
  display: none;
}

.share-item {
  margin-bottom: 0;
}

.share-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
}

.share-item__created {
  color: var(--muted);
  font-size: var(--text-sm);
}

.state {
  display: inline-block;
  padding: 2px var(--space-3);
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
}

.state--active {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.state--opened {
  color: var(--signature-text);
  background: color-mix(in srgb, var(--signature) 10%, var(--surface));
}

.state--expired {
  color: var(--muted);
}

.state--revoked {
  color: var(--danger-text);
  background: color-mix(in srgb, var(--danger-text) 8%, var(--surface));
}

/* A status line that takes no room until it speaks; it stays displayed so that it is announced */
.page-status {
  margin: 0;
  color: var(--accent-text);
  font-size: var(--text-sm);
}

.page-status:not(:empty) {
  margin-bottom: var(--space-4);
}

.share-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-3) var(--space-4);
  margin: 0;
}

.share-facts__term {
  color: var(--muted);
  font-size: var(--text-sm);
}

.share-facts__value {
  margin: 0;
  font-weight: 500;
}

.opening-list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.opening-list__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: var(--text-sm);
}

.opening-list__ip {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.share-item__actions {
  margin-top: var(--space-4);
}

.button[hidden] {
  display: none;
}

.button--danger {
  background: transparent;
  color: var(--danger-text);
  border-color: var(--danger-text);
}

.button--danger:hover {
  background: color-mix(in srgb, var(--danger-text) 10%, transparent);
}

.revoke-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

.revoke-confirm[hidden] {
  display: none;
}

.revoke-confirm__text {
  flex: 1 1 100%;
  margin: 0;
  color: var(--text);
  font-size: var(--text-sm);
}

/* Mes partages: a section per family — received drops, drop links, shares sent */
.page-section {
  margin-bottom: var(--space-7);
}

.section-title {
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--signature);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.01em;
}

.section-text {
  margin: 0 0 var(--space-4);
  color: var(--muted);
}

.section-empty {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
}

.section-empty[hidden] {
  display: none;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.inline-form {
  margin: 0;
}

.received-content:not(:empty) {
  margin-top: var(--space-4);
}

.received-body .secret-text {
  margin-bottom: var(--space-3);
}

.received-item .alert {
  margin: var(--space-4) 0 0;
}

/* Mes partages, « Clés d'API »: the name an employee typed wraps anywhere; the new key sits under the form */
.api-key-name {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.api-key-result {
  margin-top: var(--space-4);
}

.api-key-result[hidden] {
  display: none;
}

.api-key-result__done {
  margin-top: var(--space-3);
}

/* Drop page: the declared name and address side by side when there is room */
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.drop-picker {
  margin-top: var(--space-4);
}

.preferences {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.preferences label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.preferences select {
  min-height: 32px;
  padding: 0 var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

@media (max-width: 480px) {
  .page-title {
    font-size: var(--text-xl);
  }

  .lead {
    font-size: var(--text-base);
  }

  .signed-in__email {
    display: none;
  }
}
