/* ===================== Reset ===================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f4f5f7;
  color: #333;
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===================== Header ===================== */
header {
  background-color: #002654;
  color: white;
  border-bottom: 5px solid #e1000f;
  padding-bottom: 10px;
  text-align: center;
}

.header-top {
  display: flex;
  justify-content: space-between; /* Logo à gauche, bouton à droite */
  align-items: center;
  padding: 5px 30px;
}

.logo {
  height: 150px;
  cursor: pointer;
}

/* Déconnexion bouton */
header .header-top button {
  background-color: #cc0000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

header .header-top button:hover {
  background-color: #ff3333;
}

/* ===================== Navigation ===================== */
nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  background-color: #003366;
  padding: 10px 0;
  margin-top: 0px;
  flex-wrap: wrap;
}

nav ul li {
  margin: 5px 15px;
}

nav ul li a,
nav ul li button {
  color: white;
  text-decoration: none;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: color 0.3s;
  text-align: center;
}

nav ul li a:hover,
nav ul li button:hover {
  color: #ffcc00;
}

/* ===================== Main ===================== */
main {
  padding: 40px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
}

/* ===================== Headings ===================== */
h1, h2, h3 {
  margin-bottom: 20px;
  color: #002654;
  text-align: center;
}

p {
  font-size: 16px;
  color: #555;
  margin-bottom: 15px;
  text-align: center;
}

/* ===================== Cards ===================== */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.card {
  background-color: white;
  padding: 20px;
  width: 250px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  text-align: center;
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 14px;
  color: #666;
}

.card a {
  display: inline-block;
  margin-top: 10px;
  color: #0055a5;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
}

/* ===================== Form ===================== */
form {
  background-color: white;
  padding: 30px;
  margin: 40px auto;
  width: 400px;
  border: 1px solid #ccd2d8;
  border-top: 6px solid #002654;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
}

form input,
form select,
form textarea {
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fafafa;
  transition: border-color 0.3s;
  text-align: center;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: #0055a5;
  outline: none;
  background-color: #fff;
}

form button {
  width: 100%;
  padding: 12px;
  background-color: #002654;
  color: white;
  font-weight: bold;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s;
  text-align: center;
}

form button:hover {
  background-color: #003b8e;
}

/* ===================== Listes ===================== */
ul#userList,
ul#citoyenList,
#resultats,
ul#antecedentList {
  list-style: none;
  padding: 0;
  width: 400px;
  max-width: 90%;
}

ul#userList li,
ul#citoyenList li,
#resultats li,
ul#antecedentList li {
  background-color: white;
  margin: 10px auto;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}

ul#userList button,
ul#citoyenList button,
#resultats button,
ul#antecedentList button {
  background-color: #cc0000;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

ul#userList button:hover,
ul#citoyenList button:hover,
#resultats button:hover,
ul#antecedentList button:hover {
  background-color: #ff3333;
}

/* ===================== Recherche ===================== */
.recherche {
  margin: 30px auto;
  width: 500px;
  max-width: 90%;
  text-align: center;
}

.recherche input {
  width: 80%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  text-align: center;
}

.recherche button {
  padding: 10px 20px;
  background-color: #002654;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
  text-align: center;
}

.recherche button:hover {
  background-color: #003b8e;
}

/* ===================== Empreinte ===================== */
.empreinte-display {
  margin-top: 30px;
  background-color: #e1e5f0;
  padding: 20px;
  border-radius: 10px;
  width: 500px;
  max-width: 90%;
  text-align: center;
}

.empreinte-display img {
  margin-top: 15px;
  max-width: 100%;
  border: 2px solid #002654;
  border-radius: 8px;
}

/* ===================== Notifications ===================== */
.notification {
  position: fixed;
  top: 100px;
  right: 30px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  z-index: 9999;
  opacity: 0.95;
  text-align: center;
}

.notification.success { background-color: #28a745; }
.notification.error { background-color: #dc3545; }
.notification.info { background-color: #007bff; }

/* ===================== Footer ===================== */
footer {
  background-color: #002654;
  color: white;
  padding: 15px;
  font-weight: 600;
  width: 100%;
  text-align: center;
  margin-top: auto; /* pousse le footer en bas du contenu */
  position: relative;
}

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
  }

  .cards {
    flex-direction: column;
    gap: 20px;
  }

  form,
  ul#userList li,
  ul#citoyenList li,
  #resultats li,
  ul#antecedentList li,
  .recherche,
  .empreinte-display {
    width: 95%;
    margin: 20px auto;
  }

  button,
  form button,
  .recherche button,
  ul#userList button,
  ul#citoyenList button,
  #resultats button,
  ul#antecedentList button {
    width: 100%;
    margin-top: 10px;
  }
}
