/* Barre supérieure, navigation, pages et onglets mobiles. */
#appli {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
#appli .page {
  flex: 1;
}
.barre {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--barre-fond);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.barre.collee {
  border-bottom-color: var(--trait);
}
.barre .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: var(--h-barre);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
  cursor: pointer;
}
.sceau {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--pin);
  display: grid;
  place-items: center;
  flex: none;
}
.sceau svg {
  width: 18px;
  height: 18px;
  stroke: var(--sur-pin);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.logo .nom {
  font-family: var(--serif);
  font-size: 20px;
  white-space: nowrap;
}
.onglets {
  display: flex;
  gap: 3px;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 999px;
  padding: 3px;
}
.onglets a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--gris);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 17px;
  border-radius: 999px;
  transition:
    background var(--t),
    color var(--t);
  white-space: nowrap;
  cursor: pointer;
}
.onglets a:hover {
  color: var(--encre);
}
.onglets a.actif {
  background: var(--pin);
  color: var(--sur-pin);
}
.pastille {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--canvas);
  color: var(--gris);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
}
.onglets a.actif .pastille {
  background: rgba(127, 127, 127, 0.28);
  color: var(--sur-pin);
}
.barre-droite {
  display: flex;
  align-items: center;
  gap: 10px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--pin-pale);
  color: var(--pin);
  border: 1px solid var(--trait);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition:
    box-shadow var(--t),
    border-color var(--t);
}
.avatar:hover,
.avatar.actif {
  border-color: var(--pin);
  box-shadow: var(--ombre);
}
.hors-ligne {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ambre);
  background: var(--ambre-pale);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
}

.page {
  display: none;
  padding: clamp(24px, 4vw, 42px) 0 60px;
  animation: entre 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.page.visible {
  display: block;
}
@keyframes entre {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.tete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}
.tete .aide {
  font-size: 14.5px;
  color: var(--gris);
  max-width: 50ch;
  margin-top: 9px;
}
.tete-outils {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.onglets-bas {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--barre-fond);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--trait);
  padding-bottom: env(safe-area-inset-bottom);
}
.onglets-bas a {
  flex: 1;
  text-decoration: none;
  color: var(--gris-clair);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 9px;
  font-size: 11px;
  font-weight: 500;
  position: relative;
  cursor: pointer;
}
.onglets-bas a svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.onglets-bas a.actif {
  color: var(--pin);
}
.onglets-bas .bulle {
  position: absolute;
  top: 5px;
  left: 50%;
  margin-left: 5px;
  background: var(--pin);
  color: var(--sur-pin);
  font-family: var(--mono);
  font-size: 9.5px;
  border-radius: 999px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* Écran de connexion */
.connexion {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.connexion .carte-connexion {
  width: 100%;
  max-width: 420px;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-xl);
  padding: clamp(26px, 5vw, 40px);
  box-shadow: var(--ombre);
}
.connexion .logo {
  justify-content: center;
  margin-bottom: 18px;
  cursor: default;
}
.connexion h1 {
  text-align: center;
  font-size: 30px;
  margin-bottom: 6px;
}
.connexion .note {
  text-align: center;
  color: var(--gris);
  font-size: 14px;
  margin-bottom: 26px;
}
.connexion form {
  display: grid;
  gap: 18px;
}
.connexion .btn {
  width: 100%;
}
.erreur-formulaire {
  color: var(--ambre);
  background: var(--ambre-pale);
  border-radius: var(--r-m);
  padding: 10px 14px;
  font-size: 14px;
}
