/* =========================
   FIL D'ARIANE
========================= */

.breadcrumb-bar {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  padding: 6px 12px;
  margin: 0;
}

.breadcrumb-left {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 12px;
}

.breadcrumb-search{
  display:flex;
  align-items:center;
  flex:0 1 260px;
  min-width:180px;
}

.search-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:100%;
  min-height:42px;
  padding:0 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(15,23,42,.12);
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}

.search-input{
  width:100%;
  min-width:0;
  border:0;
  background:transparent;
  color:#0f172a;
  font-size:14px;
}

.search-input:focus{
  outline:none;
}

.search-ico{
  flex:0 0 auto;
}

.desktop-breadcrumb-trail{
  display:flex;
  align-items:center;
  min-width:0;
  flex:1;
  white-space:nowrap;
}

.breadcrumb-left a {
  color: #0077cc;
  text-decoration: none;
  margin-right: 6px;
}

.breadcrumb-left .courant {
  font-weight: 700;
  background: #e8f2ff;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Login desktop */
.breadcrumb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: normal;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.account-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-avatar-btn {
  min-height: 42px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 999px;
  background: #fff;
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.account-avatar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,.12);
}

.account-avatar-btn:focus-visible {
  outline: 3px solid rgba(37,99,235,.35);
  outline-offset: 2px;
}

.account-avatar-btn[aria-expanded="true"] {
  background: #111827;
  color: #fff;
}

.account-avatar-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.account-avatar-label {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 16px;
  box-shadow: 0 22px 48px rgba(15,23,42,.18);
  display: grid;
  gap: 4px;
  padding: 8px;
  z-index: 4500;
}

.account-dropdown[hidden] {
  display: none !important;
}

