@import url('https://fonts.googleapis.com/css2?family=Nosifer&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Karla&display=swap');
* {
  box-sizing: border-box;
}
.body {
  font-family: 'Karla', sans-serif;
  background-color: #141414;
  color: #f5f5f5;
  line-height: 1.6;
  margin: 0; /* évite le décalage */
  padding: 0;
  overscroll-behavior: none; /* empêche le rebond sur mobile */
}

body {
  margin: 0; /* évite le décalage */
  padding: 0;
  overscroll-behavior: none; /* empêche le rebond sur mobile */
  padding-top: 80px; /* ou la hauteur réelle du header */
}

footer {
  position: sticky;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #111;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  border-top: 1px solid #333;
  z-index: 1000;

}

.push-footer {
    height: 30vh; /* Ajuste cette valeur selon la hauteur de ta page */
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
h1,
h2,
h3,
h4 {
  color: #990000;
}
a {
  color: #990000;
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: #f66;
}

header.site-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #111;
  border-bottom: 2px solid #990000;
  padding: 15px 25px;

  position: fixed; /* reste collé */
  top: 0;
  left: 0;
  width: 100%; /* prend toute la largeur de l’écran */
  z-index: 100;

  box-sizing: border-box; /* inclut padding et border dans la largeur */
}


.logo {
  font-size: 1.5em;
  color: #990000;
  font-family: 'Nosifer';
  text-decoration: none;
  animation: flicker 3s infinite;

}

nav a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}

nav a:hover {
  color: #990000;
}



.story {
  background: #141414;
  border: 1px solid #222;
  border-left: 4px solid #990000;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  transition: transform 0.2s, border-color 0.3s;
}
.story:hover {
  transform: translateY(-3px);
  border-left-color: #f66;
}
.story-title {
  display: inline-block;
  background: #990000;
  color: #fff;
  font-size: 1em;
  padding: 6px 30px;
  border-radius: 0 12px 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(255, 60, 60, 0.6);
  margin: 10px 0 10px 0; /* supprime la marge gauche */
  position: relative;
  left: 0; /* colle au bord gauche */
}

.story-title a {
  color: #fff;
  text-decoration: none;
}

.story-title a:hover {
  text-decoration: underline;
}


.meta {
  color: #aaa;
  font-size: 0.9em;
  margin-bottom: 10px;
}
.story-full {
  background: #161616;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 0 10px rgb(255 60 60 / 0.2);
}
.story h1 {
  color: #990000;
}
.story-full .meta {
  color: #999;
  font-size: 0.9em;
}
.story-full .body {
  margin-top: 20px;
  font-size: 1.1em;
}
.actions {
  margin-top: 20px;
}
form {
  background: #141414;
  padding: 5px;
  border-radius: 10px;
  border: 1px solid #222;
  box-shadow: 0 0 5px rgb(255 60 60 / 0.2);
}
label {
  display: block;
  margin-bottom: 10px;
  color: #f5f5f5;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #333;
  border-radius: 5px;
  background: #161616;
  color: #f5f5f5;
}
input:focus,
textarea:focus {
  outline: none;
  border-color: #990000;
  box-shadow: 0 0 5px #990000;
}


.errors {
  background: rgb(255 0 0 / 0.1);
  border-left: 4px solid #990000;
  padding: 10px 15px;
  margin-bottom: 20px;
  border-radius: 5px;
}
.errors p {
  margin: 0;
}
/* footer {
  text-align: center;
  font-size: 16px;
  padding: 20px;
  border-top: 1px solid #222;
  color: #990000;
  
} */
footer a {
  margin: 0;
  color: #990000;
}
@keyframes flicker {
  0%,
  19%,
  21%,
  23%,
  25%,
  54%,
  56%,
  100% {
    opacity: 1;
  }
  20%,
  24%,
  55% {
    opacity: 0.5;
  }
}
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #990000;
  border-radius: 10px;
}
::-webkit-scrollbar-track {
  background: #111;
}
h1 {
  text-align: center;
  font-family: "Nosifer", cursive;
  font-size: 1.2em;
  color: #990000;
  margin: 25px 0 15px;
  letter-spacing: 1px;
}
.tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin: 30px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 50vh;
}
.empty-state h2 {
  font-family: "Nosifer", cursive;
  color: #990000;
  margin-bottom: 15px;
  font-size: 1em;
}
.empty-state p {
  color: #ccc;
  font-size: 1.05em;
  max-width: 400px;
  line-height: 1.6;
}


