/* --- RESET --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #f9f9f9;
  --black: #36383f;
  --grey: #85888c;
  --yellow: #ff0;
}

body {
  background-color: var(--white);
  font-family: Poppins, sans-serif;
}

ul { list-style: none; }

/* --- HEADER --- */
.header {
  display: flex;
  align-items: center;
  background-color: #8d8d8c;
  box-shadow: 1px 1px 5px 0 var(--grey);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  height: 70px;
}

/* --- LOGO --- */
.logo {
  display: flex;
  align-items: center;
  height: 100%;
  margin-top: 7px;
  padding-left: 3em;
}
.logo img {
  width: 130px;
  height: 61px;
}

/* --- TEL MENU --- */
.telmenu {
  display: flex;
  align-items: center;
  margin-top: 0;
  padding-left: 20px;
}
.lientelmenu {
  color: var(--yellow);
  font-size: 1em;
  font-weight: 600;
  text-decoration: none;
}

/* --- NAVIGATION --- */
.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}
.menu {
  display: flex;
}
.menu li {
  position: relative;
  margin-left: 20px;
}

/* --- LINKS --- */
.menu a {
  display: flex;
  align-items: center;
  position: relative; /* pour le ::before */
  height: 70px;       /* hauteur FIXE */
  padding: 0 25px;
  color: #fff;
  font-size: 0.9em;
  font-weight: 600;   /* stable, pas de changement */
  text-decoration: none;
  border-bottom: 2px solid transparent; /* espace réservé */
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}

.menu a:hover {
  background-color: #fff;
  color: #000;
  border-bottom: 2px solid #000;
}

.menu a.active {
  color: var(--yellow);
  border-bottom: 2px solid var(--yellow);
}

/* --- INDICATEUR (petit carré à gauche) --- */
.menu a::before {
  content: "";
  position: absolute;
  left: 5px;
  width: 6px;
  height: 6px;
  background-color: #fff;
  border-radius: 2px;
}

/* --- HAMBURGER --- */
.hamb {
  margin-left: auto;
  cursor: pointer;
  padding: 0;
  display: none;
}
.hamb-line {
  background: var(--white);
  display: block;
  height: 2px;
  position: relative;
  width: 24px;
}
.hamb-line::after,
.hamb-line::before {
  background: var(--white);
  content: "";
  display: block;
  height: 100%;
  position: absolute;
  transition: 0.2s ease-out;
  width: 100%;
}
.hamb-line::before { top: 5px; }
.hamb-line::after { top: -5px; }

.side-menu { display: none; }
.side-menu:checked ~ nav { max-height: 100%; }
.side-menu:checked ~ .hamb .hamb-line { background: none; }
.side-menu:checked ~ .hamb .hamb-line::before {
  transform: rotate(-45deg);
  top: 0;
}
.side-menu:checked ~ .hamb .hamb-line::after {
  transform: rotate(45deg);
  top: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) and (orientation: portrait) {
  .menu, .nav {
    flex-direction: column;
  }
  .hamb, .side-menu:checked ~ .nav .close-menu {
    display: block;
  }
  .hamb { padding-right: 1em; }
  .nav {
    display: none;
    padding-top: 20px;
    align-items: flex-start;
    justify-content: flex-start;
  }
  .menu a {
    height: auto; /* liens plus petits en mobile */
    padding: 12px 20px;
  }
  .logo { padding-left: 1em; }
  .lientelmenu {
    font-size: 1em;
    font-weight: 800;
  }
  .side-menu:checked ~ .nav {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--black);
    z-index: 999;
    margin-top: 70px;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1200px) and (orientation: landscape) {
  .nav, .side-menu:checked ~ .nav {
    position: fixed;
    left: 0;
    background-color: var(--black);
    z-index: 999;
  }
  .menu, .nav { width: 100%; }
  .hamb { display: block; padding-right: 1em; }
  .nav {
    display: none;
    padding-top: 50px;
    bottom: 0;
    flex-direction: row;
    align-items: flex-start;
    height: auto;
  }
  .logo { padding-left: 1em; }
  .side-menu:checked ~ .nav {
    display: flex;
    top: 0;
    width: 100vw;
    height: 100vh;
    margin-top: 70px;
  }
  .menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  .menu a {
    padding: 10px 20px;
    font-size: 0.95em;
    flex: 0 1 auto;
    text-align: center;
    white-space: nowrap;
  }
    .lientelmenu {
    font-size: 1em;
    font-weight: 800;
  }
}

/* --- TRES PETIT ECRAN --- */
@media (max-width:600px) {
.menu a {
    background-color: transparent !important;
    height: auto !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding-top:30px;
  }

  /* remettre le jaune pour le lien actif */
  .menu a.active {
    color: var(--yellow) !important;
  }

  .lientelmenu {
    font-size: 1em;
    font-weight: 800;
  }

}
