

:root {
  --violet-clair: #ede7f6;
  --violet: #9575cd;
  --violet-foncé: #7e57c2;
  --lavande: #f3e5f5;
  --texte: #333;
  --fond: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--fond);
  color: var(--texte);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}


<style>
/* Style de base */
body {
  font-family: Arial, sans-serif;
}

header {
  background-color: var(--violet);
  color: white;
  padding: 20px 0;
}

.container {
  width: 90%;
  margin: 0 auto;
}

h1 {
  margin: 0;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
}

nav ul li {
  position: relative;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  display: block;
}

/* Sous-menu caché par défaut */
nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--violet);
  color: white;
  min-width: 160px;
  z-index: 1000;
}

/* Affichage du sous-menu au survol */
nav ul li:hover > ul {
  display: block;
}

nav ul li ul li {
  width: 100%;
}

nav ul li ul li a:hover {
  background-color: #3d566e;
}


header {
  background-color: var(--violet);
  color: white;
  padding: 1rem 0;
}

header h1 {
  text-align: center;
  margin-bottom: 0.5rem;
}

nav ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  list-style: none;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

main {
  display: flex;
  flex-wrap: wrap;
  margin-top: 2rem;
  gap: 2rem;
}

.sidebar {
  flex: 1 1 250px;
  background-color: var(--violet-clair);
  padding: 1rem;
  border-radius: 8px;
}

.sidebar h2 {
  margin-bottom: 1rem;
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 0.5rem;
}

.sidebar a {
  text-decoration: none;
  color: var(--violet-foncé);
}

.content {
  flex: 2 1 600px;
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.content img {
  max-width: 100%;
  height: auto;
  margin-top: 1rem;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: var(--lavande);
  margin-top: 2rem;
  color: #555;
}

.button-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--violet);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--violet-foncé);
  transform: translateY(-2px);
}

/* Menu vertical amélioré */
.menu-vertical {
  width: 250px;
  background-color: #f9f9f9;
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.menu-section {
  margin-bottom: 10px;
}

.menu-title {
  cursor: pointer;
  padding: 10px;
  background-color: #e0e0e0;
  border: 1px solid #ccc;
  font-weight: bold;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.menu-title:hover {
  background-color: #d0d0d0;
}

.menu-title .arrow {
  font-size: 0.8em;
  transition: transform 0.3s ease;
}

.menu-title.active .arrow {
  transform: rotate(90deg);
}

.menu-links {
  display: none;
  list-style-type: none;
  padding-left: 15px;
  margin: 0;
  animation: fadeIn 0.3s ease-in-out;
}

.menu-links li {
  margin: 5px 0;
}

.menu-links a {
  text-decoration: none;
  color: #0066cc;
}

.menu-links a:hover {
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 rem;
  margin-top: 2rem;
}


/* Bouton hamburger */
.sidebar-toggle {
  display: none;
  font-size: 1.5rem;
  background-color: var(--violet);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  margin: 1rem 0;
  border-radius: 6px;
  cursor: pointer;
}

/* Mode mobile */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .sidebar.show {
    display: block;
    margin-top: 1rem;
  }

  .sidebar-toggle {
    display: block;
  }
}

/* Ajustements du header et du menu pour mobile */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.2rem; /* Réduction du titre */
  }

  nav ul {
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
    gap: 0.5rem;
  }

  nav ul li a {
    font-size: 0.9rem; /* Texte du menu plus petit */
    padding: 0.4rem 0.6rem;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1rem; /* Encore plus petit sur très petits écrans */
  }

  nav ul {
    gap: 0.3rem;
  }

  nav ul li a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
  }
}
