* { box-sizing: border-box; }

body {
  margin: 0;
  background: #92AC8E;
  font-family: Arial, Helvetica, sans-serif;
}

.page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
}

.menu {
  display: flex;
  margin-bottom: 24px;
  border: 2px solid #fff;
}

.menu a,
.menu button {
  flex: 1;
  text-align: center;
  background: #000;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  font-family: inherit;
  padding: 18px 10px;
  border: none;
  border-right: 2px solid #fff;
  cursor: pointer;
}

.menu a:last-child,
.menu button:last-child {
  border-right: none;
}

.menu a:hover,
.menu button:hover {
  background: #222;
}

.menu a.active {
  background: #14532d;
}

.top-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 4px;
  z-index: 100;
}

.top-controls a,
.top-controls button {
  background: #000;
  color: #fff;
  border: 1px solid #fff;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: bold;
  font-family: inherit;
  font-size: 0.9rem;
  text-decoration: none;
}

.content-box {
  background: #fff;
  border: 2px solid #14532d;
  padding: 40px;
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 24px;
}

.defi-action {
  align-self: stretch;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
}

.text {
  flex: 1;
  font-size: 1.4rem;
  line-height: 1.5;
}

.photo img {
  width: 320px;
  height: auto;
  display: block;
}

h1 {
  margin: 0 0 12px;
}

.points {
  font-weight: bold;
  color: #14532d;
}

.statut {
  font-weight: bold;
}

.statut-en_attente { color: #7a6a00; }
.statut-approuve { color: #14532d; }
.statut-rejete { color: #7a1f1f; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.2rem;
}

th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 2px solid #92AC8E;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

label {
  font-weight: bold;
}

input {
  padding: 10px;
  border: 2px solid #14532d;
  font-family: inherit;
  font-size: 1.1rem;
}

.bouton {
  align-self: flex-start;
  background: #000;
  color: #fff;
  border: 2px solid #14532d;
  padding: 10px 24px;
  font-weight: bold;
  font-family: inherit;
  font-size: 1.1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.bouton:hover {
  background: #14532d;
}

.aide {
  font-size: 1rem;
  color: #333;
}

.erreurs {
  color: #7a1f1f;
  font-weight: bold;
}

/* Rendre les images responsives partout */
img {
  max-width: 100%;
  height: auto;
}

/* ===== TABLETTE ET MOBILE (768px et moins) ===== */
@media (max-width: 768px) {
  .page {
    padding: 12px;
    padding-top: 60px;
  }

  .content-box {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
  }

  .defi-action {
    align-self: stretch;
    align-items: flex-end;
  }

  .text {
    font-size: 1.1rem;
  }

  .photo {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .photo img {
    width: 100%;
    max-width: 320px;
  }

  .menu {
    flex-wrap: wrap;
  }

  .menu a,
  .menu button {
    flex: 1 1 50%;
    font-size: 1rem;
    padding: 14px 6px;
    border-bottom: 2px solid #fff;
  }
}

/* ===== PETIT MOBILE (480px et moins) ===== */
@media (max-width: 480px) {
  .text {
    font-size: 1rem;
  }

  .menu a,
  .menu button {
    flex: 1 1 100%;
    border-right: none;
  }

  .top-controls {
    top: 8px;
    right: 8px;
  }
  .top-controls a,
  .top-controls button {
    padding: 4px 8px;
    font-size: 0.85rem;
  }
}
