/* style.css */

/* Reset et base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: #222;
  background-color: #fafafa;
  padding: 1.5rem 1rem;
  max-width: 900px;
  margin: auto;
}

/* Liens */
a {
  color: #0077cc;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: white;
}

/* En-tête */
header {
  background-color: #005f99;
  color: white;
  padding: 1.5rem 1rem;
  text-align: center;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 8px rgba(0,95,153,0.3);
}

header h1 {
  font-weight: 700;
  font-size: 2rem;
}

/* Sommaire */
#toc {
  background: #e1e8f0;
  padding: 1.2rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 3rem;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  font-size: 1.1rem;
  font-weight: 600;
}

#toc ul {
  list-style: none;
}

#toc li {
  margin: 0.7rem 0;
}

#toc a {
  display: block;
  padding: 0.0rem;
  border-radius: 4px;
}

#toc a:hover, #toc a:focus {
  background-color: #c5d9f1;
  outline: none;
}

/* Contenu principal */
main section {
  background: white;
  padding: 2rem 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.07);
  transition: box-shadow 0.3s ease;
}

main section:hover {
  box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

h2 {
  color: #004970;
  margin-bottom: 1.2rem;
  font-size: 1.8rem;
  border-bottom: 3px solid #0077cc;
  padding-bottom: 0.4rem;
}

h3 {
  color: #0066aa;
  margin-top: 1.8rem;
  margin-bottom: 0.7rem;
  font-size: 1.4rem;
  border-left: 4px solid #0077cc;
  padding-left: 0.6rem;
  font-weight: 600;
}

p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  color: #333;
}

ul {
  margin-left: 1.3rem;
  margin-bottom: 1.5rem;
}

ul li {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

pre {
  background-color: #f4f7fa;
  border-left: 5px solid #0077cc;
  padding: 1rem 1.2rem;
  margin: 1.2rem 0;
  overflow-x: auto;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #1a1a1a;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

/* Balise code en ligne */
code {
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  color: #003366;
}

#back-to-toc {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 30px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,119,204,0.3);
  transition: background-color 0.3s ease, transform 0.2s ease;
  z-index: 1000;
}

#back-to-toc:hover {
  background-color: #005f99;
  transform: scale(1.05);
}

header {
  background-color: #005f99;
  color: white;
  padding: 1.5rem 1rem;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 8px rgba(0,95,153,0.3);
  text-align: center;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.logo {
  height: 50px;
  width: auto;
  border-radius: 6px;
}

header h1 {
  font-weight: 700;
  font-size: 2rem;
  margin: 0;
}

.credit {
  margin: 0.2rem 0 0.5rem 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: #c7dff6;
  font-style: italic;
}

.course-info {
  font-size: 0.85rem;
  color: #a9c6ea;
  font-weight: 400;
}
.course-info span {
  margin: 0 0.4rem;
}


/* Style pour le bouton Afficher/Cacher la réponse */
.exercice-btn {
background-color: #0077cc;
color: white;
border: none;
padding: 0.6rem 1.3rem;
border-radius: 5px;
font-size: 1rem;
cursor: pointer;
margin-top: 1rem;
transition: background-color 0.3s ease;
}
	  
/* Pied de page */
footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #666;
  padding-bottom: 1rem;
}


      label {
        display: block;
        margin-bottom: 0.6rem;
        cursor: pointer;
      }
      .quiz-question {
        margin-bottom: 1rem;
      }
      button {
        background-color: #0077cc;
        color: white;
        border: none;
        padding: 0.6rem 1.3rem;
        border-radius: 5px;
        font-size: 1rem;
        cursor: pointer;
        margin-top: 1rem;
        transition: background-color 0.3s ease;
      }
      button:hover {
        background-color: #005f99;
      }
      #quiz-result {
        margin-top: 1rem;
        font-weight: 600;
        font-size: 1.1rem;
        color: #004970;
      }
      .answer {
        margin-top: 1rem;
        padding: 1rem;
        background-color: #e6f0fc;
        border-left: 4px solid #0077cc;
        border-radius: 4px;
        display: none;
        white-space: pre-wrap;
        font-family: monospace;
        font-size: 0.95rem;
        color: #003366;
      }
/* Responsive */
@media (max-width: 700px) {
  body {
    padding: 1rem 0.8rem;
  }

  main section {
    padding: 1.5rem 1.5rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.2rem;
  }
}