.account-dropdown-item {
  color: #1f2937;
  display: block;
  border-radius: 10px;
  padding: 9px 11px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.account-dropdown-item:hover,
.account-dropdown-item:focus-visible {
  background: rgba(37,99,235,.08);
  color: #0f172a;
  outline: none;
}

.account-dropdown-item--danger {
  color: #b91c1c;
}

.mobile-account-menu-item {
  list-style: none;
}

.mobile-search-menu-item {
  list-style: none;
  padding: 10px 12px 4px;
}

.mobile-search-menu-item .search-pill {
  min-height: 40px;
  box-shadow: none;
}

.account-menu-wrap--mobile {
  display: block;
  width: 100%;
  padding: 10px 8px;
  box-sizing: border-box;
  color: #fff;
}

.account-mobile-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.account-mobile-title {
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-mobile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.account-menu-wrap--mobile .account-dropdown-item {
  background: rgba(255,255,255,.08);
  color: #fff;
  padding: 8px 10px;
}

.account-menu-wrap--mobile .account-dropdown-item:hover,
.account-menu-wrap--mobile .account-dropdown-item:focus-visible {
  background: rgba(255,255,255,.16);
  color: #fff;
}

.account-menu-wrap--mobile .account-dropdown-item--danger {
  color: #fecaca;
}

/* =========================
   DESKTOP
========================= */

.desktop-only {
  display: flex;
}

@media (min-width: 901px) {
  .menu-top.mobile-only {
    display: none;
  }
  .breadcrumb-bar {
    position: relative;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    gap:14px;
    justify-content:space-between;
  }

  .desktop-header-nav{
    position:relative;
    flex:0 0 auto;
  }

  .desktop-header-burger{
    width:44px;
    height:44px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:12px;
    background:#fff;
    color:#111827;
    font-size:22px;
    line-height:1;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    box-shadow:0 6px 18px rgba(15,23,42,.10);
    transition:background .2s ease, color .2s ease, box-shadow .2s ease, transform .2s ease;
  }

  .desktop-header-burger:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 24px rgba(15,23,42,.14);
  }

  .desktop-header-burger[aria-expanded="true"]{
    background:#111827;
    color:#fff;
  }

  .desktop-header-menu{
    position:absolute;
    top:calc(100% + 10px);
    left:0;
    width:min(430px, 42vw);
    background:#fff;
    border:1px solid rgba(15,23,42,.12);
    border-radius:18px;
    box-shadow:0 24px 52px rgba(15,23,42,.20);
    z-index:4000;
  }

  .desktop-header-menu[hidden]{
    display:none !important;
  }

  .desktop-header-menu-body{
    padding:12px;
    max-height:min(72vh, 640px);
    overflow:auto;
  }

  .desktop-header-menu .desktop-burger-nav{
    list-style:none;
    display:grid;
    gap:10px;
    margin:0;
    padding:0;
  }

  .desktop-header-menu .desktop-burger-nav > li{
    border:1px solid rgba(15,23,42,.08);
    border-radius:14px;
    background:rgba(248,250,252,.96);
    overflow:hidden;
    text-align:left;
  }

  .desktop-header-menu .desktop-burger-nav .menu-icon,
  .desktop-header-menu .desktop-burger-nav .submenu-toggle,
  .desktop-header-menu .desktop-burger-nav .back,
  .desktop-header-menu .desktop-burger-nav .mobile-only{
    display:none !important;
  }

  .desktop-header-menu .desktop-burger-nav .menu-link{
    color:#111827;
    display:flex;
    align-items:center;
    padding:12px 14px;
    font-size:15px;
    font-weight:800;
    text-decoration:none;
  }

  .desktop-header-menu .desktop-burger-nav .menu-link:hover{
    background:rgba(59,130,246,.08);
  }

  .desktop-header-menu .desktop-burger-nav .sous{
    display:block;
    position:static;
    top:auto;
    left:auto;
    transform:none;
    min-width:0;
    background:transparent;
    list-style:none;
    border-top:1px solid rgba(15,23,42,.08);
    padding:8px 0 10px;
    z-index:auto;
  }

  .desktop-header-menu .desktop-burger-nav .sous li{
    text-align:left;
  }

  .desktop-header-menu .desktop-burger-nav .sous li a{
    display:block;
    padding:8px 14px 8px 28px;
    color:#334155;
    text-decoration:none;
    font-size:14px;
  }

  .desktop-header-menu .desktop-burger-nav .sous li a:hover{
    background:rgba(59,130,246,.08);
    color:#0f172a;
  }

  .breadcrumb-left{
    flex:1 1 auto;
    min-width:0;
  }

  .desktop-breadcrumb-trail{
    min-width:0;
    overflow:hidden;
    white-space:nowrap;
  }

  .desktop-breadcrumb-trail a,
  .desktop-breadcrumb-trail .courant{
    flex:0 0 auto;
  }

  body.structure-program_standard .desktop-header-menu .desktop-burger-nav,
  body.structure-program_full .desktop-header-menu .desktop-burger-nav,
  body.structure-ciel_like .desktop-header-menu .desktop-burger-nav{
    width:100%;
    justify-content:stretch;
    justify-items:stretch;
    align-items:stretch;
  }

  body.structure-program_standard .desktop-header-menu .desktop-burger-nav > li,
  body.structure-program_full .desktop-header-menu .desktop-burger-nav > li,
  body.structure-ciel_like .desktop-header-menu .desktop-burger-nav > li{
    width:100%;
    margin:0;
    justify-self:stretch;
  }

  body.structure-program_standard .desktop-header-menu .desktop-burger-nav .menu-link,
  body.structure-program_full .desktop-header-menu .desktop-burger-nav .menu-link,
  body.structure-ciel_like .desktop-header-menu .desktop-burger-nav .menu-link,
  body.structure-program_standard .desktop-header-menu .desktop-burger-nav .sous li,
  body.structure-program_full .desktop-header-menu .desktop-burger-nav .sous li,
  body.structure-ciel_like .desktop-header-menu .desktop-burger-nav .sous li,
  body.structure-program_standard .desktop-header-menu .desktop-burger-nav .sous li a,
  body.structure-program_full .desktop-header-menu .desktop-burger-nav .sous li a,
  body.structure-ciel_like .desktop-header-menu .desktop-burger-nav .sous li a{
    text-align:left;
  }

  .breadcrumb-right .breadcrumb-search{
    order:1;
    flex:0 1 clamp(180px, 20vw, 250px);
    min-width:160px;
  }

  .breadcrumb-right{
    margin-left:auto;
    min-width:0;
    flex:0 1 auto;
    flex-wrap:nowrap;
  }

  .bia-game-desktop-slot{
    min-width:0;
    max-width:100%;
    order:3;
    flex:0 1 auto;
  }

  .breadcrumb-right .account-menu-wrap{
    order:2;
    flex:0 0 auto;
  }

  .account-avatar-label{
    max-width:88px;
  }

  .breadcrumb-left a:not(:last-of-type)::after {
    content: "›";
    margin-left: 6px;
    color: #999;
  }
}

@media (max-width: 1180px) and (min-width: 901px){
  .breadcrumb-right .breadcrumb-search{
    flex-basis:190px;
    min-width:150px;
  }

  .account-avatar-label{
    max-width:72px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 900px) {

  .desktop-only {
    display: none;
  }

  .menu-top.mobile-only {
    display: flex;
    align-items: center;
    gap: 0.6em;
  }

  .breadcrumb-bar {
    background: none;
    padding: 0;
    flex: 1;
    min-width: 0;
  }

  .breadcrumb-search{
    display:none;
  }

  /* masquer étapes intermédiaires */
  .breadcrumb-left a {
    display: none;
  }

  .breadcrumb-left .courant {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
  }
}

