/* navigation.css — styles CSVE organisés par responsabilité. */

/* CSVE · Navigation joueur et coach */

@media (prefers-reduced-transparency: reduce) {

  .bottom, .coach-nav {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bottom.ios27-liquid-glass-me {
    background: var(--glass-nav-surface);
  }

}

@media (prefers-contrast: more) {

  .bottom, .coach-nav {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .bottom.ios27-liquid-glass-me {
    background: var(--glass-nav-surface);
  }

}
.coach-nav button, .bottom button {
  transition: transform .14s ease, background-color .14s ease, border-color .14s ease, color .14s ease;
  -webkit-tap-highlight-color: transparent;
}

.coach-nav button:active, .bottom button:active {
  transform: scale(.97);
}

.bottom {
  position: fixed;
  z-index: 10;
  bottom: env(safe-area-inset-bottom, 0px);
  left: env(safe-area-inset-left, 0px);
  right: env(safe-area-inset-right, 0px);
  display: flex;
  justify-content: center;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-glass);
  transition: transform .28s ease, opacity .2s ease;
}

.bottom div {
  display: flex;
  width: min(100%, 520px);
  justify-content: center;
  gap: .35rem;
}

.nav {
  border: 1px solid transparent;
  padding: 0.28rem 0.2rem;
  background: var(--glass-nav-control-surface);
  box-shadow: none;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-shadow: none;
}

.nav span {
  display: block;
  font-size: 1.1rem;
}

.bottom .nav.active {
  border-color: transparent;
  background: transparent;
  color: var(--green);
  box-shadow: none;
}

.bottom .nav.active::after {
  display: block;
  width: 18px;
  height: 3px;
  margin-right: auto;
  margin-left: auto;
  margin-top: 2px;
  border-radius: 999px;
  background: var(--green);
  content: "";
}

.bottom .nav {
  flex: 0 0 82px;
  border-radius: 18px;
  min-height: 50px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.bottom .nav:active {
  background: var(--soft);
  color: var(--ink);
}

.bottom .nav.active:active {
  background: color-mix(in srgb, var(--green) 12%, transparent);
}

.bottom.ios27-liquid-glass-me {
  border: 1px solid var(--glass-nav-border);
  background: var(--glass-nav-surface);
  background-image: none;
  box-shadow: var(--glass-nav-shadow);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  backdrop-filter: blur(10px) saturate(1.15);
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .bottom.ios27-liquid-glass-me {
    border-color: var(--glass-nav-border);
    background: var(--paper);
    background-image: none;
    box-shadow: var(--glass-nav-shadow);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 699px) {
  .bottom {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(8px, env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    width: auto;
    padding: 0.35rem 0.45rem;
    border-radius: 999px;
  }

  .bottom.is-scroll-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, calc(100% + 1rem), 0);
  }

  .bottom .nav {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    min-height: 50px;
    border-radius: 999px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  }

  #nav {
    touch-action: none;
    -webkit-touch-callout: none;
  }

  #nav.is-reordering .nav {
    -webkit-user-select: none;
    user-select: none;
    transition: transform .16s ease, opacity .16s ease;
  }

  #nav.is-reordering .nav.is-reordering {
    position: relative;
    z-index: 1;
    opacity: .62;
    transform: scale(.92);
  }
}

.coach-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
  max-width: none;
  margin: 1rem auto;
  padding: 0.3rem;
  border: 1px solid var(--glass-nav-border);
  border-radius: 14px;
  background: var(--glass-nav-surface);
  box-shadow: var(--glass-nav-shadow);
  backdrop-filter: blur(var(--glass-nav-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--glass-nav-blur)) saturate(1.15);
}

.coach-nav button {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  padding: 0.45rem 0.3rem;
  background: transparent;
  color: var(--ink);
  font-size: .75rem;
  font-weight: 800;
}

.coach-nav button.active {
  border: 1px solid var(--glass-control-border);
  background: var(--soft);
  color: var(--green);
  box-shadow: 0 3px 10px rgba(0, 45, 25, .16);
}

.coach-nav button {
  color: var(--ink);
}

