/* ===== Variables ===== */
:root{
  --nav-h: 92px;               /* hauteur totale navbar */
  --nav-pad-x: 16px;
  --blue: #013d5b;             /* bleu ruban */
  --yellow: #edcb3b;           /* ligne jaune */
  --white: #ffffff;
  --dark: #1a1a1a;
}


/* ===== Conteneur ===== */
.navbar{
  position: relative;
  height: var(--nav-h);
  width: 100%;
  z-index: 1200;
}

/* Bandeau blanc en-dessous (même hauteur) */
.navbar-base{
  position: absolute;
  inset: 0;
  background: rgba(248, 248, 248, 0);
}

/* Ruban bleu par-dessus, avec clip-path + ligne jaune en bas */
.navbar-overlay{
  position: absolute;
  inset: 0;
  background: var(--blue);
  clip-path: polygon(50% 0%, 100% 0, 100% 100%, 93% 100%, 90% 73%, 43% 73%, 10% 73%, 7% 100%, 0 100%, 0 0);
  border-bottom: 5px solid var(--yellow);
}

/* Grille interne: gauche | centre | droite */
.navbar-inner{
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--nav-pad-x);
  color: var(--white);
}

/* Colonnes */
.nav-left{ display:flex; align-items:center; justify-content:flex-start; }
.nav-center{ display:flex; align-items:center; justify-content:center; gap: 12px; text-align:center; margin-bottom: 20px; }
.nav-right{ display:flex; align-items:center; justify-content:flex-end; }

/* Logos */
.brand img{
  height: 90px;
  width: auto;
  display: block;
}
.tournament-logo{
  height: 44px;
  width: auto;
  display: block;
}
.tournament-title{
  margin: 0;
  font-size: clamp(16px, 2.2vw, 24px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .2px;
  color: var(--white);
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
  white-space: nowrap;
}

/* ===== Burger (icône dans le ruban) ===== */
.menu-icon{
  font-size: 50px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  color: var(--white);
  padding: 8px 10px;
  border-radius: 8px;
  transition: background .2s;
}
.menu-icon:hover{
  background: rgba(255, 255, 255, 0.2);
}

/* Checkbox caché (PLACÉ DANS .navbar, hors .navbar-overlay) */
.menu-toggle-visually-hidden{
  position:absolute;
  width:1px; height:1px;
  margin:-1px; padding:0; border:0;
  clip: rect(0 0 0 0);
  overflow:hidden;
}

/* ===== Menu déroulant (PLACÉ DANS .navbar, sibling de .navbar-overlay) ===== */
.navbar > .menu{
  position: absolute;
  top: calc(var(--nav-h) + 8px);   /* juste sous la barre */
  right: 8px;
  min-width: 220px;
  background: var(--white);
  color: var(--dark);
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
  padding: 8px 0;
  display: none;                   /* masqué par défaut */
  z-index: 5000;                   /* au-dessus du ruban et du clip-path */
}

.navbar > .menu ul{
  margin: 0; padding: 0; list-style: none;
}
.navbar > .menu li{}
.navbar > .menu a{
  display: block;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}
.navbar > .menu a:hover{
  background: #f5f7fb21;
}

/* Toggle via le checkbox (frères dans .navbar) */
#menu-toggle:checked ~ .menu{
  display: block;
}



@media (max-width: 520px){
  :root { --nav-h: 70px; } /* navbar plus compacte */
  .navbar-inner{
    grid-template-columns: auto 1fr auto;
    padding: 0;   /* supprime marges gauche/droite */
  }
  .nav-center{
    margin-bottom: 10px;
  }
  .brand img { height: 58px; margin-left: 8px; margin-bottom: 4px; }
  .tournament-logo{ height: 50px; }
  .tournament-title{ font-size: clamp(10px, 3.4vw, 17px); }
  .menu-icon{ font-size: 44px; padding: 6px 8px; margin-right: 8px; margin-bottom: 12px; }

  /* menu plus large/plein écran mobile si souhaité */
  .navbar > .menu{
    
    min-width: 0;
  }

  .navbar-overlay{
    clip-path: polygon(50% 0%, 100% 0, 100% 100%, 85% 100%, 80% 80%, 51% 80%, 20% 80%, 15% 100%, 0 100%, 0 0);
  }
}

/* ===== Bouton Partager  ===== */
.btn-share {
  display: inline-block;          /* plus de full width */
  padding: 8px 18px;
  margin: 10px auto;
  margin-left: 30px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  border-radius: 20px;            /* pastille moderne */
  border: 1px solid #013d5b;
  cursor: pointer;
  color: #013d5b;
  background: #ffffff;
  transition: all .18s ease;
}

.btn-share:hover {
  background: #013d5b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(1,61,91,0.25);
}

.btn-share:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(1,61,91,0.2);
}


/* ===== Mode tablette (entre 521px et 1400px) : navbar plus fine ===== */
@media (min-width: 521px) and (max-width: 1400px) {
  :root { --nav-h: 60px; } /* hauteur réduite */

  .brand img {
    height: 50px;
  }

  .tournament-logo {
    height: 44px;
  }

  .tournament-title {
    font-size: clamp(14px, 2.5vw, 20px);
  }

  .menu-icon {
    font-size: 38px;
    padding: 6px 8px;
  }
}