/* Portail EDOC BIOSYNEX.
   Identite reprise du portail actuel : orange BIOSYNEX, mise en page sobre,
   libelle a gauche et champ a droite sur grand ecran, empile sur mobile. */

:root {
  --orange: #e8630a;
  --orange-dark: #c95207;
  --ink: #2f2f2f;
  --muted: #6b6b6b;
  --line: #dcdcdc;
  --surface: #ffffff;
  --ground: #fafafa;
  --banner: #fdf3e7;
  --radius: 6px;
  --focus: #1a5fb4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 8px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border: 2px solid var(--focus);
  border-radius: var(--radius);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.banner {
  background: var(--banner);
  border-bottom: 1px solid #f0dcc4;
  padding: 14px 24px;
}
.banner p {
  margin: 0 auto;
  max-width: 1440px;
  font-size: 0.95rem;
}
.banner a {
  color: var(--orange-dark);
}

.header {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.logo {
  height: auto;
  max-width: 230px;
}
.lang {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang img {
  display: block;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.lang select {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  min-height: 44px;
}

/* Les cellules tronquees portent leur contenu complet en infobulle. */
td[title] {
  cursor: help;
}

.page {
  width: 100%;
  max-width: 1440px;
  flex: 1;
  margin: 0 auto;
  padding: 0 24px 64px;
}

h1 {
  font-size: 1.5rem;
  margin: 8px 0 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr);
  gap: 16px 32px;
  align-items: start;
  padding: 14px 0;
}
.row > label {
  padding-top: 12px;
  font-size: 1.05rem;
}
.row.disabled > label {
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field small {
  color: var(--muted);
  font-size: 0.85rem;
}

input[type='text'],
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  color: inherit;
  min-height: 48px;
}
input[type='text']:disabled {
  background: #f2f2f2;
  color: var(--muted);
}
input[type='text']:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
input[aria-invalid='true'] {
  border-color: #b3261e;
}

.actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}
button[type='submit'] {
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 14px 28px;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 48px;
}
button[type='submit']:hover {
  background: var(--orange-dark);
}
button[type='submit'][aria-busy='true'] {
  opacity: 0.7;
  cursor: progress;
}

.results {
  margin-top: 28px;
}
.status {
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.status.error {
  border-color: #e7b4b0;
  background: #fdf1f0;
}
.recap {
  margin: 0 0 12px;
}
.recap strong {
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
  table-layout: fixed;
}

/* Largeurs calees sur le contenu reel : les langues d une notice multilingue
   sont longues, la reference et la date le sont peu. */
.col-ref,
th:nth-child(1) {
  width: 10%;
}
.col-desc,
th:nth-child(2) {
  width: 20%;
}
.col-type,
th:nth-child(3) {
  width: 12%;
}
.col-lang,
th:nth-child(4) {
  width: 17%;
}
.col-version,
th:nth-child(5) {
  width: 8%;
}
.col-date,
th:nth-child(6) {
  width: 10%;
  white-space: nowrap;
}
th:nth-child(7) {
  width: 12%;
}
th:nth-child(8) {
  width: 11%;
}
td {
  overflow-wrap: break-word;
}
/* Le libelle de version est une longue chaine sans espace : lui seul a besoin
   d une coupure autoritaire. */
.col-version {
  overflow-wrap: anywhere;
}
th,
td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-weight: 600;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.file-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.file-links a {
  color: var(--orange-dark);
}

@media (max-width: 760px) {
  .row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 0;
  }
  .row > label {
    padding-top: 0;
    font-weight: 600;
  }
  .actions {
    justify-content: stretch;
  }
  button[type='submit'] {
    width: 100%;
  }
  /* Cible tactile de 44 pixels, taille recommandee pour un doigt. */
  .menu-button {
    min-height: 44px;
    min-width: 44px;
  }
  .card {
    padding: 16px;
  }
  .page,
  .header,
  .banner {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 24px;
}
.footer p {
  max-width: 1440px;
  margin: 0 auto;
  font-size: 0.88rem;
  color: var(--muted);
}
.footer p + p {
  margin-top: 6px;
}
.footer a {
  color: var(--orange-dark);
}

/* --- Suivi de notice ---------------------------------------------------- */
.menu-button {
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  padding: 6px 10px;
  min-height: 34px;
}
.menu-button:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}
.follow-cell {
  white-space: nowrap;
}

.follow {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  max-width: 30rem;
  width: calc(100% - 32px);
  color: var(--ink);
}
.follow::backdrop {
  background: rgba(0, 0, 0, 0.4);
}
.follow form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.follow h2 {
  margin: 0;
  font-size: 1.15rem;
}
.follow p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.follow label {
  font-weight: 600;
  margin-top: 6px;
}
.follow input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  min-height: 48px;
}
.follow-error {
  color: #b3261e;
}
.follow-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}
.follow-actions button {
  border: 0;
  border-radius: var(--radius);
  padding: 12px 20px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  background: var(--orange);
  color: #fff;
}
.follow-actions .ghost {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 400;
}
