/*
 * One application navigation shell.
 *
 * This file is intentionally loaded after every screen stylesheet.  Several
 * reference screens used to redefine the header dimensions, logo and gaps;
 * those local rules made the navigation jump while moving through the app.
 * The public Home header is the canonical geometry for every app screen.
 */
.platform[class] .pheader {
  position: relative;
  z-index: var(--z-header);
  width: 100%;
  height: 80px !important;
  min-height: 80px !important;
  padding: 0 !important;
  border: 0;
  background: var(--gradient-header);
  color: var(--color-white);
}

.platform[class] .pheader > div {
  width: 100%;
  max-width: none !important;
  height: 80px !important;
  min-height: 80px !important;
  margin: 0 !important;
  padding: 0 clamp(24px, 4vw, 80px) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(24px, 3vw, 52px);
}

.platform[class] .pheader .plogo {
  order: 0;
  flex: 0 0 220px;
  width: 220px !important;
  height: 62px !important;
  min-width: 220px;
  display: flex;
  align-items: center;
}

.platform[class] .pheader .festime-official-logo {
  width: 220px !important;
  height: 62px !important;
  max-width: 100%;
  background-color: transparent;
  background-image: url('/assets/festime-logo-silver.webp');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  border-radius: 0;
}

.platform[class] .pheader-nav {
  order: 1;
  align-self: stretch;
  height: 80px !important;
  min-height: 80px;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(22px, 2.1vw, 38px);
  margin: 0 !important;
}

.platform[class] .pheader-nav > a {
  position: relative;
  height: 80px !important;
  min-height: 80px;
  padding: 0 !important;
  border: 0;
  display: flex;
  align-items: center;
  color: var(--color-on-dark);
  font-size: var(--font-size-sm) !important;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.platform[class] .pheader-nav > a.active::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0 !important;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--color-brand-accent);
}

.platform[class] .pheader-tools {
  order: 2;
  flex: 0 0 auto;
  height: 80px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 14px !important;
}

.platform[class] .pheader-tools .icon-button,
.platform[class] .pheader-tools .pmenu {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-round);
  color: var(--color-white);
}

.platform[class] .pheader-tools .icon-button:hover,
.platform[class] .pheader-tools .icon-button:focus-visible,
.platform[class] .pheader-tools .pmenu:hover,
.platform[class] .pheader-tools .pmenu:focus-visible {
  background: #ffffff12;
}

.platform[class] .pheader-tools .icon-button .icon,
.platform[class] .pheader-tools .pmenu .icon {
  width: 21px;
  height: 21px;
}

.platform[class] .pheader .puser {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--color-white);
  white-space: nowrap;
}

.platform[class] .pheader .puser > span:last-child {
  font-size: var(--font-size-sm);
}

.platform[class] .pheader .navigation-avatar,
.platform[class] .pheader .pavatar,
.platform[class] .pheader .initial-avatar {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px;
  border-radius: var(--radius-round);
}

.platform[class] .pheader .locale-form {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
}

.platform[class] .pheader .locale-form select {
  width: 54px;
  height: 34px;
  padding: 0 7px;
  border: 1px solid #3b4969;
  border-radius: 7px;
  background: #172543;
  color: var(--color-white);
  font-size: var(--font-size-2xs);
}

/* Dashboard retains its useful side rail, but no longer repeats the logo. */
.platform.screen-dashboard .dash-brand { display: none; }
.platform.screen-dashboard .dash-topbar { display: none; }
.platform.screen-dashboard .filmmaker-dashboard { min-height: calc(100svh - 80px); }
.platform.screen-dashboard .dash-sidebar {
  top: 80px;
  min-height: calc(100svh - 80px);
}

@media (max-width: 1200px) {
  .platform[class] .pheader > div {
    padding-inline: var(--space-6) !important;
    gap: var(--space-5);
  }
  .platform[class] .pheader .plogo {
    flex-basis: 180px;
    width: 180px !important;
    min-width: 180px;
    height: 54px !important;
  }
  .platform[class] .pheader .festime-official-logo {
    width: 180px !important;
    height: 54px !important;
  }
  .platform[class] .pheader-nav { gap: 18px; }
  .platform[class] .pheader-nav > a { font-size: var(--font-size-xs) !important; }
  .platform[class] .pheader .puser > span:last-child,
  .platform[class] .pheader .locale-form { display: none; }
}

