html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: white;
  color: black;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.navbar {
  background-color: black;
  color: white;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3000;
}
.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 3000;
}
.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.brand a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  text-transform: uppercase;
}
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu li a {
  color: white;
  text-decoration: none;
  text-transform: uppercase;
  padding: 10px 15px;
}
.menu-toggle-close {
  display: none;
}

.nav-toggle {
  display: none;
}
.nav-toggle-label {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 25px;
  position: relative;
  z-index: 3001;
}
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  background: white;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  position: absolute;
}
.nav-toggle-label span {
  top: 50%;
  transform: translateY(-50%);
}
.nav-toggle-label span::before {
  content: '';
  top: -10px;
}
.nav-toggle-label span::after {
  content: '';
  top: 10px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 20%;
  height: 100vh;
  background-color: black;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  z-index: 1000;
}
.sidebar h2 {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 0;
  font-size: 4rem;
}

.page-container {
  margin-left: 20%;
  padding-top: 70px;
  box-sizing: border-box;
}

.page-container.min-height-full {
  min-height: 100vh;
}
.page-container.flex-content {
  flex: 1;
}
.content {
  padding: 40px;
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
  font-size: 1.3rem;
}

header {
  position: relative;
  width: 100%;
  height: 100vh;
  font-size: 1.5rem;
  text-transform: uppercase;
}
.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(1.5rem, 1fr));
  grid-auto-rows: 2rem;
  gap: 0;
  width: 100%;
  height: 100%;
  text-align: left;
  position: relative;
}
.letter {
  display: inline-block;
  width: 1.5rem;
  height: 2rem;
  font-weight: bold;
  transition: color 0.05s ease-in-out;
}
.inactive {
  color: #bbb;
}
.overlay-link {
  position: absolute;
  display: block;
  text-decoration: none;
  background: rgba(255,255,255,0);
  z-index: 9999;
  cursor: pointer;
}

form {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 20px;
}
form input,
form textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ccc;
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
}
form button {
  padding: 10px;
  background-color: black;
  color: white;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 1rem;
}

.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: black;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 1rem;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s;
  z-index: 3000;
}
.dark-mode {
  background-color: black;
  color: white;
}

.dark-mode .theme-toggle,
.dark-mode form button {
  background-color: white;
  color: black;
}

.dark-mode .slide-preview {
  color: black;
}
.dark-mode h3,
.dark-mode .subtitle,
.dark-mode .date {
  color: black;
}
.dark-mode .prev-slide,
.dark-mode .next-slide {
  color: white;
}

.dark-mode .carousel-nav button {
  background: #f1eeee;
  color: black;
}

.dark-mode .toggle-details-btn {
  color: white;
}

.slider-container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: 45vh;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  touch-action: pan-y;
}
.slider-track {
  display: flex;
}
.slide {
  width: 300px;
  margin-right: 20px;
  padding: 20px;
  box-sizing: border-box;
  position: relative;
  border-radius: 8px;
  background-color: #f0f0f0;
  cursor: pointer;
  flex: 0 0 auto;
  transition: opacity 0.3s;
  font-size: 0.9rem;
  text-align: center;
}
.slide:last-child {
  margin-right: 0;
}
.slide:not(.active) {
  opacity: 0.5;
}
.slide.active {
  opacity: 1;
}
.slide-preview {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.4;
}
.subtitle,
.date {
  line-height: 1.4;
}
.slide-full {
  display: none;
}

.toggle-full {
  position: relative;
  background-color: black;
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  margin-top: 10px;
  font-size: 0.9rem;
  border-radius: 5px;
}

