@font-face {
  font-family: "Gaming";
  src: url(font/Retro\ Gaming.ttf);
}

:root {
  --bg-color: #000000;
  --text-color: #ffe3fb;
  --button-bg: #ffe3fb;
  --button-text: #52126a;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url("image/background1.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  font-family: 'Gaming';
  margin: 0;
  padding: 0;
  transition: background-image 1s ease-in-out, background-color 0.5s, color 0.5s;
}

/* Titre */
.title {
  position: fixed;
  top: 20px;
  left: 20px;
  font-family: 'Dancing Script', cursive;
  font-size: 28px;
  color: var(--text-color);
  z-index: 1000;
  transition: color 0.3s ease;
}

/* Timer */
h1 {
  font-size: 170px;
  margin: 30px 0;
  color: var(--text-color);
  transition: color 0.3s ease;
}

/* Contenu central */
.content {
  width: 98%;
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  text-align: center;
  z-index: 1;
}

/* Boutons principaux */
.buttons button {
  width: 12vw;
  padding: 10px;
  margin: 0 20px;
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 15px;
  font-size: 15px;
  font-family: "Gaming";
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Popup */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.95);
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  z-index: 9999;
}

.popup-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--button-text);
}

.popup input {
  padding: 10px;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
}

.popup button {
  margin-top: 10px;
  background-color: var(--button-bg);
  color: var(--button-text);
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-family: "Gaming";
  cursor: pointer;
}

.hidden {
  display: none;
}

/* Boutons en bas à droite */
.bottom-buttons {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.icon-button {
  background-color: var(--text-color); /* fond = textColor */
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, filter 0.2s ease;
  color: var(--button-text);
}

.icon-button img {
  width: 32px;
  height: 32px;
  display: block;
  filter: none;
}

/* Position verticale des boutons */
#open-sidebar {
  bottom: 20px;
}

#themeButton {
  bottom: 80px;
}

/* Animation au survol */
.icon-button:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* Menu Tâches */
.task-sidebar {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%) translateX(100%);
  width: 40%;
  height: 90vh;
  background-color: var(--button-bg); /* arrière-plan = buttonBg */
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.3);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.3s ease-in-out;
  z-index: 9999;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.task-sidebar.show {
  transform: translateY(-50%) translateX(0);
}

/* Boutons d’image généraux dans le menu des tâches */
.task-sidebar button {
  background-color: var(--text-color);   /* ✅ fond dynamique */
  border: none;
  border-radius: 10px;                   /* ✅ coins arrondis */
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Taille d'image à l’intérieur des boutons */
.task-sidebar button img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}


.task-header {
  text-align: center;
}

.task-header h2 {
  font-family: "Gaming";
  color: var(--text-color);
  margin: 0;
}

.task-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

/* Input pour nouvelle tâche */
.task-footer input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-family: "Gaming";
  background-color: var(--text-color); /* fond input = textColor */
  color: var(--button-bg);            /* texte input = buttonBg */
  border: none;
  outline: none;
}

.task-footer input::placeholder {
  color: var(--button-bg); /* ✅ Couleur du texte par défaut */
  opacity: 0.5; /* Pour forcer la visibilité complète */
}


/* Bouton + sans fond ni bordure */
.no-bg-button {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Liste des tâches */
.task-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
  padding: 0;
}

.task-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--text-color); /* fond tâche = textColor */
  color: var(--button-bg);             /* texte tâche = buttonBg */
  padding: 10px 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  font-family: "Gaming";
}

/* Bouton supprimer tâche */
.delete-task-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text-color);
}

.delete-task-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: none;
}

/* Bouton fermer sidebar */
/* Bouton fermer sidebar repositionné en bas à gauche */
.close-arrow {
  position: absolute;
  bottom: 15px;   /* place en bas */
  left: 15px;     /* à gauche */
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.close-arrow img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  filter: none;
}


/* Cacher les boutons open-sidebar et close-sidebar selon état */
.hidden-button {
  display: none !important;
}
