/* ============================= */
/* Règles générales              */
/* ============================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

/* ============================= */
/* Index             */
/* ============================= */

.index-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5em;
      justify-content: center;
    }
    .index-grid a {
      background-color: #e0e0e0;
      padding: 0.5em 1em;
      border-radius: 5px;
      text-decoration: none;
      color: #000;
      font-weight: bold;
      min-width: 40px;
      text-align: center;
    }
    .index-grid a:hover {
      background-color: #cce5cc;
    }
	
	
/* ============================= */
/* Sidebar                       */
/* ============================= */

.sidebar {
  background-color: #f4f4f4;
  width: 250px;
  padding: 1em;
  border-right: 1px solid #ddd;
}

.sidebar h2 {
  font-size: 1.2em;
  margin-bottom: 1em;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 0.5em 0;
}

.sidebar a {
  text-decoration: none;
  color: #333;
  padding: 0.5em;
  display: block;
  border-radius: 5px;
}

.sidebar a.active {
  background-color: #cce5cc;
  font-weight: bold;
}

/* ============================= */
/* Contenu principal             */
/* ============================= */

.main-content {
  flex: 1;
  padding: 1.5em;
}

/* ============================= */
/* Navigation                    */
/* ============================= */

.nav-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.75em;
  margin-bottom: 1em;
  padding-left: 3.5em; /* évite la zone du hamburger */
}

.nav-buttons button {
  padding: 0.5em 1em;
  border: none;
  cursor: pointer;
  font-size: 1em;
}

.nav-buttons .next {
  background-color: #28a745;
  color: white;
}


/* ============================= */
/* Blocs pédagogiques            */
/* ============================= */

.content-block {
  background-color: #fff9d9;
  padding: 1em;
  border-left: 5px solid gold;
  margin-bottom: 2em;
}

.gray-box {
  background-color: #f1f1f1;
  padding: 1em;
  margin: 1em 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.gray-box ul {
  list-style: square;
  padding-left: 1.2em;
}

.gray-box a {
  color: green;
}

.note {
  font-style: italic;
  margin-top: 1em;
}

/* ============================= */
/* Code et non-translation       */
/* ============================= */

.notranslate {
  translate: no;
  unicode-bidi: isolate;
}

pre {
  background-color: #1e1e1e;
  color: #f8f8f2;
  padding: 1em;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

pre.notranslate {
  background-color: #1e1e1e;
  border-left: 4px solid #444;
  padding: 1em;
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  line-height: 1.6;
  color: #d4d4d4;
}

/* ============================= */
/* Coloration syntaxique COBOL   */
/* ============================= */

.kw {
  color: #569CD6;
  font-weight: bold;
}

.var {
  color: #9CDCFE;
}

.type {
  color: #C586C0;
}

.val {
  color: #CE9178;
}


/* ============================= */
/* Bouton boostrap             */
/* ============================= */
a.btn {
  color: #fff;
}

a.btn-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}


/* ============================= */
/* Sélection du code             */
/* ============================= */

pre.notranslate::selection {
  background: #264f78;
}

pre.notranslate span {
  white-space: pre;
}

/* ============================= */
/* Responsive                    */
/* ============================= */

@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
}
/* ============================= */
/* Bouton hamburger              */
/* ============================= */

.menu-toggle {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  background-color: #28a745;
  color: white;
  border: none;
  padding: 0.6em 0.8em;
  font-size: 1.4em;
  border-radius: 5px;
  cursor: pointer;
}

/* ============================= */
/* Version mobile                */
/* ============================= */

@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    height: 100%;
    width: 250px;
    background-color: #f4f4f4;
    transition: left 0.3s ease;
    z-index: 1000;
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    padding-top: 3em;
  }
}

/* ============================= */
/* Bouton                */
/* ============================= */
/* On garde le vert #28a745 défini par votre .nav-buttons .next */
  .pacta-btn{
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
    transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
  }
  .pacta-btn:hover{
    transform: translateY(-1px);
    filter: brightness(0.97);
    box-shadow: 0 10px 18px rgba(0,0,0,.16);
  }
  .pacta-btn:active{
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(0,0,0,.12);
  }
  .pacta-btn:focus-visible{
    outline: 3px solid rgba(40,167,69,.35);
    outline-offset: 2px;
  }
