/* ========================================================
   PROJET STI2D SIN - SITE MINECRAFT
   Feuille de style CSS simplifiée (Niveau Débutant)
   Réalisée par Jonathan et Nizar
   ======================================================== */

/* 1. POLICES DU SITE */
@font-face {
  font-family: 'Minecraft Ten';
  src: url('fonts/MinecraftTen.woff') format('woff'),
       url('fonts/MinecraftTen.ttf') format('truetype');
}

@font-face {
  font-family: 'Minecraft Seven';
  src: url('fonts/MinecraftSeven.woff') format('woff'),
       url('fonts/MinecraftSeven.ttf') format('truetype');
}

/* 2. STYLE GÉNÉRAL DU SITE */
body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #1a1a1a;
  background-image: url('https://static.wikia.nocookie.net/minecraft_gamepedia/images/a/a2/Cobblestone_Room.png/revision/latest/scale-to-width-down/1000?cb=20220203100740');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #ffffff;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

body.page-biomes {
  background-image: url('images/fond-biomes.png');
}

/* 3. CONTENEUR PRINCIPAL */
.conteneur {
  width: 85%;
  max-width: 900px;
  margin: 20px auto;
  padding: 20px;
  background-color: #383838;
  border: 3px solid #555555;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  position: relative;
}

/* Badge de projet */
.badge-projet {
  position: absolute;
  top: -12px;
  right: 18px;
  background-color: #ffaa00;
  color: #111111;
  font-family: 'Minecraft Seven', monospace;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 10px;
  border: 2px solid #222222;
}

/* Bannière d'accueil avec les noms */
.message-bienvenue {
  background: #253322;
  border: 2px solid #55ff55;
  border-left: 5px solid #55ff55;
  padding: 12px 16px;
  margin: 15px 0 20px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.icone-bienvenue {
  font-size: 24px;
}

.message-bienvenue strong {
  color: #55ff55;
}

.message-bienvenue em {
  color: #ffff55;
  font-style: normal;
  font-weight: bold;
}

/* 4. TITRES */
h1 {
  font-family: 'Minecraft Ten', monospace;
  font-size: 24px;
  color: #55ff55;
  text-align: center;
  margin: 15px 0;
}

h2 {
  font-family: 'Minecraft Ten', monospace;
  font-size: 18px;
  color: #ffaa00;
  border-bottom: 2px solid #55ff55;
  padding-bottom: 6px;
  margin-top: 25px;
}

h3 {
  font-family: 'Minecraft Ten', monospace;
  font-size: 16px;
  color: #55ffff;
  margin-bottom: 5px;
}

/* 5. MENU DE NAVIGATION */
#menu {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background-color: #1a1a1a;
  padding: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 3px solid #55ff55;
  z-index: 1000;
}

#menu a {
  color: #ffffff;
  background-color: #4a4a4a;
  text-decoration: none;
  padding: 8px 14px;
  display: inline-block;
  border: 2px solid #222222;
  font-weight: bold;
  font-size: 13px;
  font-family: 'Minecraft Ten', monospace;
}

#menu a:hover {
  background-color: #55ff55;
  color: #000000;
}

.page-active {
  background-color: #2e7d32 !important;
  color: #ffff55 !important;
  border-color: #55ff55 !important;
}

/* 6. CONTENU DES PAGES (SECTIONS, ARTICLES, BLOCS) */
section {
  background-color: #2f2f2f;
  padding: 15px;
  margin-bottom: 20px;
  border: 1px solid #444444;
}

article, .boite {
  background-color: #242424;
  border: 2px solid #4a4a4a;
  padding: 12px;
  margin: 12px 0;
}

article:hover {
  border-color: #55ff55;
}

aside {
  background-color: #222222;
  border-left: 4px solid #ffaa00;
  padding: 10px 14px;
  margin: 15px 0;
}

.astuce-eleve {
  background-color: #1e2832;
  border-left: 4px solid #55ffff;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
}

/* 7. IMAGES ET ICÔNES */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px auto;
}

.image-banniere {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 2px solid #222222;
}

