:root {
  --main-bg-color: RGBA(0, 0, 255, 0.50);
}

/* =====================
   Styles communs (mobile par défaut)
   ===================== */
* {
  transition: background-color 0.5s ease-out;
}
body {
  font-family: "Poppins", sans-serif;
  margin: auto;
  height: 100%;
}

html {
height: 100%;
margin: 0;
background-color:#EDEDED ;

}

body {
display: flex;
flex-direction: column;
}

header {
height: 65px; /* hauteur fixe */
background-color: transparent;
}

main {
flex: 1; /* prend tout l'espace restant */
padding-right: 15px;

}

footer {
height: auto; /* 100px ou auto */
background-color: black;
color: #888888;
padding-left: 20px;
a {
  font-weight: bold;
  color: white;
  &:hover {
    color: rgb(196, 196, 255);
    }
  }
}

#banner img {
  max-width: 1024px;
}

.mobile-banner {
  float: right;
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  margin: 5px;
}

.mobile-banner img {
  display: inline;
  height: 40px;
}

.mobile-banner .PUCE-logo {
  height: 35px;
}

.mobile-banner .chessmooc-logo {
  height: 45px;
}

h1 {
  font-size: 1.5em;
  font-weight: bold;
  margin-top: 20px;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 10px;
  margin-bottom: 10px;
}

main a {
  text-shadow: #ffcc00 1px 0 15px;
  font-weight: bold;
  &:hover {
     text-shadow: #ffcc00 1px 0 3px;
  }
}

/* Banner mobile */
#banner {
  display: none;
}

form label {
  display: block;
  color : #4287f5;
  font-weight: bold;
}

input, textarea{
    font-size: 1.3em;
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    display: inline;
    border: 1px solid #ccc;
    border-radius: 4px;
}

label.checkbox {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 6px;
}

input[type=submit] {
    width: 100%;
    background-color: #4287f5;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    &:hover{
      background-color: #3068c2;
    }
}

nav {
  background: black;
  padding: 0 20px;
  position: relative;
  top: 0;
  z-index: 2;
  width: 65px;
  padding-bottom: 0;
  margin: 5px;
  z-index: 10000;
}

.menu {
  list-style: none;
  display: none;
  flex-direction: column;
  width: 200px;
  background: black;
}

.menu li {
  position: relative;
  width: 100%;
}

.menu li:last-child {
  margin-left: auto;
}

.menu a {
  display: block;
  padding: 10px 20px;
  color: #d6d6d6;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.3s, color 0.3s;
  height: 40px;
  text-shadow:none ;
  font-weight: normal;
}
.PUCE-footer {
  padding-left: 20px;
  background-color: black;
  color: gray;
}
.PUCE-footer a {
  text-shadow:none ;
  font-weight: bold;
  color: white;
}

/* Hover commun */
.menu li:hover > a {
  background-color: black;
  color: #ffffff;
}

.submenu a:hover {
  background-color: #474747;
  color: #ffffff;
}

/* Submenus mobile */
.submenu,
.submenu-right {
  display: none;
  position: static;
  background: black;
  list-style: none;
  padding-left: 20px;
}

/* Affichage des sous-menus au survol */
.menu li:hover > .submenu,
.submenu li:hover > .submenu-right {
  display: block;
}

/* Indicateurs dropdown mobile */
.submenu .dropdown > a::after {
  content: "▸";
  float: right;
}

.submenu .dropdown:hover > a::after {
  content: "▼";
}

/* Hamburger */
.hamburger {
  display: block;
  font-size: 26px;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 10px;
}

#menu-toggle {
  display: none;
}

#menu-toggle:checked + label + ul {
  display: flex;
}

/* Layout mobile */

.PUCE-footer {
  margin: 0;
  width: 100%;
}

.cent_block_800 {
  margin-left: 5px;
  width: 100%;
}

button {
    margin-bottom: 5px;
    border : 2px solid blue;
    border-radius: 5px;
    background: rgb(168, 168, 255);
    padding: 5px;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    a {
      font-weight: normal;
      text-shadow: none;
    }
    &:hover {
      background: rgb(135, 135, 253);
      box-shadow: 0px 0px 10px #888888;
    }
    &:disabled {
      background: rgb(193, 193, 193);
      border : 2px solid rgb(167, 167, 167);
      color: #9d9d9d;
      box-shadow: none;
    }
}

.legal {
  font-size: 0.8em;
  a {
    font-weight: normal;
    color: #888888;
  }
}

/* =====================
   Desktop uniquement
   ===================== */

@media (min-width: 769px) {

  body {
    width: 1024px;
  }

  #banner {
    display: block;
  }


  header {
    height: 188px; /* hauteur fixe */

  }
  nav {
    background: var(--main-bg-color);
    width: 100%;
    padding: 0 20px;
    top: -40px;
    margin: 0;
  }

  .menu {
    display: flex;
    flex-direction: row;
    width: auto;
    background: none;
    flex-wrap: wrap;
  }

  /* Submenus desktop */
  .submenu,
  .submenu-right {
    display: none;
    position: absolute;
    min-width: 160px;
    z-index: 100;
    padding-left: 0;
  }

  .mobile-banner {
    display: none;
  }
  
  .menu li {
    width: auto;
  }

  .menu li:hover > .submenu {
    display: block;
    top: 100%;
    left: 0;
  }

  .submenu li:hover > .submenu-right {
    display: block;
    top: 0;
    left: 100%;
  }

  .hamburger,
  #menu-toggle {
    display: none;
  }
  .cent_block_800{
    margin:auto;
    margin-top: 20px;
    max-width: 800px;
    padding-left: 20px;
  }

  .cent_block_1024{
    margin:auto;
    max-width: 1024px;
    padding-left: 20px;
  }
}