:root {
    --dark-bg: #121212;
    --blue-bg: #001f3d;
    --text-color: #ffffff;
    --nav-bg: rgba(0, 0, 0, 0.8);
    --hover-bg: rgba(255, 255, 255, 0.1);
    --hover-bg-dark: rgba(50, 50, 50, 0.9);
    --border-color: #ffffff;
}
html, body {
    height: 100%;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

main.content {
    margin-left: 0; /* ou 250px si la sidebar est ouverte */
    padding: 20px;
    min-height: 100vh;
    overflow-y: auto;
}


body.dark-theme {
    background-color: var(--dark-bg);
    color: var(--text-color);
    margin: 0;
    font-family: sans-serif;
}

.sidebar {
    height: 100%;
    width: 500px;
    position: fixed;
    top: 0;
    left: -500px; 
    background-color: var(--nav-bg);
    overflow-y: auto;   /* <== ajouter overflow-y pour scroll vertical */
    overflow-x: hidden; /* garder overflow-x hidden */
    transition: left 0.3s ease;
    padding-top: 50px;
    z-index: 999;
	    display: flex;
    flex-direction: column;
}


.sidebar ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
	margin-top: 0;
	max-height: calc(100vh - 50px); /* 50px correspond au padding top */
    overflow-y: auto;
	max-height: none;
	    padding-bottom: 20px;
}

.sidebar ul li a {
    padding: 8px 16px; /* Réduction de l'espacement vertical et horizontal */
    display: block;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s ease;
}


.sidebar ul li a:hover {
    background-color: var(--hover-bg);
}

.open-btn {
    font-size: 26px;
    cursor: pointer;
    background-color: transparent;
    color: var(--text-color);
    border: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 36px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

header {
    text-align: center;
    padding: 50px 20px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    position: relative;
}

#particles-js {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}


.title {
    color: var(--text-color);
    font-size: clamp(2rem, 8vw, 5rem);
}

.themecolor {
    font-size: clamp(1rem, 5vw, 2.5rem);
}

.text {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    text-align: left;
    margin-left: 15px;
}

.maintitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: bold;
}

.text1 {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: bold;
    text-align: left;
    margin-left: 8px;
}

.print,
.menu-button {
    display: inline-block;
    text-decoration: none;
    margin: 10px 4px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 12px;
    border: 2px solid white; 
    color: white;
    background-color: #000000; 
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.print:hover,
.menu-button:hover {
    background-color: #1a1a1a; 
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.buttonpdf {
    display: inline-block;
    text-decoration: none;
    margin: 10px 4px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 12px;
    border: 2px solid white; 
    color: white;
    background-color: #000000; 
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.buttonpdf:hover {
    background-color: #1a1a1a; 
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}


@media print {
    body * {
        visibility: hidden;
        font-size: 12px;
    }

    header, header * {
        visibility: visible;
    }

    header {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }

    #particles-js {
        display: none;
    }

    .maintitle {
        font-size: 20px;
    }

    .text1 {
        font-size: 16px;
    }

    .text {
        font-size: 14px;
    }
}

@media screen and (max-width: 768px) {
    .sidebar {
        left: -100%; 
    }
    .open-btn {
        font-size: 22px;
        top: 15px;
        left: 15px;
    }

    .close-btn {
        top: 15px;
        right: 20px;
        font-size: 30px;
    }
	.print,
    .menu-button {
        display: block;
        width: 90%;
        margin: 12px auto;
        font-size: 18px;
        padding: 16px;
		text-decoration:none;
	}
    .text, .text1, .maintitle, .themecolor {
        margin-left: 2px;
        text-align: left;
        max-width: 90%;
    }

    header {
        padding: 30px 15px;
    }

    .title {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }

    .print {
        font-size: 14px;
        padding: 8px 2px;
        position: relative;
    }
}

@media screen and (max-width: 480px) {
    .sidebar {
        left: -100%;
    }

    .open-btn {
        font-size: 24px;
    }

    .text, .text1, .maintitle, .themecolor {
        margin-left: 2px;
        text-align: left;
    }

    .print {
        width: 90%;
        padding: 8px 2px;
        font-size: 14px;
        position: relative;
    }

    header {
        padding: 20px 10px;
    }

    .title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }
}

@media screen and (min-width: 1200px) {
    header {
        padding: 80px 100px;
    }

    .title {
        font-size: clamp(3rem, 6vw, 6rem);
    }

    .text {
        max-width: 1000px;
        margin-left:2;
        text-align: left;
    }
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

@media screen and (max-width: 768px) {
    .menu-button {
        padding: 10px 20px;
        font-size: 16px;
        width: calc(100% - 48px);
        margin: 5px auto;
        display: block;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media screen and (max-width: 480px) {
    .menu-button {
        font-size: 14px;
        padding: 10px;
    }
}

.boutonpdf {
  position: absolute;
  top: 20px; /* Espace depuis le haut */
  left: 50%;
  transform: translateX(-50%);
  background-color: black;
  color: white;
  border: 2px solid white;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  z-index: 1000; /* Pour rester au-dessus d'autres éléments si nécessaire */
}

.boutonpdf:hover {
  background-color: white;
  color: black;
}
