/* Reset & base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
  padding: 0;
  margin: 0;
}

/* Container */
.container {
  padding: 4rem 1rem 1rem;
  max-width: 960px;
  margin: auto;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* Header */
h2 {
  margin-bottom: 1rem;
  font-weight: 600;
  /*margin-top: 1vw;*/
}

h3 {
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Menu toggle */
.menu-toggle {
  position: fixed;
  top: 0.5vw;
  left: 2vw;
  z-index: 1001;
  background-color: #007bff;
  border: none;
  color: white;
  padding: 12px 15px;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.menu-toggle:hover {
  background-color: #0056b3;
}

/* Sidebar */
.side-menu {
  position: fixed;
  left: -250px;
  top: 0;
  height: 100%;
  width: 250px;
  background: #fff;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  transition: left 0.3s ease;
  padding-top: 60px;
  z-index: 1000;
}

.side-menu.active {
  left: 0;
}

.side-menu a {
  display: block;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.side-menu a:hover {
  background-color: #f0f0f0;
}

/* Overlay */
.overlay {
  position: fixed;
  display: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

.overlay.active {
  display: block;
}

/* Logout */
.logout-btn {
  float: right;
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.logout-btn:hover {
  background-color: #b52a37;
}

/* Event info */
#eventInfo {
  margin-top: 2rem;
  background-color: #e9f5ff;
  padding: 15px 20px;
  border-left: 5px solid #007bff;
  border-radius: 8px;
}

/* Buttons */
button {
  padding: 10px 16px;
  margin: 8px 4px 0 0;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

button[onclick*="Je participe"] {
  background-color: #28a745;
  color: white;
}

button[onclick*="Je ne participe pas"] {
  background-color: #ffc107;
  color: #000;
}

button[onclick*="Modifier"] {
  background-color: #6c757d;
  color: white;
}

button[onclick*="inviteGuest"] {
  background-color: #17a2b8;
  color: white;
}

button[onclick*="replaceMe"] {
  background-color: #6f42c1;
  color: white;
}

/* Transactions */
#transactionsContainer {
  margin-top: 2rem;
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 5px solid #17a2b8;
}

ul {
  list-style: none;
  margin: 0.5rem 0;
  padding-left: 1.2rem;
}

li {
  margin-bottom: 6px;
}

/* Modale */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px 25px;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.modal-content form {
  margin-top: 1rem;
}

.modal-content form label {
  margin-bottom: 6px; /* réduit l’espace vertical entre les champs */
  font-weight: 500;
  font-size: 0.95em;
  color: #333;
}

.modal-content form input {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 0.95em;
  margin-top: 4px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fdfdfd;
  transition: border-color 0.3s;
}

.modal-content form input:focus {
  border-color: #007bff;
  outline: none;
}

.modal-content form button[type="submit"] {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-size: 0.95em;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
}

.modal-content form button[type="submit"]:hover {
  background-color: #0056b3;
}

.modal-content button[type="submit"] {
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.modal-content button[type="submit"]:hover {
  background-color: #0056b3;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 4rem 1rem 1rem;
  }

  .logout-btn {
    float: none;
    width: 100%;
    margin-top: 1rem;
  }

  .side-menu {
    width: 220px;
  }

   .menu-toggle {
    width: calc(100% - 30px); /* comme .logout-btn */
    padding: 10px 15px;
    font-size: 1rem;
    border-radius: 6px;
    left: 15px;
    right: 15px;
  }

  .side-menu.active {
    padding-top: 70px; /* espace sous le bouton */
  }

  button {
    width: 100%;
    margin-bottom: 10px;
  }

  
}

.styled-form {
  max-width: 500px;
  margin: 0 auto 30px auto; /* 👈 centrage horizontal + marge bas */
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  text-align: center; /* 👈 centre les titres et formulaires */
}

.styled-form label {
  display: block;
  text-align: left; /* 👈 garde les labels à gauche */
  margin-bottom: 12px;
  font-weight: bold;
}

.styled-form input,
.styled-form select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
}

.styled-form button {
  padding: 10px 20px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

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

.side-menu{
  position:fixed; top:0; bottom:0; left:0;
  width:260px; max-width:85vw;
  background:#fff; box-shadow:0 8px 30px rgba(0,0,0,.12);
  transform:translateX(-100%); transition:transform .25s ease;
  z-index:1000;
}
.side-menu.open, .side-menu.active{ transform:translateX(0); }

.overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  opacity:0; pointer-events:none; transition:opacity .2s ease;
  z-index:900;
}
.overlay.active{ opacity:1; pointer-events:auto; }

/* Sous-menu */
.submenu { margin: 6px 0; }
.submenu-toggle {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  padding: 10px 12px;
  cursor: pointer;
}

/* style des liens du sous-menu */
.submenu-content {
  display: flex;
  flex-direction: column;
  padding-left: 12px;        /* petite indentation */
  border-left: 2px solid rgba(0,0,0,0.08);
  gap: 6px;
}

/* si tu veux une petite transition d'apparition */
.submenu-content[hidden] { display: none; }
