.maincontent {
  padding-top: 40px;
}

/* Pour les menus déroulants en boutton, 
* les hauteurs d'affichages sont identiques aux liens simples 
*/
.w3-top .w3-bar {
  background-color: #202b3b !important; 
  opacity: 1 !important;               
  backdrop-filter: none !important;    
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  height: 70px;
  color: white;
}

/* Bordered form */
form {
  border: 3px solid #f1f1f1;
}

/* Full-width inputs */
input[type="text"],
input[type="password"],
input[type="date"],
input[type="number"] {
  width: 100%;
  padding: 12px 20px;
  margin: 8px 0;
  display: inline-block;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

/* Set a style for all buttons */
button {
  background-color: #04aa6d;
  color: white;
  padding: 14px 20px;
  margin: 8px 0;
  border: none;
  cursor: pointer;
  width: 100%;
}

/* Add a hover effect for buttons */
button:hover {
  opacity: 0.8;
}

/* Extra style for the cancel button (red) */
.cancelbtn {
  width: auto;
  padding: 10px 18px;
  background-color: #f44336;
}

/* Center the avatar image inside this container */
.imgcontainer {
  text-align: center;
  margin: 24px 0 12px 0;
}

/* Avatar image */
img.avatar {
  width: 40%;
  border-radius: 50%;
}

/* Add padding to containers */
.container {
  padding: 16px;
}

/* The "Forgot password" text */
span.psw {
  float: right;
  padding-top: 16px;
}

/* Change styles for span and cancel button on extra small screens */
@media screen and (max-width: 300px) {
  span.psw {
    display: block;
    float: none;
  }
  .cancelbtn {
    width: 100%;
  }
}

/* Style the header with a grey background and some padding */
.header {
  overflow: hidden;
  background-color: #f1f1f1;
  padding: 10px 10px;
}

/* Style the header links */
.header a {
  float: left;
  color: black;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 14px;
  line-height: 20px;
  border-radius: 4px;
}

/* Style the logo link (notice that we set the same value of line-height and font-size to prevent the header to increase when the font gets bigger */
.header a.logo {
  font-size: 14px;
  font-weight: bold;
}
.header a.logo:before {
  position: relative;
  left: -3px;
  top: 10px;
}

/* Change the background color on mouse-over */
.header a:hover {
  background-color: #ddd;
  color: black;
}

/* Style the active/current link*/
.header a.active {
  background-color: dodgerblue;
  color: white;
}

/* Float the link section to the right */
.header-right {
  float: right;
}

/* Add media queries for responsiveness - when the screen is 500px wide or less, stack the links on top of each other */
@media screen and (max-width: 500px) {
  .header a {
    float: none;
    display: block;
    text-align: left;
  }
  .header-right {
    float: none;
  }
}

table {
  width: 100%;
  border: solid 1px darkgray;
}
tr:nth-child(even) {
  background: #ccc;
}
tr:nth-child(odd) {
  background: #fff;
}

.quicksave {
  color: blue;
  font-weight: bold;
}

.left {
  text-align: left;
}
.center {
  text-align: center;
}
.right {
  text-align: right;
}

th.left {
  text-align: center;
}
th.center {
  text-align: center;
}
th.right {
  text-align: center;
}

.small {
  width: 75px;
}

.medium {
  width: 150px;
}

.tdid {
  width: 25px;
  text-align: center;
}

.tabTitle {
  float: left;
  margin-top: 5px;
  margin-bottom: 5px;
  text-align: left;
}

.tabActions,
.tabQuickActions {
  float: right;
  text-align: right;
}

.tabActions {
  margin-top: 5px;
}

.tabQuickActions {
  margin-bottom: 5px;
}

.tabActions input,
.tabQuickActions input {
  background-color: lightgray;
  border-style: double;
}

.tabQuickActions input {
  color: blue;
  border-style: double;
}

.half {
  float: left;
  width: 48%;
  padding: 0 1%;
}

.alertbox {
  opacity: 0.8;
  border-radius: 10px;
  background: lightblue;
  transition: opacity 0.6s;
  position: fixed !important;
  text-align: center;
  min-width: 480px;
  width: auto;
  max-width: 1024px;
  padding-left: 10px !important;
  padding-right: 10px !important;
  word-wrap: break-word;
  
  /* Centrage en haut */
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  
  z-index: 100000;
  max-height: 270px;
  overflow-x: hidden;
  overflow-y: auto;

  /* Animation pour disparaître */
  animation: fadeOut 3.6s forwards; /* 3s visible + 0.6s pour le fondu */

  .closebtn {
    cursor: pointer;
  }
}

@keyframes fadeOut {
  0%, 89% {
    opacity: 0.8; /* reste visible pendant ~5 secondes */
  }
  100% {
    opacity: 0; /* disparaît complètement */
  }
}

/* Responsive pour petits écrans */
@media (max-width: 768px) {
  .alertbox {
    min-width: 90%;
    max-width: 90%;
    left: 5%;
    transform: none;
  }
}

.errorbox {
  background: sandybrown;
}

.messagebox {
  background: lightgreen;
}

.clear {
  clear: both;
  margin: 5px;
}

.bAction {
  font: bold 11px Arial;
  text-decoration: none;
  background-color: #eeeeee;
  color: #333333;
  padding: 2px 6px 2px 6px;
  border-top: 1px solid #cccccc;
  border-right: 1px solid #333333;
  border-bottom: 1px solid #333333;
  border-left: 1px solid #cccccc;
}

/* Réduire l'espacement dans le footer */
footer p,
footer a.w3-medium {
  margin: 1px 0;
}