/* ===================
   RESET & BOX MODEL
=================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===================
   BASE STYLES (Dark mode par défaut)
=================== */
body {
  background-color: #242627;
  color: #f1f1f1;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}

html{
  color: #f1f1f1;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
}
body, body * {
  color: inherit;
}

/* Fix pour Chrome - garantir que les h1, h2... prennent la bonne couleur */
h1, h2, h3, h4, h5, h6,
p, li, label, .form-check-label, .description-text {
  color: inherit;
}

#modeToggle {
  height: 40px;
  cursor: pointer;
  border: none;
  background: transparent;
}
.toggleli:hover {
  background-color: #eee;
}

#modeToggle.position-absolute {
  margin-right: 20px;
  right: 20px;
  transform: translateY(-50%);
}

/* Light mode styling */
body.light-mode #modeToggle {
  border: none;
  color: #333;
  background-color: transparent;
}



/* Header */
.header {
  width: 100%;
  padding: 20px 30px;
  background-color: #000;
  color: white;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.header-logo {
  height: 50px;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.header-title {
  font-size: 1.6rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

/* Responsive header */
@media (max-width: 768px) {
  .header-logo {
    height: 40px;
  }
  .header-title {
    font-size: 1.3rem;
  }
}
@media (max-width: 576px) {
  .header-logo {
    height: 30px;
    left: 10px;
  }
  .header-title {
    font-size: 1.1rem;
  }
}

/* Description section */
.description-text {
  max-width: 2000px;
  padding: 20px 30px;
  font-size: 1.1rem;
  text-align: justify;
  color: inherit;
}

p, li, ul {
  color: inherit;
}

/* Card and form elements */
.card {
  background-color: #1e1e1e;
  border: 1px solid #000;
  color: inherit;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.4);
}

.card label,
.card .form-label {
  color: inherit;
}

input.form-control,
.form-control {
  color: #f1f1f1;
  background-color: #2a2a2a;
  border: 1px solid #555;
  border-radius: 6px;
  padding: 10px;
}

input.form-control::placeholder {
  color: #bbb;
}

input.form-control:focus,
.form-control:focus {
  background-color: #2a2a2a;
  color: #fff;
  border-color: #6d00d4;
  box-shadow: 0 0 0 0.2rem rgba(0, 188, 212, 0.25);
  outline: none;
}

/* Select */
.form-select {
  background-color: #2a2a2a;
  color: #f1f1f1;
  border: 1px solid #555;
}

.form-select option {
  color: #f1f1f1;
  background-color: #2a2a2a;
}

.form-select option:hover {
  background-color: #007bff;
  color: #fff;
}

/* Button */
.custom-btn {
  background-color: #5f05b4c4;
  color: white;
  font-weight: 500;
  border: none;
  padding: 0.5rem 1rem;
  transition: background-color 0.3s ease;
  border-radius: 6px;
  cursor: pointer;
}
.custom-btn:hover {
  background-color: #532083;
}
.border.rounded.shadow-sm {
  box-shadow: 0 4px 6px rgba(129, 129, 129, 0.856); /* Ombre légère */
}
/* ===================
   LIGHT MODE OVERRIDES
=================== */

body.light-mode {
  background-color: #f5f5f5;
  color: #000;
}

body.light-mode h1, 
body.light-mode h2, 
body.light-mode h3, 
body.light-mode h4, 
body.light-mode h5, 
body.light-mode h6,
body.light-mode label,
body.light-mode .form-check-label,
body.light-mode .description-text,
body.light-mode p,
body.light-mode li,
body.light-mode ul {
  color: #000;
}



/* Header */
body.light-mode .header {
  background-color: #fff;
  color: #000;
  border-bottom: 1px solid #ddd;
}
body.light-mode .header-title {
  color: #000;
}

/* Cards */
body.light-mode .card {
  background-color: #fff;
  color: #000;
  border: 1px solid #e0e0e0;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
}
body.light-mode .card label,
body.light-mode .card .form-label {
  color: #000;
}

/* Form fields */
body.light-mode input.form-control,
body.light-mode .form-control {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
}

body.light-mode input.form-control::placeholder {
  color: #666;
}

body.light-mode input.form-control:focus,
body.light-mode .form-control:focus {
  background-color: #fff;
  color: #000;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
  outline: none;
}

body.light-mode .form-select {
  background-color: #fff;
  color: #000;
  border: 1px solid #ccc;
}
body.light-mode .form-select option {
  color: #000;
  background-color: #fff;
}

body.light-mode .custom-btn {
  background-color: #0d6efd;
  color: white;
}
body.light-mode .custom-btn:hover {
  background-color: #0b58cc;
}
body.light-mode .border.rounded.shadow-sm {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Ombre similaire pour le mode clair */
}


#return_button {
  color: #f1f1f1;
}

/* Mode clair */
body.light-mode #return_button {
  color: #222;
}

/* Style pour le bouton du nom d'utilisateur */
#userDropdown {
  font-size: 1.1rem;
  font-weight: 500;
  color: white;
}

/* Light Mode */
body.light-mode #userDropdown {
  color: #333;
}

