/* ==========================
   STYLE GLOBAL
========================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  direction: ltr;
  padding: 0;
  width: 100%;
}

.container {
  max-width: 800px;
  margin: 20px auto;
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.header h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

/* ==========================
   FORMULAIRES
========================== */
.form-controle {
  margin-bottom: 15px;
}

.form-controle input[type="text"],
.form-style input[type="text"],
.form input[type="text"],
.form input[type="password"],
select {
  width: 100%;
  padding: 8px;
  margin: 5px 0 15px 0;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Champs de formulaire (généraux) */
.form-style .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.form-style label {
  margin-bottom: 5px;
}

/* ==========================
   BOUTONS
========================== */
button,
.btn {
  background-color: #007a33;
  color: #FFD700;
  border: 2px solid #FFD700;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

button:hover,
.btn:hover {
  background-color: #FFD700;
  color: #007a33;
  border-color: #FF0000;
  transform: scale(1.05);
}

button:active,
.btn:active {
  background-color: #FF0000;
  color: white;
  transform: scale(0.95);
}

/* Variantes */
.btn-blue { background-color: #0000CC; color: white; }
.btn-yellow { background-color: #FFD700; color: #007a33; }
.btn-green { background-color: #00CC44; color: white; }
.btn-red { background-color: #FF0000; color: white; }

/* ==========================
   TABLE FORMULAIRE
========================== */
.form-table {
  width: 100%;
  background-color: #00A95C;
  border-collapse: collapse;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
  color: white;
}

.form-table caption {
  font-size: 20px;
  font-weight: bold;
  padding: 10px;
  color: #FFD700;
}

/* ==========================
   NAVBAR (Mauritanie)
========================== */
.navbar2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #006233;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
}

#logo h3 {
  margin: 0;
  color: #FFD700;
  font-size: 14px;
  line-height: 1.4;
  font-weight: bold;
}

/* MENU HORIZONTAL */
.navbar2 ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.navbar2 ul li { margin: 0; }

.navbar2 ul a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.navbar2 ul a:hover {
  background: #D71A28;
  color: #FFD700;
  border-radius: 4px;
}

.navbar2 ul li#active2 a {
  background: #FFD700;
  color: #006233;
  border-radius: 4px;
}

.bouton_droite {
  margin-left: auto;
}

/* ==========================
   BURGER MENU (mobile)
========================== */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  margin-left: 10px;
}

.burger div {
  width: 20px;
  height: 3px;
  background: white;
  margin: 4px;
  transition: all 0.3s ease;
}

/* ==========================
   DASHBOARD
========================== */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.dashboard a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: left;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-decoration: none;
  color: #006233;
  font-weight: bold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard a:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  background: #fdf5dd;
}

.dashboard img {
  max-width: 80px;
  margin-top: 10px;
}

/* ==========================
   RESPONSIVE DESIGN
========================== */
@media screen and (max-width: 768px) {
  .navbar2 ul {
    flex-direction: column;
    display: none;
    width: 100%;
    background: #006233;
  }

  .navbar2 ul.active {
    display: flex;
  }

  .burger { display: flex; }

  .navbar2 ul a {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }

  .container {
    margin: 15px;
    padding: 15px;
  }

  .dashboard {
    padding: 10px;
    gap: 15px;
  }

  .dashboard a {
    padding: 15px;
  }

  .form button,
  .btn {
    width: 100%;
    margin: 5px 0;
  }
}

/* ==========================
   MESSAGES D’ERREUR
========================== */
.error-message {
  color: #FF0000;
  text-align: center;
  margin-top: 15px;
  font-weight: bold;
}
