/* auteur : Z3S_2 */

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Poppins", sans-serif;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  color: white;
  overflow-x: hidden;
  position: relative;
  background: linear-gradient(120deg, #0b0b0b, #1c1c1c, #2e2e2e, #1c1c1c);
  background-size: 300% 300%;
  animation: containerGradient 35s ease infinite;
}

.container {
  margin-top: 90px;
  width: 100%;
  max-width: 900px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.logo-container h1 {
  font-family: "Press Start 2P", cursive;
  font-size: 2rem;
  text-align: center;
  color: #fff;
  margin-bottom: 30px;
  margin-top: -10px;
  text-shadow: 0 0 8px #e98a4f;
}

.intro-box {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  padding: 25px 20px;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.6;
  font-size: 1rem;
  box-shadow: 0 0 15px rgba(197, 129, 34, 0.2);
}

.rule-box {
  background: rgba(0, 0, 0, 0.45);
  border-left: 4px solid #e98a4f;
  border-radius: 12px;
  width: 100%;
  margin-bottom: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.rule-box h2 {
  margin: 0;
  padding: 15px 20px;
  font-size: 1.4rem;
  color: #e98a4f;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
  position: relative;
}

.rule-box h2:hover {
  background: rgba(53, 35, 14, 0.2);
}

.rule-box h2::after {
  content: "▼";
  position: absolute;
  right: 20px;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.rule-box.active h2::after {
  transform: rotate(-180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px;
  font-size: 1rem;
  line-height: 1.6;
  color: #fcfcff;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.rule-box.active .accordion-content {
  padding: 15px 20px;
  max-height: 2000px;
}

.rule-box h5 {
  font-size: 1rem;
  margin: 10px 0 5px 0;
}

.rule-box h5.asterisk {
  color: #fffdfc;
}

.rule-box h5.asterisk::before {
  content: "💡 Astuce ";
  margin-right: 6px;
  color: #ffeb3b;
}

.command-line {
  display: flex;
  gap: 10px;
  margin: 4px 0 8px 0;
}

.command-line span.command {
  color: #e98a4f;
  font-weight: 600;
}

.command-line span.arrow {
  color: #ff9800;
}

.command-line span.desc {
  color: #f7ecd4;
}

footer {
  margin-top: 50px;
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  width: 100%;
}

@media (max-width: 768px) {
  .container {
    padding: 15px;
    margin-top: 80px;
  }

  .logo-container h1 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .rule-box {
    border-left-width: 3px;
  }

  .rule-box h2 {
    font-size: 1.1rem;
    padding: 10px 15px;
  }

  .rule-box h2::after {
    font-size: 0.9rem;
    right: 15px;
  }

  .accordion-content {
    font-size: 0.85rem;
    padding: 0 15px;
    line-height: 1.4;
    max-height: 0;
    overflow: hidden;
  }

  .rule-box.active .accordion-content {
    padding: 10px 15px;
    max-height: 2000px;
  }

  .rule-box h5 {
    font-size: 0.95rem;
    margin: 8px 0 4px 0;
  }

  .command-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 4px 0;
    font-size: 0.65rem;
  }

  .command-line span.command {
    flex-shrink: 0;
  }

  .command-line span.arrow {
    flex-shrink: 0;
  }

  .command-line span.desc {
    flex: 1 1 auto;
    word-break: break-word;
  }

  footer {
    font-size: 0.7rem;
    margin-top: 40px;
  }
}

/* Page spécifique : aides.html */
.page-aide .page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-aide .container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 900px;
  padding: 20px;
  box-sizing: border-box;
}

.page-aide .help-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 25px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.page-aide .help-card {
  background: rgba(0, 0, 0, 0.55);
  border-radius: 20px;
  padding: 30px 25px;
  flex: 0 0 300px;
  max-width: 300px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 25px rgba(233, 138, 79, 0.4);
  transition: all 0.3s ease;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s forwards;
}

.page-aide .help-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 0 40px rgba(233, 138, 79, 0.7);
}

.page-aide .help-card h2 {
  font-family: "Press Start 2P", cursive;
  color: #e98a4f;
  font-size: 1.5rem;
  margin-bottom: 15px;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeInDown 0.8s forwards;
}

.page-aide .help-card p {
  color: #ffeaca;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUpText 0.8s forwards 0.3s;
}

.page-aide .help-btn {
  display: inline-block;
  text-decoration: none;
  padding: 12px 25px;
  border-radius: 25px;
  background: rgb(233, 138, 79);
  color: #fff;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 0 15px rgba(233, 138, 79, 0.6);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUpText 0.8s forwards 0.5s;
}

.page-aide .help-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 30px rgba(233, 138, 79, 0.9);
}

.page-aide footer {
  flex-shrink: 0;
  margin-top: 5px;
  text-align: center;
}

@media (max-width: 768px) {
  .page-aide .container {
    justify-content: center;
    align-items: center;
    height: 100%;
  }

  .page-aide .help-grid {
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 90%;
    max-width: 350px;
    flex-wrap: wrap;
  }

  .page-aide .help-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    max-height: 220px;
  }
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUpText {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 769px) {
  .page-aide .container {
    margin-top: 250px;
  }
}
