/* page crée par Andy Bangerter / dernière modification le 13.01.2026*/
/* page qui contient tous les styles du site */
/*GLOBAL*/
* {
  box-sizing: border-box;
  margin: 4px;
  padding: 4px;
  font-family: Arial, Helvetica, sans-serif;
}

/*BODY*/
body {
  margin: 0;
}

/* TEXTES*/
p {
  background-color: #ffffff;
  font-size: 1em;
}

pre {
  background-color: #ffffff;
  white-space: pre-wrap;
  word-wrap: break-word;
}

h1 {
  font-size: 2em;
  text-align: center;
}
h2{
  font-weight: bold;
  text-align: center;
}
h3 {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
}

/*LISTES / NAV*/
ul {
  list-style: none;
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  margin: 0;
  padding: 10px 0;
}

/*TABLEAUX*/
table {
  width: 50%;
  border-collapse: collapse;
  margin: 100px auto;
}

th,
td {
  border: 1px solid #333333;
  padding: 8px 12px;
  text-align: center;
}

th {
  background-color: #f2f2f2;
  font-weight: bold;
}

tr:hover {
  background-color: #e0e0e0;
}

/*LIENS */
a {
  text-decoration: none;
  color: #ffffff;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
  font-weight: 900;
}
.text{
  color: black;
  background: #a0a0a0;
  width: 400px;
  display: flex;
  flex-wrap: wrap;
  border-radius:20px;
  border-color: #c9c9c9;
  text-align: justify;
  margin: 10px;
  padding: 20px;
  
  
}
/* lien spécial*/
a.lien {
  color: #000000;
  font-weight: 400;
}

a.lien:hover {
  text-decoration: underline;
  font-weight: 600;
}

/*HEADER*/
header {
  position: relative;
  min-height: 20vh;
  color: #ffffff;
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://upload.wikimedia.org/wikipedia/commons/3/30/Michelet_salle_de_gym_1.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(4px);
  z-index: 0;
}

header > * {
  position: relative;
  z-index: 1;
}

/*NAV*/
nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
}

/*CLASSE SPÉCIALE*/
.resu {
  color: #000000;
  font-weight: 400;
}

.resu:hover {
  text-decoration: underline;
  font-weight: bold;
}

/* MODE SOMBRE */
body.dark-mode {
  background-color: #111111;
  color: #ffffff;
}

body.dark-mode p,
body.dark-mode pre {
  background-color: #222222;
  color: #ffffff;
}

body.dark-mode table,
body.dark-mode th,
body.dark-mode td {
  border-color: #ffffff;
}

body.dark-mode th {
  background-color: #444444;
}

body.dark-mode tr:hover {
  background-color: #555555;
}

body.dark-mode a {
  color: #dddddd;
}

body.dark-mode a.lien {
  color: #f2f2f2;
}

body.dark-mode a.lien:hover {
  color: #ffffff;
  text-decoration: underline;
}
body.dark-mode .text{
  background-color: #494949;
}

/* SWITCH TOGGLE  */
.switch {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 34px;
  z-index: 1000;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background-color: #4caf50;
  border-radius: 34px;
  transition: background-color 0.4s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.4s;
}

input:checked + .slider {
  background-color: #f44336;
}

input:checked + .slider::before {
  transform: translateX(26px);
}

/* MOBILE */
@media (max-width: 600px) {

  * {
    margin: 6px;
    padding: 6px;
  }

  ul {
    flex-direction: column;
    gap: 10px;
  }

  a {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
  }

  h1 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  p,
  pre {
    font-size: 1rem;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
  }

  table {
    width: 100%;
    margin: 20px auto;
    font-size: 0.9rem;
  }

  .switch {
    right: 50%;
    transform: translateX(50%);
  }
  .text{
    width: 100%;
  }
}
a.active {
  font-weight: bold;
  text-decoration: underline;
}


section{
  display: flex;
 flex-wrap: wrap;
 flex-direction: column;
 align-items: center;
}

