/* (logique) — réseau scientifique, inspiré des usages sociaux contemporains. */

:root {
  --fond: #f4f8fb;
  --carte: #ffffff;
  --carte-alt: #f7fbfd;
  --bord: #dce7ed;
  --encre: #102a3a;
  --sourdine: #688090;
  --navy: #063b5c;
  --navy-2: #032d47;
  --cyan: #00a9c7;
  --cyan-clair: #ddf7fb;
  --violet: #7157d9;
  --violet-clair: #eeeafd;
  --vert: #178b68;
  --or: #f4a63d;
  --or-fonce: #a9670b;
  --ombre: 0 12px 32px rgba(10, 58, 82, 0.08);
  --ombre-forte: 0 18px 48px rgba(10, 58, 82, 0.14);
  --ui: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --logo: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(0, 169, 199, 0.10), transparent 24rem),
    radial-gradient(circle at 92% 26%, rgba(113, 87, 217, 0.08), transparent 24rem),
    var(--fond);
  color: var(--encre);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, select, input, textarea { font: inherit; }
button, .labo { -webkit-tap-highlight-color: transparent; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(0, 169, 199, 0.28);
  outline-offset: 2px;
}

/* Navigation supérieure */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(220, 231, 237, 0.92);
}

.topbar-int {
  max-width: 760px;
  min-height: 68px;
  margin-inline: auto;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.marque {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  font-family: var(--logo);
  font-style: italic;
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.marque::before {
  content: "λ";
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--cyan));
  color: #fff;
  font-family: var(--ui);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 169, 199, 0.22);
}

.recherche {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  background: #edf4f7;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 0.55rem 0.85rem;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.recherche:focus-within {
  background: #fff;
  border-color: rgba(0, 169, 199, 0.38);
  box-shadow: 0 0 0 4px rgba(0, 169, 199, 0.08);
}

.recherche .loupe { color: var(--sourdine); font-size: 1rem; }
.recherche input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--encre);
  font-size: 0.88rem;
}
.recherche input::placeholder { color: #8499a6; }

.bouton-plein {
  flex: none;
  border: 0;
  border-radius: 12px;
  padding: 0.62rem 1rem;
  background: linear-gradient(135deg, var(--navy), #07567e);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(6, 59, 92, 0.18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.bouton-plein:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(6, 59, 92, 0.24); }
.bouton-plein:active { transform: translateY(0); }

/* Colonne et en-tête éditorial */

.colonne {
  width: min(100%, 760px);
  margin-inline: auto;
  padding: 1.25rem 1rem 3.5rem;
}

.colonne::before {
  content: "LE FIL DE LA RECHERCHE";
  display: block;
  margin: 0.1rem 0 0.7rem;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.colonne::after {
  content: "Découvrez, vérifiez, référencez.";
  display: block;
  position: absolute;
  top: -9999px;
}

/* Chercheurs — stories */

.stories {
  margin-bottom: 0.9rem;
  padding: 1rem 0.8rem 0.75rem;
  overflow: hidden;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(220, 231, 237, 0.9);
  border-radius: 20px;
  box-shadow: var(--ombre);
}

.stories-rang {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.05rem 0.2rem 0.45rem;
  scrollbar-width: thin;
  scrollbar-color: #bed0d9 transparent;
}

.chercheur {
  position: relative;
  flex: none;
  width: 88px;
  border: 0;
  background: none;
  color: var(--encre);
  text-align: center;
}
.chercheur.ouvert { z-index: 5; }

.anneau {
  width: 70px;
  height: 70px;
  margin-inline: auto;
  padding: 3px;
  display: flex;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--violet), #bd48ac, var(--or), var(--cyan), var(--violet));
  box-shadow: 0 5px 18px rgba(6,59,92,.12);
}

.avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), #0a698d);
  color: #fff;
  font-family: var(--ui);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .04em;
}

.chercheur .nom {
  margin-top: 0.42rem;
  overflow: hidden;
  color: var(--encre);
  font-size: 0.72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chercheur .indice { color: var(--violet); font-size: 0.67rem; font-weight: 700; }
.chercheur .detail {
  margin-top: 0.05rem;
  overflow: hidden;
  color: var(--sourdine);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chercheur .bouton-ref { margin-top: .3rem; padding: .22rem .62rem; font-size: .65rem; }

/* Laboratoires */

.labos-rang-cadre { margin-bottom: 0.9rem; }
.labos-rang {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.15rem 0.05rem 0.42rem;
  scrollbar-width: thin;
}

.labo {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--bord);
  border-radius: 999px;
  padding: 0.48rem 0.82rem 0.48rem 0.58rem;
  background: rgba(255,255,255,.88);
  color: var(--encre);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 5px 14px rgba(10,58,82,.05);
  transition: border-color .18s ease, transform .18s ease;
}
.labo::before {
  content: "✦";
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--cyan-clair);
  color: var(--cyan);
  font-size: .75rem;
}
.labo:hover { border-color: var(--cyan); transform: translateY(-1px); }
.labo .nom { font-size: .76rem; font-weight: 700; }
.labo .detail { color: var(--sourdine); font-size: .69rem; }

/* Filtres */

.filtres {
  position: sticky;
  top: 68px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0 -.25rem 1rem;
  padding: .55rem .25rem;
  overflow-x: auto;
  background: linear-gradient(var(--fond) 70%, rgba(244,248,251,0));
  scrollbar-width: none;
}
.filtres::-webkit-scrollbar { display: none; }

.filtre, #filtre-labo {
  flex: none;
  border: 1px solid var(--bord);
  border-radius: 999px;
  padding: .43rem .92rem;
  background: #fff;
  color: var(--sourdine);
  font-size: .76rem;
  font-weight: 700;
  cursor: pointer;
}
.filtre:hover { border-color: #a9c0cc; color: var(--encre); }
.filtre.actif {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 15px rgba(6,59,92,.16);
}
#filtre-labo { max-width: 15rem; font-weight: 600; }

/* Formulaire de publication */

.cadre-publier {
  margin-bottom: 1.1rem;
  padding: 1.2rem;
  border: 1px solid var(--bord);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--ombre-forte);
}

