body {
  background-color: #ffe8cc;
  font-family: 'Chewy', cursive;
  color: #333;
  margin: 0;
  padding: 0;
  text-align: center;
  overflow-x: hidden; /* Empêche le scroll horizontal */
  min-height: 100vh;
}

h1 {
  color: #ff69b4;
  font-size: 2.5rem;
  text-shadow: 2px 2px #b21561;
}

h2 {
  color: #ff69b4;
  font-size: 2.3rem;
  text-shadow: 2px 2px #b21561;
}

p.main-page{
  font-size: 1.8rem;
  color: #333;
  margin: 20px auto;
  max-width: 600px;
}

p.footer{
  font-size: 1.2rem;
  color: #333;
  margin: 20px auto;
  max-width: 600px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  text-align: center;
}

form {
  background-color: #f7bcd4;
  padding: 20px;
  margin: 30px auto;
  border-radius: 20px;
  width: 80%;
  max-width: 600px;
  box-shadow: 5px 5px 0 #b7dff5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-group {
  width: 90%;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;  /* Changed from flex-start to center */
  text-align: center;
}

label {
  margin-bottom: 5px;
  font-size: 1.2rem;
  color: #333;
  align-self: center;  /* Changed from flex-start to center */
}

input[type="text"], input[type="submit"] {
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  width: 100%;
  box-shadow: 2px 2px 0 #b7dff5;
  text-align: center;  /* Optional: centers the text inside inputs */
}

input[type="password"] {
  padding: 10px;
  margin: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  width: 100%;
  box-shadow: 2px 2px 0 #b7dff5;
  text-align: center;  /* Optional: centers the text inside inputs */
}

textarea {
  width: 100%;
  box-sizing: border-box;
  text-align: center;  /* Optional: centers the text inside inputs */
}

input[type="submit"] {
  background-color: #b7f5cb;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

input[type="submit"]:hover {
  background-color: #fcb97d;
}

/* Alignement des radio buttons */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Espace entre les options */
  margin-top: 10px;
  align-items: center; /* Centre les éléments horizontalement */
}

.radio-label {
  display: flex;
  align-items: center; /* Aligne verticalement le radio button et le texte */
  gap: 8px; /* Espace entre le radio button et le texte */
  cursor: pointer;
  font-size: 1rem;
  position: relative; /* Nécessaire pour positionner le ? */
}

.radio-label .tooltip {
  margin-left: 5px;
  position: absolute;
  right: -25px; /* Positionne le ? à droite du texte */
  top: 50%;
  transform: translateY(-50%); /* Centre verticalement le ? */
}

input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

.title{
  color: #40ade8;
  text-shadow: 2px 2px #0d557b;
  font-size: 2rem;
}

.message{
  color: #ff69b4;
}

/* The cards appearance */
.post-list {
  list-style: none;
  padding: 0;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
}

/* Rendre la carte entière cliquable */
.post-card {
  position: relative;
  background: linear-gradient(to right, #b7dff5, #f7bcd4);
  padding: 1rem 1.5rem;
  border-radius: 1.5rem;
  box-shadow: 5px 5px 0 #fcb97d;
  font-size: 1.1rem;
  font-weight: bold;
  color: #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card a {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.post-card a.card-content {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.post-card:hover {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 8px 8px 0 #fcb97d;
  background: linear-gradient(to right, #fcb97d, #b7f5cb);
}

/* On peut supprimer ou commenter ces règles qui ne sont plus nécessaires */
/* .post-card h2,
.post-card p {
  position: relative;
  z-index: 2;
} */

/* Sidebar styles */
.sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: #2f2f30; /* Fond opaque au lieu de transparent */
  padding: 20px;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.sidebar-text {
  color: white;
}
.sidebar.open {
  right: 0;
}

.toggle-btn {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: #f7bcd4;
  border: none;
  padding: 15px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 3px 3px 0 #fcb97d;
  transition: all 0.3s ease;
  z-index: 1000;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn img {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.toggle-btn:hover {
  transform: translateY(-50%) scale(1.1);
}

.toggle-btn.open img {
  transform: rotate(180deg);
}

.sidebar-posts {
  max-width: 100%;
}

.sidebar .post-card {
  transform: scale(0.9);
  margin: 10px 0;
}

/* Update main-content styling */
.main-content {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  transition: all 0.3s ease;
}

.main-content.shifted {
  width: calc(100% - 400px);
  margin-right: 400px;
}

/* Main content area that contains the post details */
.post-container {
  flex: 1;
  padding: 20px;
}

/* Update wrapper styling */
.wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  width: 100%;
}

/* Modifier le style du footer */
footer {
  margin-top: auto;
  padding: 20px;
  width: 100%;
  background-color: #ffe8cc;
  box-sizing: border-box;
}

.sticky-logo {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    text-decoration: none;
    z-index: 1000;
    background-color: #f7bcd4;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 3px 3px 0 #fcb97d;
    transition: all 0.3s ease;
}

.sticky-logo:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 5px 5px 0 #fcb97d;
}

.footer-icon {
    height: 55px;
    width: 55px;
    vertical-align: middle;
    margin: 0 8px;
    transition: transform 0.3s ease;
}

.footer-icon:hover {
    transform: scale(1.2);
}

.github-link,
.mail-link {
    text-decoration: none;
    display: inline-block;
}

.github-link:hover .footer-icon,
.mail-link:hover .footer-icon {
    transform: scale(1.2);
}

.button-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
}

.action-button {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-family: 'Chewy', cursive;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-button {
    background-color: #b7f5cb;
    color: #333;
    box-shadow: 3px 3px 0 #8ad4a7;
}

.delete-button {
    background-color: #f7bcd4;
    color: #333;
    box-shadow: 3px 3px 0 #d49bb3;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0 currentColor;
}

.edit-button:hover {
    background-color: #8ad4a7;
}

.delete-button:hover {
    background-color: #d49bb3;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* Plus sombre pour un effet dramatique */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content p {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 20px;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-danger {
  background-color: #e74c3c;
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
  transform: scale(1.05);
}

.btn-secondary {
  background-color: #bdc3c7;
  color: white;
}

.btn-secondary:hover {
  background-color: #95a5a6;
  transform: scale(1.05);
}

/* Animation pour la modale */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Style pour le ? */
.tooltip {
  display: inline-block;
  margin-left: 5px;
  background-color: #f7bcd4;
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  cursor: help;
  position: relative;
}

.tooltip:hover::after {
  content: attr(title);
  position: absolute;
  bottom: 125%; /* Position au-dessus du ? */
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff; /* Fond blanc */
  color: #000; /* Texte noir */
  padding: 8px 12px; /* Plus d'espace pour améliorer la lisibilité */
  border-radius: 5px;
  font-size: 1rem; /* Augmente la taille de la police */
  font-weight: normal; /* Supprime le gras */
  white-space: nowrap;
  z-index: 10;
  opacity: 1;
  visibility: visible;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Ajout d'une ombre pour un effet esthétique */
  text-align: center; /* Centre le texte */
}

.tooltip:hover::before {
  content: '';
  position: absolute;
  bottom: 115%; /* Position au-dessus du ? */
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #fff transparent transparent transparent; /* Triangle blanc */
  z-index: 10;
}

.tooltip::after,
.tooltip::before {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease-in-out;
}