.icone, .icone-minerai, .icone-item {
  width: 28px;
  height: 28px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  image-rendering: pixelated;
}

/* Barres HUD de survie */
.hud-survie {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  background-color: #242424;
  border: 2px solid #3c3c3c;
  padding: 10px;
  margin: 15px 0;
}

.hud-element {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.hud-icone {
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

/* 8. LISTES ET TABLEAUX */
ul, ol {
  margin-left: 25px;
  margin-top: 8px;
  margin-bottom: 8px;
}

li {
  margin-bottom: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  background-color: #222222;
}

caption {
  font-size: 15px;
  font-weight: bold;
  color: #ffaa00;
  margin-bottom: 8px;
}

table, th, td {
  border: 2px solid #55ff55;
}

th {
  background-color: #111111;
  color: #55ff55;
  padding: 8px;
  text-align: center;
  font-size: 14px;
}

td {
  padding: 8px;
  text-align: center;
  font-size: 14px;
}

/* 9. PIED DE PAGE */
footer {
  text-align: center;
  font-size: 12px;
  color: #aaaaaa;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid #555555;
}

.footer-auteurs {
  color: #55ff55;
  font-weight: bold;
}

/* 10. WIDGET CHATBOT ALLAY IA */
#btn-bulle-assistant {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #0c212b;
  border: 3px solid #3DE0F7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  padding: 0;
}

#btn-bulle-assistant:hover {
  transform: scale(1.08);
  border-color: #55ff55;
}

.icone-bulle-allay {
  width: 44px;
  height: 44px;
  object-fit: contain;
  image-rendering: pixelated;
}

.icone-entete-allay {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 6px;
  image-rendering: pixelated;
}

.icone-msg-allay {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  margin-right: 6px;
  image-rendering: pixelated;
  flex-shrink: 0;
}

#fenetre-assistant {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 340px;
  max-width: 90vw;
  height: 450px;
  background-color: #242424;
  border: 3px solid #55ff55;
  border-radius: 8px;
  display: none;
  flex-direction: column;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  font-family: Arial, Helvetica, sans-serif;
  color: #ffffff;
}

#fenetre-assistant.ouverte {
  display: flex;
}

.entete-widget {
  background-color: #1a1a1a;
  border-bottom: 2px solid #55ff55;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entete-widget h3 {
  margin: 0;
  font-size: 14px;
  color: #55ff55;
  display: flex;
  align-items: center;
}

.btn-fermer-widget {
  background-color: #444444;
  color: #ffffff;
  border: 1px solid #666666;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
}

.btn-fermer-widget:hover {
  background-color: #ff5555;
}

#widget-chat-flux {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  background-color: #1d1d1d;
}

.bulle-user {
  background-color: #383838;
  border-left: 3px solid #55ffff;
  padding: 8px 10px;
  border-radius: 4px;
  word-break: break-word;
}

.bulle-bot {
  background-color: #2a2a2a;
  border-left: 3px solid #55ff55;
  padding: 8px 10px;
  border-radius: 4px;
  word-break: break-word;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bulle-attente {
  color: #ffaa00;
  font-style: italic;
  font-size: 12px;
  padding: 4px 0;
}

#widget-form-chat {
  display: flex;
  gap: 6px;
  padding: 10px;
  background-color: #1a1a1a;
  border-top: 1px solid #444444;
}

#widget-input-message {
  flex: 1;
  padding: 8px;
  background-color: #333333;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: 3px;
  font-size: 13px;
  box-sizing: border-box;
}

#widget-input-message:focus {
  outline: none;
  border-color: #55ff55;
}

#widget-btn-envoyer {
  background-color: #55ff55;
  color: #000000;
  border: none;
  padding: 8px 14px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 3px;
  font-size: 13px;
}

#widget-btn-envoyer:hover {
  background-color: #88ff88;
}

/* 11. RESPONSIVE SIMPLE (POUR PETITS ÉCRANS) */
@media (max-width: 768px) {
  .conteneur {
    width: 95%;
    padding: 12px;
  }
  #fenetre-assistant {
    width: 92vw;
    right: 4vw;
    bottom: 85px;
  }
}