.arrows-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}
.prev-slide,
.next-slide {
  background: none;
  color: black;
  border: none;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  margin: 0 10px;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-overlay.active {
  display: flex;
}
.modal-content {
  background: #fff;
  color: #000;
  width: 80%;
  max-height: 80%;
  overflow-y: auto;
  position: relative;
  padding: 20px;
  border-radius: 8px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.dark-mode .modal-content {
  background-color: #333;
  color: #fff;
}
.dark-mode .modal-close {
  color: #fff;
}

.timeline {
  margin-left: 14.7%;
  margin-right: 20%;
  padding-top: 20px;
  box-sizing: border-box;
  position: relative;
}
.timeline-item::before {
  display: none;
}
.timeline-item {
  position: relative;
  margin-bottom: 60px;
}
.timeline-header {
  cursor: default;
  padding: 10px;
  background: none;
  border: none;
}
.timeline-header h3 {
  margin: 0;
  font-size: 1.1rem;
}
.timeline-header span {
  font-size: 0.9rem;
  color: #666;
}
.timeline-details {
  display: none;
  padding: 10px;
  border: none;
}
.dashed-line {
  border-top: 1px dashed gray;
  margin: 10px auto;
  width: 97%;
}

.carousel {
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}
.carousel-slide {
  display: none;
  padding: 10px;
}
.carousel-slide.active {
  display: block;
}
.carousel-nav {
  text-align: center;
}
.carousel-nav button {
  background: #f1eeee;
  border: none;
  padding: 5px 10px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
}

.toggle-details-btn {
  display: block;
  margin: 10px auto;
  padding: 8px 16px;
  font-size: 0.7rem;
  text-transform: uppercase;
  background: none;
  color: black;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
}
.toggle-details-btn:hover {
  background: gray;
}
.toggle-arrow {
  display: block;
  width: 80%;
  margin: 0 auto;
  transform: scaleX(3.5) scaleY(0.5);
  transform-origin: center;
  font-size: 1rem;
  margin-top: 4px;
}

.cta {
  text-align: center;
  margin: 40px 0;
}
.cta-btn,
.cta-1,
.cta-2 {
  display: inline-block;
  padding: 15px 30px;
  font-size: 1.2rem;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s, border 0.3s;
}
.cta-btn {
  background-color: #000;
  color: #fff;
}
.cta-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
}
.cta-1 {
  background-color: #000;
  color: #fff;
}
.cta-2 {
  background-color: #fff;
  color: #000;
}
.cta-1:hover,
.cta-2:hover,
.cta-btn:hover {
  background-color: gray;
}
.dark-mode .cta-1 {
  background-color: #fff;
  color: #000;
}
.dark-mode .cta-2 {
  background-color: #000;
  color: #fff;
}
.dark-mode .cta-1:hover,
.dark-mode .cta-2:hover {
  background-color: grey;
}

footer {
  background-color: black;
  color: white;
  text-align: center;
  padding: 20px 0;
  font-family: 'Courier New', Courier, monospace;
  margin-top: 120px;
}
footer.min-margin {
  margin-top: 70px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  margin-top: 50px;
  margin-bottom: 50px;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.footer-nav ul li a {
  color: white;
  text-decoration: none;
  font-size: 1rem;
}
.footer-nav ul li a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .navbar-container {
    justify-content: space-between;
    padding-left: 20px;
  }
  .brand {
    position: static;
    transform: none;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: black;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    display: none;
  }

  .nav-menu li a {
    text-align: center;
    font-size: 1.5rem;
    padding: 20px;
  }

  .page-parcours .nav-menu li a {
    text-align: center;
    font-size: 1.2rem;
    padding: 15px 20px;
  }
  .nav-toggle-label {
    display: block;
  }
  .nav-toggle:checked + .nav-toggle-label + .nav-menu {
    display: flex;
  }

  .menu-toggle-close {
    display: block;
    margin-bottom: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
  }

  .sidebar {
    display: none;
  }

  .page-container {
    margin-left: 0;
    padding-top: 20px;
  }
  .content {
    padding: 20px;
    max-width: 90%;
    margin: 20px auto;
  }

  .slider-container {
    width: 100%;
    transform: none !important;
    display: block;
    text-align: center;
  }
  .slider-track {
    transform: none !important;
    display: block !important;
    transition: none !important;
  }
  .slide {
    width: 100%;
    display: none;
  }
  .slide.active {
    display: block;
    margin: 0 auto;
  }
  .slide .subtitle,
  .slide .date,
  .slide .slide-full {
    display: none !important;
  }
  .prev-slide,
  .next-slide {
    display: inline-flex;
    margin: 10px;
    vertical-align: middle;
  }

  .cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .cta-1,
  .cta-2 {
    width: 80%;
    margin: 10px 0;
    text-align: center;
  }

  .footer-nav ul {
    display: block;
    text-align: center;
  }
  .footer-nav ul li {
    margin: 10px 0;
  }

  .page-parcours .nav-menu {
    margin-top: 20px;
  }
}

@media (min-width: 769px) {

  .nav-menu {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .footer-nav ul {
    display: flex;
    justify-content: center;
    gap: 15px;
  }
}