.onglets-publier {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--bord);
}
.onglet-publier {
  margin-bottom: -1px;
  padding: .35rem .1rem .65rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--sourdine);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}
.onglet-publier.actif { border-bottom-color: var(--cyan); color: var(--navy); }

.forme-publier { display: flex; flex-direction: column; gap: .65rem; }
.forme-publier .rangs { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.forme-publier input, .forme-publier select, .forme-publier textarea {
  flex: 1;
  min-width: 8rem;
  border: 1px solid var(--bord);
  border-radius: 11px;
  padding: .65rem .78rem;
  background: var(--carte-alt);
  color: var(--encre);
  font-size: .86rem;
}
.forme-publier textarea { resize: vertical; }
.forme-publier input:focus, .forme-publier select:focus, .forme-publier textarea:focus {
  border-color: rgba(0,169,199,.55);
  background: #fff;
}
.forme-note { color: var(--sourdine); font-size: .74rem; }
.forme-note.erreur { color: #b83c4c; }

.champ-id {
  padding: .75rem;
  border: 1px solid #cfe6eb;
  border-radius: 12px;
  background: #f2fbfc;
}
.champ-id input { width: 100%; margin-top: .35rem; background: #fff !important; }

.label-en {
  display: block;
  color: var(--sourdine);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.label-en .req { color: var(--violet); font-weight: 600; letter-spacing: 0; text-transform: none; }
.aide-en { margin-top: .2rem; color: #8297a3; font-size: .67rem; }

.radio {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--encre);
  font-size: .82rem;
}
.radio input { flex: none; min-width: 0; accent-color: var(--cyan); }

/* Fil de publications */

.etat-flux { margin-bottom: .8rem; color: var(--sourdine); font-size: .8rem; }
.flux { display: flex; flex-direction: column; gap: 1rem; }

.oeuvre {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--bord);
  border-radius: 20px;
  background: var(--carte);
  box-shadow: var(--ombre);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.oeuvre:hover {
  border-color: #c7d9e2;
  box-shadow: var(--ombre-forte);
  transform: translateY(-2px);
}

.oeuvre-tete {
  display: flex;
  align-items: center;
  gap: .72rem;
  padding: .92rem 1rem .72rem;
}
.oeuvre-tete .mini-avatar {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), var(--cyan));
  color: #fff;
  font-family: var(--ui);
  font-size: .78rem;
  font-style: normal;
  font-weight: 800;
  box-shadow: 0 0 0 2px var(--cyan-clair);
}
.oeuvre-tete .qui { min-width: 0; }
.oeuvre-tete .nom { color: var(--encre); font-size: .84rem; font-weight: 800; }
.oeuvre-tete .detail {
  overflow: hidden;
  color: var(--sourdine);
  font-size: .69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oeuvre-tete .date { flex: none; margin-left: auto; color: var(--sourdine); font-size: .68rem; }

.oeuvre-corps { padding: .22rem 1rem 1rem; }
.type-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .23rem .65rem;
  background: var(--cyan-clair);
  color: #00788f;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.type-badge.livre { background: var(--violet-clair); color: #5941ba; }
.type-badge.stage { background: #e1f5ed; color: #137356; }
.type-badge.emploi { background: #fff0da; color: #9a5e0c; }

.oeuvre-titre {
  margin: .58rem 0 .38rem;
  color: var(--navy);
  font-size: 1.14rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.018em;
}
.oeuvre-resume { color: #3c5665; font-size: .87rem; line-height: 1.65; }
.oeuvre-lien { margin-top: .55rem; overflow-wrap: anywhere; font-size: .75rem; }
.oeuvre-lien a { color: #007f98; font-weight: 600; text-underline-offset: 2px; }

.identifiant {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .65rem;
  border-radius: 8px;
  padding: .24rem .5rem;
  background: #f3f7f9;
  font-size: .68rem;
}
.id-type { color: var(--violet); font-weight: 800; letter-spacing: .07em; }
.id-valeur { overflow-wrap: anywhere; color: var(--sourdine); font-variant-numeric: tabular-nums; }

.oeuvre-pied {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .68rem 1rem .78rem;
  border-top: 1px solid #eaf0f3;
}
.bouton-ref {
  border: 1px solid #b9ccd6;
  border-radius: 999px;
  padding: .34rem .82rem;
  background: transparent;
  color: var(--navy);
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .1s ease;
}
.bouton-ref::before { content: "↗  "; }
.bouton-ref:hover { border-color: var(--navy); background: var(--navy); color: #fff; }
.bouton-ref:active { transform: scale(.96); }
.bouton-ref.fait { border-color: #b8aef0; background: var(--violet-clair); color: #5941ba; }
.compte-ref { color: var(--sourdine); font-size: .74rem; font-weight: 700; }
.labo-tag {
  margin-left: auto;
  overflow: hidden;
  color: #007f98;
  font-size: .69rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.labo-tag::before { content: "#"; }

.oeuvre.offre { border-left: 4px solid var(--or); }
.offre-meta { margin-bottom: .42rem; color: var(--sourdine); font-size: .76rem; font-weight: 600; }

/* Tiroir de référencement */

.tiroir-ref {
  padding: .8rem 1rem .95rem;
  border-top: 1px dashed #cadbe3;
  background: #f7fbfc;
}
.tiroir-ligne { display: flex; gap: .5rem; margin-top: .42rem; }
.tiroir-ligne input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--bord);
  border-radius: 9px;
  padding: .52rem .68rem;
  background: #fff;
  color: var(--encre);
  font-size: .82rem;
}
.bouton-valider {
  flex: none;
  border: 0;
  border-radius: 9px;
  padding: .52rem .85rem;
  background: var(--navy);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}
.bouton-valider:hover { background: var(--navy-2); }
.bouton-valider:disabled { cursor: wait; opacity: .55; }
.tiroir-message { min-height: 1rem; margin-top: .35rem; color: var(--sourdine); font-size: .72rem; }
.tiroir-message.succes { color: var(--vert); font-weight: 600; }
.tiroir-message.erreur { color: #b83c4c; }

.tiroir-story {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 6;
  width: 15.5rem;
  border: 1px solid var(--bord);
  border-radius: 14px;
  box-shadow: var(--ombre-forte);
  text-align: left;
}

.pied {
  margin-top: 2.7rem;
  padding: 1.25rem 1rem;
  border-top: 1px solid var(--bord);
  color: var(--sourdine);
  font-size: .72rem;
  text-align: center;
}

@media (min-width: 860px) {
  .colonne { padding-top: 1.65rem; }
  .stories { padding-inline: 1.1rem; }
}

@media (max-width: 600px) {
  body { background: #f6fafc; }
  .topbar-int { min-height: 62px; gap: .65rem; padding-inline: .75rem; }
  .marque { font-size: 0; }
  .marque::before { width: 38px; height: 38px; font-size: 1rem; }
  .recherche { padding-inline: .7rem; }
  .bouton-plein { padding: .57rem .75rem; }
  .colonne { padding: .9rem .65rem 2.5rem; }
  .stories { border-radius: 16px; padding-inline: .55rem; }
  .filtres { top: 62px; }
  .oeuvre { border-radius: 16px; }
  .cadre-publier { border-radius: 16px; padding: .95rem; }
  .labo-tag { max-width: 9rem; }
}

@media (max-width: 390px) {
  .recherche input::placeholder { color: transparent; }
  .oeuvre-tete .date { display: none; }
  .labo-tag { max-width: 6rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