.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #0a0a0a;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 12px 0;
  z-index: 1000;
  box-shadow: 0 -2px 6px rgb(0 0 0 / 0.6);
}
.bottom-nav a {
  text-decoration: none;
  color: #aaa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  transition: color 0.3s ease, transform 0.2s ease;
}
.bottom-nav a i {
  font-size: 1.4em;
  margin-bottom: 4px;
}
.bottom-nav a:hover {
  color: #f66;
  transform: translateY(-2px);
}
.bottom-nav a.active {
  color: #990000;
  font-weight: 700;
}
.bottom-nav span {
  font-size: 0.75em;
}
body {
  padding-bottom: 60px;
}

/* --- PROFIL --- */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #141414;
  border: 1px solid #222;
  border-left: 4px solid #990000;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.15);
  text-align: center;
}

.profile-info h1 {
  font-family: 'Nosifer', cursive;
  color: #990000;
  font-size: 1.5em;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.profile-info .join-date {
  color: #aaa;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.profile-info .bio {
  color: #ddd;
  font-size: 1em;
  max-width: 600px;
  margin: 0 auto 15px;
  line-height: 1.5;
}

.profile-actions {
  margin-top: 15px;
}

.logout-btn {
  display: inline-block;
  background-color: #990000;
  color: #fff;
  padding: 10px 25px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: bold;
}

.logout-btn:hover {
  background-color: #ff5c5c;
  transform: translateY(-2px);
}

/* Liste des histoires */
.profile-stories {
  background: #141414;
  border-radius: 10px;
  padding: 15px 20px;
  border: 1px solid #222;
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.1);
}

.profile-stories h2 {
  font-family: 'Nosifer', cursive;
  color: #990000;
  text-align: center;
  margin-bottom: 20px;
}

.profile-stories article {
  background: #0f0f0f;
  border: 1px solid #222;
  border-left: 4px solid #990000;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 15px;
  transition: transform 0.2s, border-color 0.3s;
}

.profile-stories article:hover {
  transform: translateY(-3px);
  border-left-color: #f66;
}

.profile-stories h3 a {
  color: #fff;
  text-decoration: none;
}

.profile-stories h3 a:hover {
  color: #990000;
}

.profile-stories p {
  color: #aaa;
  font-size: 0.9em;
}

/* Bouton de suppression */
.story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-btn {
  background-color: #2a0000;
  color: #990000;
  border: 1px solid #990000;
  padding: 6px 6px;
  border-radius: 5px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delete-btn:hover {
  background-color: #990000;
  color: #fff;
  transform: scale(1.05);
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}




/* =======================
   Container des commentaires
   ======================= */
.comments {
  margin-top: 40px;
  font-family: 'Inter', sans-serif;
  color: #eee;
}

/* =======================
   Textarea principale
   ======================= */
.comments textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #333;
  background: #111;
  color: #fff;
  padding: 10px;
}

/* =======================
   Carte parent
   ======================= */
.comment-card.parent-comment {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 15px;
  border: 1px solid #2a2a2a;
  transition: background 0.2s;
}

.comment-card.parent-comment:hover {
  background: #202020;
}

/* =======================
Section des commentaires
======================= */
.comments {
margin-top: 40px;
font-family: 'Inter', sans-serif;
color: #eee;
}

/* =======================
Zone de texte principale
======================= */
.comments textarea {
width: 100%;
border-radius: 8px;
border: 1px solid #333;
background: #111;
color: #fff;
padding: 10px;
resize: vertical;
}

/* =======================
Carte du commentaire parent
======================= */
.comment-card.parent-comment {
background: #1a1a1a;
border-radius: 12px;
padding: 16px;
margin-bottom: 15px;
border: 1px solid #2a2a2a;
transition: background 0.2s;
display: flex;
flex-direction: column; /* force la disposition verticale */
}

