/* === FORCE LIGHT MODE (ignore prefers-color-scheme: dark) === */
:root {
  color-scheme: light !important;

  --color-arc-blue: rgb(81, 127, 247);
  --color-arc-grey: rgb(143, 143, 143);

  /* variantes pour un rendu industriel */
  --color-arc-text: #111111;
  --color-arc-muted: #4b5563;      /* gris texte secondaire (plus "pro") */
  --color-arc-border: #e5e7eb;     /* bordures discrètes */
  --color-arc-blue-soft: rgba(81,127,247,0.12); /* surlignage doux */
}
/* Neutralise le dark mode Pico */
@media (prefers-color-scheme: dark) {
  :root {
    --pico-background-color: #ffffff !important;
    --pico-color: #111111 !important;
    --pico-card-background-color: #ffffff !important;

    --pico-muted-color: #444444 !important;
    --pico-muted-border-color: #e6e6e6 !important;
  }
}

/* Sécurité supplémentaire */
html, body {
  background-color: #ffffff !important;
  color: var(--color-arc-muted) !important;
}

nav {
  border-top: none;
  border-bottom: 1px solid var(--color-arc-border);
}



/* === NAV LINK WITH TRUE VERTICAL BAR === */
.nav-link {
  position: relative;
  padding-left: 0.35rem;
  color: var(--color-arc-muted) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
}



/* vertical bar */
.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 1.4em;              
  transform: translateY(-50%);
  background-color: transparent;
  border-radius: 2px;
}

/* hover / focus */
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-arc-text) !important;
}

.nav-link:hover::before,
.nav-link:focus-visible::before {
  background-color: var(--color-arc-blue);
}

.nav-link:hover,
.nav-link:focus-visible {
  text-decoration: none;
}


.center {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}

h1 { color: var(--color-arc-blue); }

h2 {
  color: var(--color-arc-text);
  border-left: 4px solid var(--color-arc-blue);
  padding-left: 0.6rem;
}

h3 {
  margin-top: 1.75rem;
}


.card {
  box-shadow: none;
  border: 1px solid var(--color-arc-border);
  border-radius: 12px;
  padding: 1.25rem;
}

.badge-arc {
  display: inline-block;
  background: var(--color-arc-blue-soft);
  color: var(--color-arc-blue);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
}

.hero-image {
  margin-top: 0.25rem;  /* ≈ 12 px */
  margin-bottom: 1rem;
}

.hero-image img {
  border-radius: 12px;
  border: none;
}

.hero-caption {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  color: var(--color-arc-text);
  text-align: center;        /* centrage */
}

.hero-caption-accent {
  color: var(--color-arc-blue);
  font-weight: 500;          /* léger, pas gras */
}

.figure-caption {
  margin-top: 0.75rem;
  margin-bottom: 2rem;
  text-align: center;
  font-size: 1.3rem;
  color: var(--color-arc-text);
}

.figure-caption span {
  color: var(--color-arc-blue);
  font-weight: 500;
}

.rounded-only {
  border-radius: 12px;
}

.lead {
  font-size: 1.05rem;
  color: var(--color-arc-muted);
  max-width: 46rem;
}

.container {
  max-width: 1100px;
}

main.container {
  padding-top: 64px;
}

article.card {
  margin-top: 1.6rem;
}

/* === TYPOGRAPHY: PRECISION & FINESSE === */

body {
  font-weight: 400;
}

h1 {
  font-weight: 500;   /* avant probablement 700 */
  letter-spacing: 0.02em;
}

h2 {
  font-weight: 500;
}

.lead {
  font-weight: 400;
}

a {
  color: var(--color-arc-blue);
  text-decoration: none;
  font-weight: 500;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* === INSTITUTION LOGOS: robust to ratio + zoom === */
.team-institutions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  align-items: center;
  margin: 2rem 0;
}

/* Each logo gets a consistent "slot" */
.logo-cell {
  height: 92px;                 /* ajuste: 80–110px selon ton goût */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
}

/* The logo scales within its slot without distortion */
.logo-cell img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* === INSTITUTIONAL LOGOS BANNER (final ratio) === */
.team-institutions-banner {
  margin: 2rem auto 2.5rem;
  max-width: 1000px;   /* ✅ ratio visuel aligné avec 4 portraits */
}

.team-institutions-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* === TEAM PEOPLE === */
.team-people {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 🔑 4 par ligne */
  gap: 1.75rem;
  margin: 2.5rem 0;
  text-align: center;
}

.person img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0.75rem;
}

.person p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-arc-text);
  line-height: 1.4;
}


.person p strong {
  display: inline-block;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--color-arc-text)
}

.team-title {
  display: inline-flex;          /* reste compact, ne prend pas toute la ligne */
  align-items: center;           /* alignement vertical parfait */
  gap: 0.7rem;                   /* espace texte ↔ drapeau */
}

