/* Ambiance Minecraft : blocs d'herbe, pierre et terre, couleurs chaudes et ludiques */
:root {
  --herbe: #5b9c3a;
  --herbe-sombre: #3d6b26;
  --terre: #8b5a2b;
  --pierre: #2b2b2b;
  --pierre-clair: #3a3a3a;
  --or: #f5c542;
  --diamant: #5ee6d6;
  --danger: #c0392b;
  --texte: #f4f4f4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  line-height: 1.6;
  color: var(--texte);
  background-color: var(--pierre);
  background-image:
    linear-gradient(45deg, #303030 25%, transparent 25%),
    linear-gradient(-45deg, #303030 25%, transparent 25%);
  background-size: 32px 32px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--or); }
a:hover { color: var(--diamant); }

.entete {
  background: linear-gradient(to bottom, var(--herbe) 0 30%, var(--terre) 30% 100%);
  border-bottom: 4px solid #000;
  padding: 0.8rem 1.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  text-shadow: 2px 2px 0 #000;
}

.entete nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 0.9rem;
  padding: 0.3rem 0.6rem;
  border: 2px solid #000;
  background: var(--pierre-clair);
}

.entete nav a:hover { background: var(--herbe-sombre); }

.contenu {
  flex: 1;
  width: min(960px, 92%);
  margin: 2rem auto;
}

h1, h2 {
  color: var(--or);
  text-shadow: 2px 2px 0 #000;
  line-height: 1.2;
}

.hero {
  text-align: center;
  background: var(--pierre-clair);
  border: 4px solid #000;
  padding: 2rem 1.2rem;
  box-shadow: 6px 6px 0 #000;
}

.accroche { font-size: 1.15rem; max-width: 40rem; margin: 0 auto; }

.cartes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.carte, .bloc, .carte-admin {
  background: var(--pierre-clair);
  border: 3px solid #000;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: 4px 4px 0 #000;
}

.chapitre .numero { color: var(--diamant); font-weight: bold; margin: 0; }

.boutons, .actions-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.actions-admin { justify-content: flex-start; }

.bouton {
  display: inline-block;
  font: inherit;
  font-weight: bold;
  color: #000;
  background: var(--herbe);
  border: 3px solid #000;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: inset -3px -3px 0 var(--herbe-sombre);
}

.bouton:hover { background: #6fb84a; color: #000; }

.bouton.secondaire {
  background: var(--terre);
  color: #fff;
  box-shadow: inset -3px -3px 0 #5a3a1b;
}

.bouton.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: inset -3px -3px 0 #7b241c;
}

.carte-admin { max-width: 420px; margin: 2rem auto; }

label {
  display: block;
  margin-bottom: 1rem;
}

input {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem;
  font: inherit;
  border: 2px solid #000;
  background: #f4f4f4;
}

.alerte {
  background: #7b241c;
  border: 2px solid #000;
  padding: 0.6rem 0.9rem;
  color: #fff;
}

.alerte.ok { background: var(--herbe-sombre); }

.petit { font-size: 0.9rem; opacity: 0.85; }

.infos dt { font-weight: bold; color: var(--diamant); margin-top: 0.6rem; }
.infos dd { margin: 0 0 0.3rem 0; }

.journal {
  width: 100%;
  border-collapse: collapse;
  background: var(--pierre-clair);
}

.journal th, .journal td {
  border: 1px solid #000;
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.journal th { background: var(--terre); }

.pied {
  text-align: center;
  font-size: 0.9rem;
  padding: 1rem;
  background: var(--terre);
  border-top: 4px solid #000;
}

@media (max-width: 600px) {
  .entete nav a { margin: 0.3rem 0.3rem 0 0; display: inline-block; }
  .accroche { font-size: 1rem; }
}