.comment-card.parent-comment:hover {
background: #202020;
}

/* =======================
En-tête du commentaire
======================= */
.comment-header {
display: block;
margin-bottom: 6px;
}

.comment-author {
font-weight: bold;
color: #00bcd4;
display: inline-block;
margin-right: 8px;
}

.comment-date {
color: #777;
font-size: 0.8em;
display: inline-block;
}

/* =======================
Contenu du commentaire
======================= */
.comment-content {
font-size: 0.95em;
line-height: 1.5;
margin-bottom: 8px;
white-space: pre-line;
}

/* =======================
Ligne commentaire
======================= */
.comment-row {
display: flex;
flex-direction: column; /* ✅ Les éléments (texte + actions) s'empilent verticalement */
gap: 6px;
}

/* =======================
Actions (boutons)
======================= */
.comment-actions {
display: flex;
flex-direction: row; /* ✅ Aligne les boutons horizontalement */
align-items: center;
gap: 10px;
margin: 8px 8px;
flex-wrap: wrap;
}

.comment-actions form {
display: inline;
}

/* =======================
Boutons
======================= */
.reply-btn,
.small-reply-btn,
.toggle-replies,
.delete-link {
background-color: #990000;
border: none;
color: #fff;
cursor: pointer;
font-size: 0.85em;
padding: 0.45rem 0.6rem;
border-radius: 4px;
line-height: 1;
transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
text-decoration: none;
}

/* Hover cohérent */
.reply-btn:hover,
.small-reply-btn:hover,
.toggle-replies:hover,
.delete-link:hover {
background-color: #e63232;
color: #fff;
transform: translateY(-1px);
}

/* Variante plus petite pour les sous-réponses */
.small-reply-btn {
font-size: 0.75em;
padding: 0.35rem 0.5rem;
margin-top: 2px;
}

/* Bouton Supprimer */
.delete-link {
background-color: transparent;
border: 1px solid #990000;
color: #990000;
}

.delete-link:hover {
background-color: #990000;
color: #fff;
}

/* =======================
Formulaires de réponse
======================= */
.reply-form textarea {
width: 100%;
border-radius: 8px;
border: 1px solid #333;
background: #111;
color: #fff;
padding: 8px;
margin-top: 5px;
box-sizing: border-box;
}

/* =======================
Bloc des réponses
======================= */
.replies {
margin-top: 10px;
margin-left: 20px;
border-left: 2px solid #333;
padding-left: 12px;
}

.replies.hidden {
display: none;
}

/* =======================
Carte de réponse
======================= */
.reply-card {
background: #171717;
border-radius: 10px;
padding: 10px;
margin-top: 6px;
border: 1px solid #2a2a2a;
}

.reply-item {
margin-bottom: 12px;
}

/* =======================
Texte des réponses
======================= */
.reply-item p {
font-size: 0.9em;
line-height: 1.4;
margin: 0 0 5px 0;
}