@media (max-width: 900px) {
  .platform[class] .pheader > div { justify-content: space-between; }
  .platform[class] .pheader-nav { display: none; }
  .platform[class] .pheader-nav.open {
    position: absolute;
    inset: 80px 0 auto;
    z-index: var(--z-overlay);
    height: auto !important;
    min-height: 0;
    padding: 12px 24px 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 18px;
    background: #101d39;
    box-shadow: var(--shadow-dropdown);
  }
  .platform[class] .pheader-nav.open > a {
    height: 44px !important;
    min-height: 44px;
    justify-content: center;
  }
  .platform[class] .pheader-nav.open > a.active::after { bottom: 3px !important; }
  .platform[class] .pheader-tools .pmenu { display: grid; }
}

@media (max-width: 600px) {
  .platform[class] .pheader {
    height: 68px !important;
    min-height: 68px !important;
  }
  .platform[class] .pheader > div {
    height: 68px !important;
    min-height: 68px !important;
    padding-inline: var(--space-4) !important;
    gap: var(--space-2);
  }
  .platform[class] .pheader .plogo {
    flex-basis: 145px;
    width: 145px !important;
    min-width: 145px;
    height: 48px !important;
  }
  .platform[class] .pheader .festime-official-logo {
    width: 145px !important;
    height: 48px !important;
  }
  .platform[class] .pheader-tools {
    height: 68px;
    gap: 5px !important;
  }
  .platform[class] .pheader-tools .icon-button:first-child,
  .platform[class] .pheader .puser { display: none; }
  .platform[class] .pheader-tools .icon-button,
  .platform[class] .pheader-tools .pmenu {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }
  .platform[class] .pheader-nav.open {
    inset-block-start: 68px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 10px 16px 16px;
  }
  .platform.screen-dashboard .filmmaker-dashboard { min-height: calc(100svh - 68px); }
  .platform.screen-dashboard .dash-sidebar { top: 68px; }
}

@media (max-width: 370px) {
  .platform[class] .pheader .plogo {
    flex-basis: 132px;
    width: 132px !important;
    min-width: 132px;
  }
  .platform[class] .pheader .festime-official-logo { width: 132px !important; }
}

/* Mobile : le menu latéral du tableau de bord ne doit pas occuper toute la hauteur de l'écran. */
@media (max-width: 900px) {
  .platform.screen-dashboard .dash-sidebar {position: static; top: auto; min-height: 0; height: auto;}
}

/* Conflit d’intérêts : panneau repliable, discret au-dessus de l’évaluation. */
.jury-conflict-panel{padding:12px 18px}
.jury-conflict-panel>summary{cursor:pointer;list-style:none;font-size:var(--font-size-base);color:#5b21b6}
.jury-conflict-panel>summary::-webkit-details-marker{display:none}
.jury-conflict-panel>summary::before{content:"⚠ ";}
.jury-conflict-panel[open]>summary{margin-bottom:var(--space-2)}
/* Header sign-out (real accounts must not depend on the validation bar). */
.platform[class] .pheader-tools .header-logout{display:contents}
.platform[class] .pheader-tools .header-logout .icon-button{background:transparent;cursor:pointer}
@media (max-width:520px){.platform[class] .pheader-tools .header-logout{display:none}}
/* Language switch inside the mobile menu (the header selector is hidden at <=600px). */
.platform[class] .pheader-nav .locale-form-mobile{display:none}
@media (max-width:600px){
 .platform[class] .pheader-nav.open .locale-form-mobile{display:flex;grid-column:1/-1;justify-content:center;align-items:center;gap:8px;padding:8px 0 12px}
 .platform[class] .pheader-nav.open .locale-form-mobile select{height:38px;min-width:150px;border-radius:10px;border:1px solid #ffffff40;background:var(--color-navy-950);color:var(--color-white);padding:0 10px;font-size:14px}
 .platform[class] .pheader-nav.open .locale-form-mobile button{height:38px;min-width:44px;border-radius:10px;border:0;background:var(--color-purple-500);color:var(--color-white);font-weight:700}
}
