/* === Global === */
body {
  background: #FFEECC;
  color: #993333;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden; /* empêche le scroll horizontal */
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #993333;
  color: #FFEECC;
  text-align: center;
  padding: 10px;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#cookie-banner button {
  background: #FFEECC;
  color: #993333;
  border: none;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  width: auto;
}

a { color: #993333; text-decoration: none; }

button {
  padding: 10px 15px;
  border-radius: 10px;
  border: none;
  background: #993333;
  color: #FFEECC;
  cursor: pointer;
  display: inline-block;
}

/* === Header === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #993333;
  color: white;
  position: relative;
  z-index: 100;
}

.logo { display: flex; align-items: center; text-decoration: none; }
.mascotte { width: 3em; height: 3em; background: #FFEECC; border-radius: 50%; border: 3px solid #993333; margin-right: 10px; }
.text { font-family: 'Pacifico', cursive; font-size: 1.5rem; color: #993333; }

.menu-toggle { display: flex; flex-direction: column; cursor: pointer; gap: 5px; }
.menu-toggle div { width: 25px; height: 3px; background: white; }

#nav-menu { display: none; flex-direction: column; gap: 10px; position: absolute; top: 60px; right: 0; background: #993333; padding: 10px; border-radius: 10px; z-index: 1000; }
#nav-menu.show { display: flex; }
#nav-menu a { color: white; padding: 10px 0; }

/* === Formulaires === */
.form_connect {
  margin: 20px auto;
  text-align: center;
  background: #FFEECC;
  color: #993333;
  border: 2px solid #993333;
  border-radius: 15px;
  box-shadow: 0 6px 10px rgba(0,0,0,0.2);
  padding: 20px;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
}

textarea, input {
  width: 100%;              /* 🔥 largeur totale dans le bloc */
  padding: 10px;
  margin: 8px 0;
  border-radius: 10px;
  border: 1px solid #993333;
  font-size: 1rem;
  box-sizing: border-box;
  display: block;
}

.form_connect button {
  display: block;           /* 🔥 bouton centré */
  margin: 12px auto;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: #993333;
  color: #FFEECC;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.form_connect button:hover {
  background: #cc4444;
}

/* === Cards === */
.card, .reply-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
  margin: 10px auto;
  padding: 15px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden; /* empêche le scroll horizontal */
}

.reply-card {
  margin-left: 15px;
  background: #FFF7E6;
  border-left: 3px solid #993333;
  padding: 10px;
  max-width: 100%;
}

/* === Media === */
.card img, .reply-card img,
.card video, .reply-card video {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* === Emoji picker === */
.emoji-picker {
  margin-top: 6px;
  user-select: none;
  display: flex;       /* 🔥 emojis en ligne */
  flex-wrap: wrap;     /* retour ligne si trop long */
  gap: 5px;
}
.emoji {
  border: 0;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  display: inline-block;
}
.emoji:focus { outline: none; }

/* === Actions post === */
.post-actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.post-actions a.btn-action {
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 10px;
  color: #993333;
  font-size: 0.9rem;
  transition: 0.2s;
}
.post-actions a.btn-action:hover { background: #FFCC99; color: #993333; }

/* === Popups demandes amis === */
.friend-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border: 2px double #993333;
  padding: 12px 15px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  z-index: 10000;
  animation: fadeIn 0.5s ease;
  font-size: 14px;
  margin-bottom: 10px;
}
.friend-popup button {
  padding: 4px 8px;
  border-radius: 4px;
  border: none;
  font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
}
.friend-popup .accept { background:#28a745; color:#fff; }
.friend-popup .reject { background:#dc3545; color:#fff; }
.friend-popup .accept:hover { background:#218838; }
.friend-popup .reject:hover { background:#c82333; }
.message {
    word-wrap: break-word;
    white-space: pre-wrap;
}
.avata {
  width: 75px;
}
@keyframes fadeIn {
  from { opacity:0; transform: translateY(-20px); }
  to { opacity:1; transform: translateY(0); }
}

/* === Responsive smartphones === */
@media (max-width: 768px) {
  .card, .reply-card { padding: 10px; margin: 5px; }
  textarea, input { width: 100%; }

  button {
    width: auto !important;
    margin: 5px auto !important; /* 🔥 centrage auto sur mobile */
    display: block !important;
  }
}
