/* 1. Couleurs principales */
:root {
  --primary-color: #aa03c4;
  --text-color: #f9f3f3;
  --bg-color: #000000;
}

/* 2. Styles généraux */
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Consolas', monospace, sans-serif;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centre le conteneur principal sur les grands écrans */
}

/* Ajout d'un conteneur pour limiter la largeur et meubler l'espace correctement */
.container {
  max-width: 900px;
  width: 100%;
}

.logo {
  width: 140px;
  height: auto;
  flex-shrink: 0;
  mix-blend-mode: screen;
}

.header-container {
  display: flex;
  align-items: center; /* Centrage vertical du logo et du titre */
  gap: 25px;          /* Espacement entre le logo et le titre */
  margin-bottom: 20px;
}

.main-title {
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
}

.title-link {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

title-link:hover {
  opacity: 0.8;
}

.slogan {
  color: #b2bec3; /* Changé en gris clair pour mieux ressortir sous le titre */
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.topic-title {
  color: #06aa0e;
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
}

.topic-section {
  color: #06aa0e;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1.2;
  margin: 0;
}

.topic-sub-section {
  color: #06aa0e;
  font-size: 1.2rem;
  line-height: 1.2;
  margin: 0;
}

/* Ligne pointillée style terminal pour séparer les sections */
.divider {
  border: none;
  border-top: 1px dashed #aa03c4;
  margin: 25px 0;
}

.topic-content {
  line-height: 1.6;
  font-size: 1rem;
  color: #e0e0e0;
}

.topic-content p {
  margin-bottom: 18px;
}

.topic-context {
  color: #79a818; /* Vert terminal */
  font-size: 0.95rem;
  border-left: 3px solid #79a818;
  padding-left: 10px;
}

.images-deux-container {
  display: flex;
  justify-content: center;
  align-items: center;  
  gap: 20px;   
  margin: 20px 0;
  width: 100%;
}

.article-short-img {
  max-width: 300px; 
  width: 100%;     
  height: auto;     
  display: block;
  margin: 20px auto; 
  border-radius: 4px; 
}

.article-mid-img {
  max-width: 600px; 
  width: 100%;     
  height: auto;     
  display: block;
  margin: 20px auto; 
  border-radius: 4px; 
}

.article-big-img {
  max-width: 900px; 
  width: 100%;     
  height: auto;     
  display: block;
  margin: 20px auto; 
  border-radius: 4px; 
}

/* Style du bloc de code */
.code-block {
  background-color: #050505;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 18px;
  margin: 20px 0;
  overflow-x: auto; /* Ajoute la barre de défilement horizontale si le code est trop large */
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.code-block code {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.95rem;
  color: #d4d4d4; /* Couleur de texte clair */
  line-height: 1.5;
  white-space: pre; /* Conserve tous les espaces et sauts de ligne */
}

/* Structure du tableau */
.table-container {
  width: 100%;
  margin-top: 20px;
}

.table-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  font-weight: bold;
  color: #ffffff;
  padding-bottom: 10px;
  border-bottom: 1px dashed #444444; /* CORRIGÉ: border-bottom a besoin d'un style (dashed/solid) */
  margin-bottom: 15px;
}

.table-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  margin-bottom: 15px;
}

.address-cell {
  background-color: #2b111b;
  color: #f06292;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
  width: fit-content;
  font-family: inherit;
}

/* Liens du tableau */
.topic-link {
  color: var(--primary-color);
  text-decoration: underline;
  transition: opacity 0.2s;
}

.topic-link:hover {
  opacity: 0.8;
}

/* Animation de clignotement pour la date et le symbole > */
.blinking-date,
.prompt-symbol {
  color: #aa03c4;
  font-weight: bold;
  animation: blink 1s infinite; /* Disparaît et apparaît toutes les secondes */
}

.blinking-date {
  color: #79a818; /* Une touche de vert style terminal pour la date */
  margin-right: 5px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Container Crypto */
.crypto-container {
  background-color: #0d0d0d;
  border: 1px solid #333;
  padding: 20px;
  border-radius: 6px;
  margin: 25px 0;
}

/* Masquer au démarrage */
.hidden {
  display: none;
}

/* Zone d'affichage du Ciphertext */
.cipher-output {
  margin-top: 15px;
  padding: 12px;
  background-color: #000000;
  border-left: 3px solid #aa03c4;
  font-family: 'Consolas', monospace;
  word-break: break-all; /* Pour bien découper les longues chaînes hex */
}

.cipher-label {
  color: #79a818;
  font-size: 0.85rem;
  font-weight: bold;
  display: block;
  margin-bottom: 8px;
}

#ciphertext-content {
  color: #f06292;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

/* 3. Style du bouton (Rendu visible) */
button {
  background-color: #1e1e1e;
  color: #ffffff; /* CORRIGÉ: le texte était noir sur fond noir */
  border: 1px solid var(--primary-color);
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: background-color 0.2s ease;
}

button:hover {
  background-color: var(--primary-color);
}

@media (max-width: 600px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .logo {
    max-width: 80px;
  }

  .table-header, .table-row {
    grid-template-columns: 120px 1fr; /* S'adapte aux petits écrans mobile */
  }

  .images-deux-container {
    flex-direction: column;
  }
}