/* Desktop-down (<=1200px / 75em) */
@media (max-width: 75em) {
  .menu-items li {
    font-size: 0.8rem;
  }

  /* INDEX */
  .home p {
    font-size: 2rem;
  }

  /* ESPACE MEMBRE FORMATIONS */
  .formations-section {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }

  /* WEBINAIRES */
  .tooltiptext {
    left: 0;
    top: calc(100% + 10px);
    transform: none;
    width: min(90vw, 360px);
  } 
}

/* Tablet (<=944px / 59em) */
@media (max-width: 59em) {
  .menu-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  /* EMPLOIS */
  .emplois-infos {
    justify-items: center;
  } 
  
  .emplois-poste,
  .emplois-ville,
  .emplois-employeur {
    text-align: center;
  }

  /* ESPACE MEMBRE FORMATIONS */
  .formations-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* NOTRE CONSEIL */
  .ca-box img {
    height: 360px;
  }

  /* NOTRE MISSION */
  .notremission-text,
  .notremission ul li {
    font-size: 1rem;
  }

  /* EMPLOIS */
  /* ESPACE MEMBRE INFOS GENERALES */
  /* MEMBRE PLAN */  
  /* ON PARLE DE NOUS */
  .audio,
  .membre-plan,
  .emplois-infos,
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  /* WEBINAIRES */
  .tooltiptext {
    left: 10px;
    top: calc(100% + 10px);
    transform: none;
    width: min(90vw, 360px);
  }

  /* Navigation hamburgers (menu mobile) */
  .navbar {
    opacity: 1;
  }

  .navbar-container input[type="checkbox"],
  .navbar-container .hamburger-lines {
    display: block;
  }

  .navbar-container {
    display: block;
    position: relative;
    height: 90px;
  }

  .navbar-container input[type="checkbox"] {
    position: absolute;
    display: block;
    height: 32px;
    width: 30px;
    top: 20px;
    left: 20px;
    z-index: 5;
    opacity: 0;
  }

  .navbar-container .hamburger-lines {
    display: block;
    height: 23px;
    width: 35px;
    position: absolute;
    top: 17px;
    left: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .navbar-container .hamburger-lines .line {
    display: block;
    height: 4px;
    width: 100%;
    border-radius: 10px;
    background: #333;
  }

  .navbar-container .hamburger-lines .line1 {
    transform-origin: 0% 0%;
    transition: transform 0.4s ease-in-out;
  }

  .navbar-container .hamburger-lines .line2 {
    transition: transform 0.2s ease-in-out;
  }

  .navbar-container .hamburger-lines .line3 {
    transform-origin: 0% 100%;
    transition: transform 0.4s ease-in-out;
  }

  .navbar .menu-items {
    padding-top: 100px;
    background: #fff;
    height: 100vh;
    max-width: 300px;
    transform: translate(-150%);
    display: flex;
    flex-direction: column;
    margin-left: -40px;
    padding-left: 50px;
    transition: transform 0.5s ease-in-out;
    box-shadow: 5px 0px 10px 0px #aaa;
  }

  .navbar .menu-items li {
    margin-bottom: 1rem;
    font-size: 0.8rem;
    font-weight: 500;
  }

  .logo {
    position: absolute;
    padding: 0;
    margin: 0;
    top: 5px;
    right: 5px;
  }
  /* Style de base pour les sous-menus */
  .has-submenus {
    position: relative;
  }

  /* Affichage du sous-menu */
  .has-submenus ul {
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    flex-direction: column;
    padding: 10px 0;
    border-radius: 4px;
  }

  /* Afficher le sous-menu au clic ou hover */
  .has-submenus.open ul {
    display: flex;
  }

  /* Les liens du sous-menu */
  .has-submenus ul li {
    font-size: 0.9rem;
  }

  .has-submenus ul li a {
    text-decoration: none;
    color: #333;
    display: block;
    width: 100%;
  }

  .has-submenus ul li a:hover {
    background-color: #f0f0f0;
  }

  .navbar-container input[type="checkbox"]:checked ~ .menu-items {
    transform: translateX(0);
  }

  .navbar-container input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
    transform: rotate(35deg);
  }

  .navbar-container input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
    transform: scaleY(0);
  }

  .navbar-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
    transform: rotate(-35deg);
  }
}

/* Small tablet / large phone (<=704px / 44em) */
@media (max-width: 44em) {
  /* INDEX */
  .home {
    background-size: contain;
  }
  .home p {
    font-size: 2rem;
  }

  /* NOTRE CONSEIL */
  .notreconseil {
    grid-template-columns: 1fr;
  }

  /* ESPACE MEMBRE EMPLOI */
  .grid-2cols {
    display: flex;
    flex-direction: column;
  }

  /* ESPACE MEMBRE FORMATIONS */
  .formations-section {
    grid-template-columns: 1fr;
  }

  /* ESPACE MEMBRE GESTION */
  .infos {
    grid-template-columns: 1fr;
  }

  /* ESPACE MEMBRE LOGIN */
  .login-form {
    display: flex;
    flex-direction: column;
  }

  /* NOTRE MISSION */
  .notremission-ul {
    display: flex;
    flex-direction: column;
  }
  .notremission-ul li {
    font-size: 1rem;
  }
}

/* Phone (<=544px / 34em) */
@media (max-width: 34em) {
  /* FOOTER */
  .footer {
    flex-direction: column;
    gap: 1rem;
    height: 280px;
    text-align: center;
  }
  .footer img {
    height: 15px;
  }

  /* INDEX */
  .home {
    height: 60vh;
  }
  .home p {
    font-size: 1.5rem;
  }

  /* NOTRE CONSEIL */
  .ca-box {
    padding: 1.4rem;
  }
  .ca-box img {
    width: 100%;
    height: auto;
  }
  .container {
    padding: 0 1rem;
  }

  /* OTP START */
  .otp-group input.otp-digit {
    width: 2.8rem;
    height: 3rem;
    font-size: 18px;
  }
  .panel,
  .panel--accent {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* WEBINAIRES */
  .tooltip .tooltiptext {
    max-width: 94vw;
    left: 10px;
    padding: var(--space-2);
    font-size: 0.95rem;
  }
}
