/* ==============================
   1. Styles globaux & Body
============================== */
body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #ffffff;
  color: #333;
}

body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* ==============================
   2. Dark Mode spécifiques
============================== */
body.dark-mode .sidebar {
  background-color: #1e1e1e;
  border-right: 1px solid #333;
}

body.dark-mode .links a {
  color: #80c784;
}

body.dark-mode .sidebar h1,
body.dark-mode .links h3,
body.dark-mode .content h2 {
  color: #80c784;
}

body.dark-mode footer {
  background-color: #222;
  color: #ccc;
  border-top: 1px solid #444;
}

body.dark-mode textarea,
body.dark-mode input {
  background-color: #222;
  color: #eee;
  border: 1px solid #555;
}

/* ==============================
   3. Layout principal
============================== */
.container {
  display: flex;
  min-height: 100vh;
  flex-direction: row;
}

a {
  color: #3cba00;
  text-decoration: none;
  font-weight: 500;
}

.sidebar {
  background-color: #ffffff;
  padding: 2rem;
  width: 175px;
  height: 100vh;
  border-right: 1px solid #e0e0e0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid #3cba00;
}

.sidebar h1 {
  margin: 0.5rem 0 0.2rem;
  font-size: 1.4rem;
}

.sidebar p {
  text-align: left;
  font-size: 0.95rem;
  color: #666;
}

.links {
  margin-top: auto;
  width: 100%;
  text-align: left;
  margin-bottom: 1.5rem;
}

.links h3 {
  color: #3cba00;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.links ul {
  list-style: none;
  padding: 0;
}

.links li {
  margin: 0.5rem 0;
}

.links a:hover {
  text-decoration: underline;
}

.links i {
  margin-right: 0.5rem;
}

.content {
  flex: 1;
  padding: 2rem 3rem;
  margin-left: 250px;
}

.content section {
  margin-bottom: 2.5rem;
  padding-top: 1rem;
  border-top: 3px solid #3cba00;
}

.content h2 {
  color: #3cba00;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.content p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.6rem;
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding: 1rem;
  background-color: #f5f5f5;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
}

/* ==============================
   4. Bouton menu toggle (mobile)
============================== */
.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 1001;
  background: #3cba00;
  border: none;
  color: white;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.menu-toggle.open i {
  content: "\f00d"; 
}

/* ==============================
   5. Responsive (mobile & tablette)
============================== */
@media screen and (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 75%;
    max-width: 200px;
    height: 100%;
    padding: 1.5rem 1rem;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #ffffff;
    transition: left 0.3s ease-in-out;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  }

  .sidebar.active {
    left: 0;
  }

  .content {
    margin-left: 0;
    padding: 1.2rem;
    padding-top: 80px;
  }

  .profile-pic {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }

  .sidebar h1 {
    font-size: 1.4rem;
    margin: 0.4rem 0;
  }

  .sidebar p {
    font-size: 0.95rem;
    text-align: left;
  }

  .links {
    text-align: left;
    margin-top: auto;
    width: 100%;
  }

  .links ul {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .links li {
    margin: 0;
  }

  .links a {
    font-size: 0.9rem;
    display: flex;
    align-items: left;
    justify-content: center;
  }

  .sidebar-header {
    margin: 0px;
    text-align: left;
    width: 100%;
  }
}

/* ==============================
   6. Bouton télécharge CV
============================== */
.btn-download-cv {
  display: inline-block;
  margin-top: 1em;
  padding: 0.6em 1.2em;
  background-color: #0077cc;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.btn-download-cv:hover {
  background-color: #005fa3;
}

/* ==============================
   7. Chess section
============================== */
.modes-container {
  display: flex;
  gap: 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 10px 0;
  justify-content: space-between;
}

.mode-block {
  flex: 1;
  padding: 0 15px;
  border-right: 1px solid #ccc;
  box-sizing: border-box;
}

.mode-block:last-child {
  border-right: none;
}

.mode-block h3 {
  margin-top: 0;
  color: #3cba00;
  text-align: center;
}

.mode-block ul {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
  text-align: center;
}

.mode-block li {
  margin-bottom: 0.4rem;
}

/* ==============================
   8. Popup modale
============================== */
.hidden-popup {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.hidden-popup.active {
  display: flex;
}

.popup-content {
  position: relative;
  background: white;
  color: black;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 0 25px rgba(0,0,0,0.25);
  text-align: center;
  max-width: 400px;
  z-index: 10000;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 24px;
  border: none;
  background: none;
  cursor: pointer;
  color: black;
  z-index: 10001;
}

body.dark-mode .popup-content {
  background: #222;
  color: #eee;
  box-shadow: 0 0 25px rgba(255,255,255,0.2);
}

body.dark-mode .close-btn {
  color: #eee;
}

/* ==============================
   9. Formulaires
============================== */
form label {
  display: block;
  margin: 12px 0 4px;
}

form input,
form textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 1em;
  max-width: 860px;
  color: #000;
  background-color: #fff;
}

body.dark-mode form input,
body.dark-mode form textarea {
  color: #eee;
  background-color: #222;
  border: 1px solid #555; 
}

form input[type="text"],
form input[type="email"] {
  max-width: 300px;
}

form button {
  width: 100%;
  margin-top: 15px;
  padding: 10px 20px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  max-width: 300px;
}

form button:hover {
  background-color: #005fa3;
}

.form-message {
  margin-top: 15px;
  color: green;
  font-weight: bold;
}

.form-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 250px;
}