select {
  width: 100%;
  background: #111;
  color: #eee;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  font-size: 1em;
  font-family: 'Inter', sans-serif;
  appearance: none; /* enlève le style par défaut */
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background-image: linear-gradient(45deg, transparent 50%, #00bcd4 50%), 
                    linear-gradient(135deg, #00bcd4 50%, transparent 50%);
  background-position: calc(100% - 20px) center, calc(100% - 15px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

select:hover {
  border-color: #00bcd4;
  background-color: #1a1a1a;
}

select:focus {
  outline: none;
  border-color: #00bcd4;
  box-shadow: 0 0 6px #00bcd4;
}

.story-header {
  position: relative;
  margin-bottom: 10px;
}

.story-category {
  position: absolute;
  bottom: 30px; /* petit padding depuis le bas */
  right: 0px;  /* petit padding depuis la droite */
  background: #990000;
  color: #fff;
  font-size: 0.75em;
  padding: 4px 10px;
  border-radius: 12px 0px 0px 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(255, 60, 60, 0.6);
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Glow pulsant */
.glow {
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 8px rgba(255, 60, 60, 0.6), 0 0 12px rgba(255, 60, 60, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 60, 60, 0.8), 0 0 18px rgba(255, 60, 60, 0.6);
    transform: scale(1.02);
  }
  100% {
    box-shadow: 0 0 8px rgba(255, 60, 60, 0.6), 0 0 12px rgba(255, 60, 60, 0.4);
    transform: scale(1);
  }
}


.story:hover .story-category {
  background: #ff5c5c;
  transform: scale(1.05);
}


/* === Style global des boutons === */
button {
  background-color: #990000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: 
    background-color 0.3s ease,
    transform 0.1s ease,
    box-shadow 0.4s ease;
}

button:hover {
  background-color: #ff5c5c;
  box-shadow: 0 0 10px rgba(255, 90, 90, 0.6);
}

button:active {
  transform: scale(0.96);
  box-shadow: 0 0 15px rgba(255, 60, 60, 0.8);
}

/* === Barre d’onglets === */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

/* === Boutons d’onglet === */
.tabs button {
  background: none;
  border: none;
  color: #bbb;
  font-size: 1em;
  cursor: pointer;
  padding: 10px 22px;
  border-radius: 25px;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.tabs button.active {
  background-color: #990000;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 10px #990000;
}


/* === Effet hover sur onglets === */
.tabs button:active {
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 60, 60, 0.4);
  border-color: #990000;
}

#stories-container {
  transition: opacity 0.5s ease, transform 0.5s ease, filter 0.5s ease;
}


.fade-out {
  opacity: 0;
  text-shadow: 0 0 15px red;
}

.fade-in {
  opacity: 1;
  text-shadow: none;
}





.tabs select.tab-button {
  appearance: none; /* Supprime le style natif */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #111;
  color: #fff;
  border: none;
  padding: 10px 22px;
  margin: 10px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.tabs select.tab-button:hover {
  background-color: #222;
}

.tabs select.tab-button:focus {
  outline: none;
  box-shadow: 0 0 10px #990000;
}
.tabs {
  display: flex;
  flex-direction: column; /* menu en dessous */
  gap: 10px;
 
}

.button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* Transition fade lorsqu'on clique sur une histoire */
.fade-out-story {
    animation: fadeOutBody 0.1s forwards;
}

/* Animation fade + glow rouge pulsant */
@keyframes fadeOutBody {
    0% {
        opacity: 1;
        box-shadow: 0 0 0 rgba(255, 0, 0, 0);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 30px rgba(255, 0, 0, 0.6);
    }
    100% {
        opacity: 0;
        box-shadow: 0 0 50px rgba(255, 0, 0, 1);
    }
}

.delete-link {
  background: none;
  border: none;
  color: red;
  font-size: 0.8em;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.delete-link:hover {
  color: darkred;
}

/* ===============================
   Bloc d’actions (Upvote, etc.)
   =============================== */
.story .story-actions {
  text-align: center;
  margin: 12px 0 24px 0;
}

/* Texte d’introduction animé */
.story .like-text {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s; /* délai ajouté */
}

.story .like-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Formulaire centré */
.story .story-actions form {
  display: inline-block;
  margin: 0;
}

/* Bouton Upvote stylé */
.story .vote-btn {
  background: transparent;
  border: 1px solid #990000;
  color: #990000;
  border-radius: 6px;
  padding: 8px 36px;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.25s ease;
  opacity: 0;
  transform: scale(0.95);
}

/* Animation d’entrée du bouton */
.story .vote-btn.visible {
  opacity: 1;
  transform: scale(1);
  animation: pulseOnce 1.2s ease;
}

/* Animation pulsation douce */
@keyframes pulseOnce {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 60, 60, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(255, 60, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 60, 60, 0);
  }
}

.story .vote-btn:hover {
  background: #990000;
  color: #fff;
  transform: translateY(-1px);
}

.login-links {
    margin-top: 20px;
    text-align: center;
    font-size: 0.95em;
    line-height: 1.6;
}

.login-links a {
    color: #ff3c3c;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.login-links a:hover {
    text-decoration: underline;
    color: #d60000;
}

