/* Page de dépôt d'Olivier. Le projet ne déclare ni charte ni système de design : neutre,
   lisible, l'information passe par le texte et la couleur (front.md § 6). */

:root {
  --texte: #1f2328;
  --texte-discret: #59636e;
  --fond: #ffffff;
  --fond-doux: #f6f8fa;
  --bordure: #d1d9e0;
  --accent: #1f4fbf;
  --accent-survol: #173c93;
  --erreur: #b42318;
  --fond-erreur: #fef3f2;
  --information: #05603a;
  --fond-information: #ecfdf3;
  --danger-survol: #912018;
  --rayon: 6px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--texte);
  background: var(--fond);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.entete {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--bordure);
}

.marque {
  margin: 0;
  font-weight: 600;
}

.compte {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.contenu {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.discret {
  color: var(--texte-discret);
  font-weight: 400;
}

.message {
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid currentcolor;
  border-radius: var(--rayon);
}

.message-erreur {
  color: var(--erreur);
  background: var(--fond-erreur);
}

.message-information {
  color: var(--information);
  background: var(--fond-information);
}

.bouton {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: var(--rayon);
  color: #ffffff;
  background: var(--accent);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.bouton:hover {
  background: var(--accent-survol);
}

.bouton:disabled {
  opacity: 0.6;
  cursor: wait;
}

.bouton-secondaire {
  color: var(--accent);
  background: var(--fond);
}

.bouton-secondaire:hover {
  background: var(--fond-doux);
}

.bouton-danger {
  border-color: var(--erreur);
  background: var(--erreur);
}

.bouton-danger:hover {
  background: var(--danger-survol);
}

.bouton:focus-visible,
.guide:focus-visible,
.dossier:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.etiquette {
  margin: 0 0 0.25rem;
  color: var(--texte-discret);
}

.cle {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--rayon);
  background: var(--fond-doux);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

.cle code,
.codes {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.cle code {
  user-select: all;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.aide {
  margin: 0 0 1.5rem;
}

.aide summary {
  color: var(--accent);
  cursor: pointer;
}

.aide ol {
  margin: 0.5rem 0 0;
  padding-left: 1.5rem;
}

.formulaire {
  display: grid;
  gap: 0.5rem;
  justify-items: start;
}

.formulaire input {
  width: 100%;
  max-width: 20rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  font: inherit;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.codes {
  columns: 2;
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}

h2 {
  margin: 2rem 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.arborescence {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

/* --profondeur est posée par depot.mjs, ligne par ligne. */
.arborescence li {
  padding: 0.125rem 0 0.125rem calc(var(--profondeur, 0) * 1.25rem);
  overflow-wrap: anywhere;
}

.dossier,
.guide {
  padding: 0.125rem 0.375rem;
  border: 0;
  border-radius: var(--rayon);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.dossier {
  color: var(--texte);
  font-weight: 600;
}

.guide {
  color: var(--accent);
  text-decoration: underline;
}

.dossier:hover,
.guide:hover {
  background: var(--fond-doux);
}

.dossier[aria-pressed="true"],
.guide[aria-pressed="true"] {
  background: var(--fond-doux);
  box-shadow: inset 3px 0 0 var(--accent);
  text-decoration: none;
}

.dossier:disabled,
.guide:disabled {
  cursor: wait;
}

.zone-depot {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem 1.25rem;
  border: 2px dashed var(--bordure);
  border-radius: var(--rayon);
}

.zone-depot h2 {
  margin-top: 0;
}

.zone-depot.survolee {
  border-color: var(--accent);
  background: var(--fond-doux);
}

.champs {
  display: grid;
  gap: 0.25rem;
  margin: 0 0 1rem;
}

.champs label {
  color: var(--texte-discret);
}

.champs select,
.champs input:not([type="file"]) {
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  color: var(--texte);
  background: var(--fond);
  font: inherit;
}

.formulaire-en-ligne {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.75rem;
  align-items: end;
  margin: 0 0 1rem;
}

.formulaire-en-ligne .champs {
  flex: 1 1 14rem;
}

.formulaire-en-ligne .bouton {
  margin: 0 0 1rem;
}

.compte-rendu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.compte-rendu li {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.75rem;
  border-left: 4px solid currentcolor;
  border-radius: var(--rayon);
  overflow-wrap: anywhere;
}

.compte-rendu-erreur {
  color: var(--erreur);
  background: var(--fond-erreur);
}

.compte-rendu-information {
  color: var(--information);
  background: var(--fond-information);
}

.selection {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem 0.25rem;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
}

.selection h2 {
  margin-top: 0;
}

.confirmation {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem 0.25rem;
  border-left: 4px solid var(--erreur);
  border-radius: var(--rayon);
  background: var(--fond-erreur);
}

.confirmation p {
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}

.confirmation .actions {
  margin-bottom: 0.75rem;
}

.tableau-versions {
  width: 100%;
  border-collapse: collapse;
}

.tableau-versions th,
.tableau-versions td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--bordure);
  text-align: left;
  vertical-align: top;
}

.tableau-versions th {
  color: var(--texte-discret);
  font-weight: 400;
}

.tableau-versions td {
  overflow-wrap: anywhere;
}

.tableau-versions abbr {
  text-decoration: underline dotted;
  cursor: help;
}

.empreinte {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
