:root {
  --neon: #0f0;
  --white: #fff;
}

/* Reset et styles de base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  background: #000;
  color: #fff;
  font-family: sans-serif;
}
a {
  color: var(--neon);
  text-decoration: none;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--neon);
}
header h1 a {
  color: var(--neon);
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Formulaires */
input,
textarea,
button {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #111;
  border: 1px solid var(--neon);
  color: var(--white);
  border-radius: 4px;
}
button:hover {
  box-shadow: 0 0 8px var(--neon);
  cursor: pointer;
}

/* Cartes de contenu */
.card {
  border: 2px solid var(--neon);
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem auto;
  max-width: 600px;
  background: rgba(0,0,0,0.5);
}

/* Effet néon */
.neon {
  box-shadow: 0 0 8px var(--neon), inset 0 0 4px var(--neon);
}

/* Avatars */
.avatar,
.avatar-small {
  border-radius: 50%;
  object-fit: cover;
}
.avatar {
  width: 40px;
  height: 40px;
}
.avatar-small {
  width: 32px;
  height: 32px;
}

/* Images de post */
.post-img {
  max-width: 100%;
  margin-top: 0.5rem;
  height: auto;
}

/* Footer d’actions */
footer {
  margin-top: 0.5rem;
}
footer button {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  margin-right: 0.5rem;
}
footer button.active {
  color: var(--neon);
}

/* Modale */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 1rem;
}
.modal.open {
  display: flex;
}
.modal-content {
  background: #111;
  border: 2px solid var(--neon);
  border-radius: 8px;
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  margin: auto;
  position: relative;
}

/* FAB (bouton flottant) */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: var(--neon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #000;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,255,0,0.5);
  cursor: pointer;
  transition: transform .1s;
  z-index: 1000;
}
.fab:active {
  transform: scale(.95);
}

/* Responsiveness */
/* Mobile-first: styles de base ciblent déjà le mobile */
/* Header sur petits écrans */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .user-menu {
    width: 100%;
    justify-content: space-between;
  }
}

/* Tablettes */
@media (min-width: 601px) and (max-width: 900px) {
  .card {
    margin: 1rem;
    max-width: none;
  }
  header,
  main {
    padding: 1rem;
  }
}

/* Desktop et plus large */
@media (min-width: 901px) {
  .card {
    max-width: 600px;
    margin: 1rem auto;
  }
}

/* Modale plein écran sur très petits écrans */
@media (max-width: 400px) {
  .modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-width: none;
  }
}

/* Fluidité images et vidéos */
img,
video {
  max-width: 100%;
  height: auto;
}

/* Ajustement FAB sur très petits écrans */
@media (max-width: 500px) {
  .fab {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
}
