/* Base Layout */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Montserrat, sans-serif;
    background-color:#CAD3ED;
    background-image:
        linear-gradient(45deg, rgba(202, 211, 237, 0.65), rgba(155, 177, 224, 0.65)),
        url("/static/icon.png"),
        url("/static/icon.png"),
        linear-gradient(45deg, #CAD3ED, #9BB1E0);
    background-size:
        cover,
        80vh 80vh,
        80vh 80vh,
        cover;
    background-position:
        center,
        left -40vh center,
        right -40vh center,
        center;
    background-repeat:
        no-repeat,
        no-repeat,
        no-repeat,
        no-repeat;
    background-attachment:
        fixed,
        fixed,
        fixed,
        fixed;
    color: #5a6aa5;
}

small, p {
  font-family: 'JetBrains Mono', monospace;
}

.wrapper {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background-color: #F3BEB8;
  background-image: linear-gradient(90deg,#F3BEB8, #f7a29a);
  color: #809df2;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid black;
  height: 60px;
}

.navbar-left {
  display: flex;
  align-items: center;
}

.navbar-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.navbar-accueil .dropbtn {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Make the “home-only” dropdown content align like the others */
.navbar-accueil .dropdown-content {
  min-width: 180px;
}

.logo {
  height: 70px;
  margin-left: 10px;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropbtn {
  background-color: #F3BEB8;
  color: #5a6aa5;
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  left: 0;
  background-color: #F3BEB8;
  min-width: 160px;
  z-index: 1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.dropdown-content a {
  color: #5a6aa5;
  padding: 12px 16px;
  display: block;
  text-decoration: none;
}

.dropdown-content a:hover {
  background-color: #f3d3b8;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Content */
.container {
  flex: 1;
  padding: 1rem;
}

/* Conteneur global */
.messages {
  position: sticky;
  top: 80px;
  z-index: 9999;

  margin: 1.5rem auto;
  max-width: 800px;
  padding: 0 1rem;

  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  pointer-events: none;
}

/* Style de base */
.message {
  pointer-events: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 1rem 1.5rem;
  border-radius: 8px;

  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;

  box-shadow: 0 2px 6px rgba(0,0,0,0.15);

  animation: slideDown 0.25s ease-out;
}

.message-text {
  flex: 1;
}

.message-close {
  border: none;
  background: transparent;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 0.5rem;

  flex-shrink: 0;

  font-size: 1.4rem;
  font-weight: bold;
  line-height: 1;

  cursor: pointer;
  color: inherit;
  opacity: 0.7;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.message-close:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Succès */
.message.success {
  background: linear-gradient(90deg, #d4f7dc, #b2e2b8);
  border-left: 6px solid #27ae60;
  color: #1e5631;
}

/* Erreur */
.message.error {
  background: linear-gradient(90deg, #fddede, #fbb);
  border-left: 6px solid #c0392b;
  color: #8e1b0f;
}

/* Avertissement */
.message.warning {
  background: linear-gradient(90deg, #fff4d6, #ffe8a3);
  border-left: 6px solid #f39c12;
  color: #7a4e00;
}

/* Info */
.message.info {
  background: linear-gradient(90deg, #dbe9ff, #b7d3ff);
  border-left: 6px solid #2980b9;
  color: #1a3e72;
}


/* Footer pinned to bottom */
.footer {
  border-top: 2px solid black;
  background-color: #F3BEB8;
  background-image: linear-gradient(90deg, #F3BEB8, #f7a29a);
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}