.team-flags {
  height: 0.8em;                 /* 🔑 clé : même hauteur que le texte */
  width: auto;
  vertical-align: middle;
}

.pub-list {
  margin-top: 1rem;
  padding-left: 1.1rem;
}

.pub-item {
  margin-bottom: 1.25rem;
}

.pub-venue {
  color: var(--color-arc-muted);
}

.pub-links {
  margin-top: 0.25rem;
  font-size: 0.95rem;
  color: var(--color-arc-muted);
}

.pub-links a {
  color: var(--color-arc-blue);
  text-decoration: none;
  font-weight: 500;
}

.pub-links a:hover,
.pub-links a:focus-visible {
  text-decoration: underline;
}

.pub-sep {
  margin: 0 0.4rem;
  color: var(--color-arc-grey);
}

.pub-note {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--color-arc-muted);
}

.pub-outreach .pub-item {
  font-size: 0.95rem;
  color: var(--color-arc-muted);
}

.pub-outreach a {
  color: var(--color-arc-blue);
  text-decoration: none;
}

.pub-outreach a:hover {
  text-decoration: underline;
}

.pub-outreach .pub-item {
  margin-bottom: 0.6rem;
}

/* === FOOTER === */
.site-footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--color-arc-border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-arc-muted);
  line-height: 1.5;
}
/* === BODY TEXT: gris foncé assumé === */
p,
li,
dt,
dd {
  color: var(--color-arc-muted);
}

/* === Mobile: reduce captions under images === */
@media (max-width: 600px) {
  .hero-caption {
    font-size: 1.1rem;
  }

  .figure-caption {
    font-size: 1rem;
  }
}

@media (max-width: 600px) {

  .nav-link {
    font-size: 0.95rem;     /* légèrement plus petit */
    padding-left: 0.25rem; /* ajuste la barre verticale */
  }
}

@media (max-width: 600px) {
  .team-people {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* === SPLASH SCREEN === */
#splash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 1s ease;
}

#splash img {
  max-width: 900px;          /* largeur max du logo */
  width: calc(100% - 4rem);  /* marges latérales (2rem de chaque côté) */
  height: auto;
}

/* Hidden state */
#splash.hidden {
  opacity: 0;
  pointer-events: none;
}

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

article strong {
  font-weight: 500;
  color: #2a2a2a;
}

/* === HERO SLIDER === */
.hero-slider {
  position: relative;
  overflow: hidden;
}

.hero-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slider img.active {
  opacity: 1;
  position: relative;
}

/* === Institutional support block === */
.institution-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
  margin: 1.5rem 0 1.25rem;
}

.institution-logos img {
 max-height: 60px;     /* clé */
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.85;
}

/* CNRS: souvent mieux avec un peu plus de contraste */
.institution-logos img[alt="CNRS"] {
  opacity: 0.95;
}

/* Tech transfer line: text + SATT logo aligned */
.tech-transfer {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-arc-border);
}

.tech-transfer p {
  margin: 0;
  flex: 1;
}

.support-logo img {
  height: 44px;
  width: auto;
  max-width: 260px;
  opacity: 0.8;
}

/* Mobile */
@media (max-width: 600px) {
  .institution-logos {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 1.5rem;
  }

  .tech-transfer {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-logo img {
    height: 40px;
    max-width: 220px;
  }
}

.institution-logos img.logo-epfl {
  max-height: 37px;
}

.institution-logos img.logo-insa {
  max-height: 40px;
}

.institution-logos img.logo-inria {
  max-height: 37px;
}

/* Center the last row when there are 2 items (desktop 4-col layout) */
@media (min-width: 901px) {
  .team-people > .person:nth-last-child(2) { grid-column: 2; }
  .team-people > .person:last-child { grid-column: 3; }
}

/* === Technology transfer block (clean) === */
.tech-transfer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  align-items: start;
  margin-top: 0.75rem;
}

.tech-transfer p {
  margin: 0;
  flex: 1;
}

.support-logo img {
  height: 44px;
  width: auto;
  max-width: 260px;
  opacity: 0.9;
}

/* Contact line */
.tech-contact {
  margin: 0.75rem 0 1rem;
  color: var(--color-arc-muted);
  font-size: 0.95rem;
}

.tech-contact a {
  word-break: normal;
  overflow-wrap: anywhere; /* ok for emails */
}


.tech-contact a:hover {
  text-decoration: underline;
}