.coach-nav button.active {
  color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  .bottom .nav {
    transition: opacity .2s ease, color .2s ease, background-color .2s ease, border-color .2s ease;
  }

  .coach-nav button {
    transition: none;
    transform: none !important;
  }
}

.coach-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: .01em;
  white-space: nowrap;
  font-size: .82rem;
}

@media (max-width:720px) {
  .coach-nav {
    display: flex;
    grid-template-columns: none;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    gap: .12rem;
    margin: .7rem auto;
    padding: .2rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
  .coach-nav::-webkit-scrollbar {
    display: none;
  }
  .coach-nav button {
    flex: 0 0 7rem;
    min-width: 7rem;
    min-height: 44px;
    padding: .25rem .35rem;
    font-size: .75rem;
    line-height: 1;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bottom {
    transition: none;
  }

  .bottom .nav, #nav.is-reordering .nav {
    transition: none;
  }

  .bottom .nav:active {
    transform: none;
  }
}

@media (min-width: 700px) {
  .coach-nav {
    max-width: none;
  }
}

.coach-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.coach-nav button {
  min-height: 44px;
  font-size: .82rem;
}

@media (max-width: 420px) {
  .coach-nav button {
    font-size: .76rem;
  }
}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) and (not (any-pointer: coarse)) {
  body:has(#nav .nav) > .bottom {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 224px;
    height: 100dvh;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5.25rem 1rem 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  body:has(#nav .nav) > .bottom > #nav {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: .25rem;
    pointer-events: auto;
  }

  body:has(#nav .nav) > .bottom .nav {
    display: flex;
    width: 100%;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: .65rem;
    padding: .55rem .7rem;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: .82rem;
    text-align: left;
    text-shadow: none;
  }

  body:has(#nav .nav) > .bottom .nav span {
    display: inline-grid;
    width: 1.35rem;
    place-items: center;
    font-size: 1.05rem;
  }

  body:has(#nav .nav) > .bottom .nav:hover,
  body:has(#nav .nav) > .bottom .nav:focus-visible {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .07);
    color: var(--ink);
  }

  body:has(#nav .nav) > .bottom .nav.active,
  body:has(#nav .nav) > .bottom .nav.active:hover,
  body:has(#nav .nav) > .bottom .nav.active:focus-visible {
    border-color: color-mix(in srgb, var(--green) 48%, transparent);
    background: color-mix(in srgb, var(--green) 15%, transparent);
    color: var(--green);
  }

  body:has(#nav .nav) > .bottom .nav.active::after {
    display: none;
  }
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
}

.app-header .top {
  min-height: clamp(64px, 16.57vw, 110px);
}

.app-header .app-brand {
  position: absolute;
  z-index: 0;
  inset: env(safe-area-inset-top, 0px) 0 0;
  display: block;
  width: 100%;
  height: calc(100% - env(safe-area-inset-top, 0px));
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%, #000 78%, transparent 100%);
  mask-composite: intersect;
}

.app-header .app-brand img {
  position: relative;
  top: 50%;
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-50%) scale(.92);
  transform-origin: center;
}

.app-header .account {
  margin-left: auto;
  position: relative;
  z-index: 1;
}

.account {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 800;
}

.account.ios27-liquid-glass-sm {
  border-color: transparent;
  border-radius: 100px;
  background-color: rgba(var(--ios27-glass-sm-rgb), calc(var(--ios27-glass-sm-alpha) * calc(1.6 + -1.1 * var(--ios27-glass-transparency, .25))));
  background-image: none;
  color: var(--deep);
  box-shadow: var(--ios27-glass-sm-shadow);
}

.account.ios27-liquid-glass-sm:hover,
.account.ios27-liquid-glass-sm:focus-visible {
  border-color: var(--glass-control-border);
}

.account span {
  line-height: 1;
}

@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .account.ios27-liquid-glass-sm {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--paper);
    background-image: none;
    border-color: var(--glass-control-border);
    box-shadow: none;
  }
}

.account-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.95rem;
}

.account-card h2 {
  margin: 0.15rem 0;
  font-size: 1rem;
}
