
/* ===== VARIABLES CSS ===== */
:root {

  /* Couleurs principales */
  --color-bg1: #8360c3;
  --color-bg2: #2ebf91;
  --color-dark: #222;
  --color-light: #fff;
  --color-text-dark: #222;
  --color-text-light: #f5f5f5;

  /* Couleurs secondaires */
  --color-accent: #2ebf91;
  --color-accent-hover: #27a27d;
  --color-shadow: rgba(0, 0, 0, 0.1);
  --color-subtle-bg: rgba(255, 255, 255, 0.15);
  --color-hover-bg: rgba(46, 191, 145, 0.4);

  /* Bordures / radius */
  --radius: 10px;
  --radius-sm: 4px;
  --radius-lg: 8px;

  /* Textes */
  --font-main: 'Roboto', sans-serif;
  --font-title: 'Orbitron', sans-serif;

  /* Ombres */
  --shadow-small: 0 2px 6px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 10px rgba(0,0,0,0.1);
  --shadow-large: 0 4px 12px rgba(0,0,0,0.1);

  /* Animations */
  --fade-duration: 0.6s;
}

/* =============== GLOBAL ================== */

body {
  font-family: var(--font-main);
  margin: 0;
  background: linear-gradient(135deg, var(--color-bg1), var(--color-bg2));
  color: var(--color-text-dark);
}

#bloc-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  opacity: 0;
  animation: pageFadeIn var(--fade-duration) ease forwards;
}

#bloc-page.fade-out {
  animation: pageFadeOut 0.5s ease forwards;
}

/* ========== Header ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-dark);
  color: var(--color-light);
  padding: 15px 40px;
}

header .logo {
  display: flex;
  align-items: center;
}

header img {
  height: 50px;
  margin-right: 15px;
}

header h1 {
  font-family: var(--font-title);
  font-size: 1.5em;
  letter-spacing: 1px;
  color: var(--color-accent);
}

/* Navigation */
.nav-header ul {
  display: flex;
  list-style: none;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-header a {
  text-decoration: none;
  color: white;
  font-weight: 700;
  transition: color 0.3s ease;
}

.nav-header a:hover,
.nav-header a.active {
  color: var(--color-accent);
}

/* ========== Main Layout ========== */
#main-section {
  display: flex;
  flex: 1;
  padding: 20px;
  gap: 20px;
}

/* ========== Sidebar (Menu vertical) ========== */
.side-menu {
  width: 250px;
  background: var(--color-subtle-bg);
  padding: 15px;
  border-radius: var(--radius);
  backdrop-filter: blur(5px);
  color: var(--color-light);
}

.side-menu h2 {
  font-family: var(--font-title);
  color: var(--color-light);
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 5px;
  margin-top: 20px;
}

.menu-vertical,
.menu-vertical ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-vertical > li {
  margin-bottom: 8px;
}

.menu-vertical a {
  text-decoration: none;
  color: var(--color-text-light);
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.3s;
}

.menu-vertical a:hover {
  background: var(--color-hover-bg);
}

/* Sous-menu */
.menu-vertical ul {
  margin-left: 10px;
  display: none;
}

.menu-vertical li:hover > ul {
  display: block;
}

/* ========== Contenu principal ========== */
.content {
  flex: 1;
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-medium);
}

.cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
  padding: 20px;
  flex: 1;
  min-width: 250px;
  text-align: center;
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-5px);
}

.btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--color-accent);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: bold;
}

.btn:hover {
  background: var(--color-accent-hover);
}

/* ========== Footer ========== */
footer {
  background: var(--color-dark);
  color: #bbb;
  text-align: center;
  padding: 15px 0;
  font-size: 0.9em;
}

/* ========== Responsive ========== */
@media screen and (max-width: 900px) {
  #main-section {
    flex-direction: column;
  }

  .side-menu {
    width: 100%;
  }

  header {
    flex-direction: column;
    text-align: center;
  }

  .nav-header ul {
    flex-direction: column;
  }
}

/* ========== Levels ========== */
.levels {
  margin-top: 40px;
  text-align: center;
}

.levels h3 {
  color: var(--color-text-dark);
  margin-bottom: 15px;
  font-family: var(--font-title);
}

.level-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 0 auto;
  max-width: 600px;
}

.level-list li {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.level-list li a {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  white-space: nowrap;
  min-width: 120px;
}

.level-list li a:hover {
  background: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

@media screen and (max-width: 600px) {
  .level-list {
    gap: 10px;
  }

  .level-list li a {
    width: 100%;
    max-width: 200px;
    font-size: 0.9em;
  }
}

/* ========== Animations ========== */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#bloc-page.fade-out {
  animation: pageFadeOut 0.5s ease forwards;
}

@keyframes pageFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ========== FORMULAIRE DE CONTACT ========== */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 25px;
  background: rgba(255, 255, 255, 0.9);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-large);
  animation: fadeSlideUp 0.8s ease forwards;
}

.contact-form label {
  font-weight: 700;
  color: var(--color-text-dark);
}

.contact-form input,
.contact-form textarea {
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  font-family: var(--font-main);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 6px rgba(46,191,145,0.4);
  outline: none;
}

.contact-form .btn {
  align-self: flex-start;
  background: var(--color-accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.contact-form .btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

#success-message {
  display: none;
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
  color: var(--color-accent);
}

#error-message {
  display: none;
  margin-top: 10px;
  font-weight: bold;
  text-align: center;
  color: red;
}

.content h2 {
  font-family: var(--font-title);
  color: #2c3e50;
  text-align: center;
  margin-bottom: 10px;
}

.content p {
  text-align: center;
  color: #333;
  margin-bottom: 20px;
}

.logo img:hover {
  filter: drop-shadow(0 0 8px var(--color-accent));
  transition: 0.3s;
}

/* Icône SVG colorée pour les thèmes */
.icon-theme {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: top;
  color: var(--color-bg1);
}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

@media (max-width: 900px) {
  .side-menu {
    width: 100%;
    margin-bottom: 15px;
  }

  #main-section {
    padding: 10px;
  }

  .content {
    padding: 15px;
  }
}

.nav-header a:hover {
  color: var(--color-accent);
  text-shadow: 0 0 6px rgba(46,191,145,0.5);
}


.icon-white {
  filter: brightness(200%) saturate(0%);
}

.icon-maths {
  background-color:rgb(48, 2, 2);/* #58655e  rgb(106, 93, 106)*/
  border-radius: 50%;
}



@media (max-width: 880px) {
  #menu-masque {
    display: none;
  }
}



/*%%%%%%%%%%%%%%%%
header {
  position: fixed;
  top: 0;
  width: 100%;
}

#side-menu {
  position: fixed;
  left: 0;
  top: 60px; /* hauteur du header 
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
}


@media (max-width: 768px) {

  #side-menu {
      position: static;
      width: 100%;
  }

  footer {
      position: static;
  }

  /* eventuellement : masquer le menu latéral pour un menu hamburger */
  /* #side-menu { display: none; } 
}
*/