/* === Technology transfer: video + logo side by side === */
.tech-transfer-media {
  display: grid;
  grid-template-columns: 1fr 320px; /* colonne logo plus étroite */
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

/* Video wrapper */
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 700px; /* 🔑 important: enlever le 500px */
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Logo right column */
.tech-transfer-side {
  display: flex;
  align-items: center;
  justify-content: center; /* centre dans sa colonne */
}

.satt-logo {
  height: 72px;   /* 56–72 recommandé */
  width: auto;
  opacity: 0.9;
}

/* Label above video (optional) */
.tech-transfer-label {
  font-size: 0.9rem;
  color: var(--color-arc-muted);
  margin: 0 0 0.5rem;
}

/* Mobile: stack */
@media (max-width: 800px) {
  .tech-transfer-media {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .satt-logo {
    height: 48px;
    margin-top: 0.75rem;
  }
}

/* Conceptual illustration block */
.concept-figure {
  margin: 1rem auto;
  max-width: 420px;          /* volontairement contenu */
  text-align: center;
}

.concept-figure img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  filter: grayscale(100%) contrast(1) opacity(0.9);
}

.concept-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-arc-muted);
}

.figure-caption-principle {
  max-width: 800;   /* plus large que l’image */
  font-size: 1rem;
  color: var(--color-arc-muted);
  text-align: center;
  margin-top: 0rem;
}

.figure-caption-principle strong,
.figure-caption-principle span {
  color: var(--color-arc-text);
  font-weight: 500;
}

/* ========== NAVBAR (show on scroll + centered menu) ========== */

/* Offset pour les ancres (à ajuster si tu changes la hauteur) */
:root { scroll-padding-top: 64px; }

/* Header fixed, caché par défaut */
#header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;

  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;

  /* show: plutôt rapide */
  transition:
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 200ms ease;

  will-change: transform, opacity;
}

/* hide (remonte): plus lent */
#header:not(.is-visible) {
  transition:
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 320ms ease;
}

#header.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
/* Fond translucide + bordure */
#header::before {
  content: "";
  position: absolute;
  inset: 0;

  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* ⬇️ on supprime le trait */
border-bottom: 1px solid rgba(0,0,0,0.00);
box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
/* ---- Overrides Pico (cause principale du "bandeau haut") ---- */
/* Pico met souvent du padding/margin sur header et .container */
body > header#header,
header#header {
  margin: 0;
  padding: 0;
}
header#header > .container {
  padding-top: 0;
  padding-bottom: 0;
}

/* Assurer que le contenu passe au-dessus du ::before */
#header .container,
#navigation {
  position: relative;
}

/* Nav: 3 colonnes (logo | menu centré | spacer) */
#navigation {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  column-gap: 10px;
  

  /* hauteur compacte (sans forcer un height fixe) */
  min-height: 50px;
  padding: 4px 0;

  /* neutraliser ton "nav { border-bottom: ... }" global */
  border: 0;
  margin: 0;
}

/* Pico met des marges par défaut sur les listes */
#navigation .nav-menu {
  margin: 0;
  padding: 0;
  list-style: none;

  justify-self: center;
  display: flex;
  align-items: center;
  gap: 58px;

  overflow-x: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#navigation .nav-menu::-webkit-scrollbar { display: none; }

#navigation .nav-menu > li { margin: 0; padding: 0; }

/* Logo */
.nav-brand {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;

  transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}
.nav-brand img {
  width: 34px;
  height: 34px;
  display: block;
}
.nav-brand:hover {
  transform: translateY(-1px);
  filter: brightness(1.06) drop-shadow(0 0 10px rgba(81,127,247,0.30));
  background: rgba(81,127,247,0.06);
}

/* Spacer pour centrage parfait */
.nav-spacer {
  width: 44px;
  height: 44px;
}

/* Accessibilité focus clavier */
.nav-link:focus-visible,
.nav-brand:focus-visible {
  outline: 2px solid rgba(81,127,247,0.65);
  outline-offset: 2px;
}



@media (max-width: 600px) {
  :root { scroll-padding-top: 60px; }

  /* Barre nav : 1 ligne */
  #navigation {
    display: flex;
    align-items: center;
    gap: 8px;

    min-height: 70px;
    padding: 2px 0;
    width: 100%;
  }

  /* Logo */
  .nav-brand {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
  }
  .nav-brand img {
    width: 30px;
    height: 30px;
  }

  /* Supprimer le spacer */
  .nav-spacer {
    display: none;
  }

  /* Menu : occupe toute la largeur restante */
  #navigation .nav-menu {
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 0;
    padding: 0 4px;
    list-style: none;
    gap: 0;
  }

  /* Items passifs (flex gère tout) */
  #navigation .nav-menu > li {
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
  }

  /* Liens compacts */
  #navigation .nav-link {
    position: relative;
    display: inline-block;

    font-size: 0.8rem;
    white-space: nowrap;
    line-height: 1.1;

    padding-left: 0.2rem; /* place pour le trait */
  }

  /* Trait bleu : seulement au tap / focus */
  #navigation .nav-link::before {
    background-color: transparent;
    height: 1em;
  }
  #navigation .nav-link:active::before,
  #navigation .nav-link:focus-visible::before {
    background-color: var(--color-arc-blue);
  }
}