/* layout */
html, body {
  height: 100%;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
}

main {
  flex: 1;
}

footer {
  padding: 2rem;
  background: #f1f1f1;
  text-align: center;
  border-top: 1px solid rgb(227, 227, 227);
}
.container {
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

/* nav */
nav#main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #eee;
  border-bottom: 1px solid rgb(227, 227, 227);
  padding: 1vh 2vh;
}
nav#main-nav a {
  text-decoration: none;
  color: inherit;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-right {
  display: flex;
  align-items: center;
}

/* autres utilities */
a {
  text-decoration: none;
}

/* input refs / search*/
.search-document { 
  width: 100%; 
  padding: 10px; 
  font-size: 1rem; 
  margin-bottom: 1rem; 
  border: 1px solid;
}

/* login / register*/
.box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 20px;
}
.box form {
  border: solid 3px;
  padding: 50px;
}
.box form >* {
  padding: 5px;
  margin: 5px;
}
@media (max-width: 460px) {
.box {
    flex-direction: column;
}
.form-input {
  border: 1px solid;
}
.search-document { 
  width: 94%; 
  border: 1px solid;
  background-color: transparent;
}
}
/* recherche docs */
.search-icon {
  border: none;
  padding-right: 1rem;
  background-color: transparent;
}

#searchOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.82);
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
}

#searchOverlay input {
  width: 100%;
  font-size: 1.5rem;
  padding: 12px;
}

#closeSearch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 3rem;
  background: none;
  border: none;
  cursor: pointer;
  color: white
}

/* Docs => Main Content */
aside {
  margin-top: 3vh;
}

#left-nav ul {
  list-style-type: none;
  margin: 5px 0;
  padding: 5px;
}

#left-nav details {
  margin-top: 1vh;
}

.breadcrumb {
  margin: 2vh 0 4vh 0;
}

/* Docs => Table des matières */
.toc {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: sans-serif;
  font-size: 0.95rem;
}

details summary {
  font-weight: bold;
  font-size: 1.1em;
  cursor: pointer;
  color: #333;
  padding: 1em;
}

/* Docs => Alertes */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem 0.75rem 2.5rem;
  border-radius: 0.375rem;
  border: solid 1px #c9d1d6;
  font-size: 0.875rem;
  font-weight: 500;
  background-repeat: no-repeat;
  background-position: 0.75rem 0.9rem;
  background-size: 1rem;
  line-height: 1.4;
}

.alert-info {
  background-color: #e0f2fe;
  color: #0c4a6e;
  background-image: url("data:image/svg+xml,...");
}

.alert-success {
  background-color: #d1fae5;
  color: #065f46;
  background-image: url("data:image/svg+xml,...");
}

.alert-warning {
  background-color: #fef3c7;
  color: #92400e;
  background-image: url("data:image/svg+xml,...");
}

.alert-danger {
  background-color: #fee2e2;
  color: #7f1d1d;
  background-image: url("data:image/svg+xml,...");
}

/* Cards */
.card-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.card {
  flex: 1 1 200px;
  border: 1px solid #ccc;
  padding: 2rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  background: #f9f9f9;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* calculette */
.wrapper { max-width: 620px; margin: 0 auto; }
label, .slider, select {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.slider[type="number"], select {
  padding: 0.5rem;
}
#result {
  font-weight: bold;
  font-size: 1.2rem;
  background: #e9ecef;
  padding: 1rem;
  text-align: center;
  margin-top: 1rem;
}
.note {
  color: #666;
  font-size: 0.95rem;
  margin: 1.5rem 0;
}
.btn-calculette { 
  width: 100%; 
  padding: 0.7rem; 
  font-size: 1.1rem; 
  margin-bottom: 1rem;
}

/* refs */
.category { 
  margin-top: 2rem; 
}
.category h2 { 
  font-size: 1.3rem; 
  margin-bottom: 0.5rem; 
}
.doc-list { 
  list-style: none; 
  padding-left: 1rem; 
}
.doc-list li { 
  margin-bottom: 0.3rem; 
}
.disabled { 
  color: gray; 
  text-decoration: none; 
  pointer-events: none; 
}