/* Styles pour l'application OFF - Mode Concentration */

/* Variables de couleurs - Thème clair (par défaut) */
:root {
  --bg-color: #f5f5f5;
  --text-color: #333;
  --header-color: #2c3e50;
  --subtitle-color: #7f8c8d;
  --button-bg: #ede8d0;
  --button-hover-bg: #EDE8D0;
  --button-text: #ffffff;
  --timer-color: #2c3e50;
  --status-color: #7f8c8d;
  --quote-bg: #ecf0f1;
  --quote-color: #34495e;
  --control-bg: #ecf0f1;
  --control-hover-bg: #bdc3c7;
  --success-color: #27ae60;
  --primary-button-bg: #27ae60;
  --primary-button-hover: #219d54;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --border-color: #ddd;
}

/* Variables pour le thème sombre */
[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #f5f5f5;
  --header-color: #ffffff;
  --subtitle-color: #aaaaaa;
  --button-bg: #333333;
  --button-hover-bg: #444444;
  --button-text: #ffffff;
  --timer-color: #f5f5f5;
  --status-color: #aaaaaa;
  --quote-bg: rgba(255, 255, 255, 0.05);
  --quote-color: #cccccc;
  --control-bg: #333333;
  --control-hover-bg: #444444;
  --success-color: #4CAF50;
  --primary-button-bg: #3a7a3a;
  --primary-button-hover: #4a8a4a;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --border-color: #444;
}

/* Transition fluide pour les changements de thème */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Réinitialisation et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* En-tête */
header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  position: relative;
}

h1 {
  font-size: 48px;
  letter-spacing: 2px;
  margin-bottom: 5px;
  color: var(--header-color);
}

.subtitle {
  font-size: 18px;
  color: var(--subtitle-color);
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: var(--button-bg);
  border: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  font-size: 24px;
  padding: 15px 10px;
  color: var(--text-color);
  transition: all 0.3s ease;
  box-shadow: -2px 0 5px var(--shadow-color);
  z-index: 100;
}

.theme-toggle:hover {
  padding-right: 15px;
}

/* Welcome message and quote on home screen */
.welcome-message {
  margin-bottom: 20px;
  background-color: var(--quote-bg);
  padding: 15px;
  border-radius: 10px;
  max-width: 600px;
  text-align: center;
}

#quote-home {
  font-style: italic;
  color: var(--quote-color);
  line-height: 1.6;
}

/* Music options */
.music-options {
  width: 100%;
  text-align: center;
  margin-bottom: 30px;
}

.music-options h3 {
  margin-bottom: 15px;
  color: var(--header-color);
  font-weight: 300;
}

.sound-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.sound-button {
  padding: 10px 15px;
  background-color: var(--button-bg);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sound-button:hover {
  background-color: var(--button-hover-bg);
  transform: translateY(-2px);
}

.sound-button.active {
  background-color: var(--primary-button-bg);
  color: white;
}

/* Gestion des écrans */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.screen.active {
  display: flex;
}

/* Écran principal - Choix du temps */
.time-options {
  width: 100%;
  text-align: center;
}

.time-options h2 {
  margin-bottom: 15px;
  color: var(--header-color);
  font-weight: 300;
}

.time-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.time-button {
  padding: 15px;
  font-size: 18px;
  border: none;
  border-radius: 10px;
  background-color: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.time-button:hover {
  background-color: var(--button-hover-bg);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.time-button img {
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

/* Écran de concentration */
.tree-container {
  margin-bottom: 30px;
  text-align: center;
}

#tree-image {
  height: 250px;
  transition: all 0.5s ease;
}

.timer-container {
  text-align: center;
  margin-bottom: 20px;
}

#timer {
  font-size: 48px;
  font-weight: bold;
  color: var(--timer-color);
  margin-bottom: 10px;
}

#status-message {
  font-size: 18px;
  color: var(--status-color);
  margin-bottom: 20px;
}

.quote-container {
  background-color: var(--quote-bg);
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  max-width: 600px;
  text-align: center;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#quote-display {
  font-style: italic;
  color: var(--quote-color);
  line-height: 1.6;
}

.controls-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
}

.control-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background-color: var(--control-bg);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  flex: 1;
  width: 100%;
  min-width: 120px;
}

.control-button:hover {
  background-color: var(--control-hover-bg);
}

.control-button .icon {
  font-size: 24px;
  margin-bottom: 5px;
}

/* Withered tree screen */
.withered-message {
  text-align: center;
}

.withered-message h2 {
  color: #e74c3c;
  font-size: 32px;
  margin-bottom: 15px;
}

.withered-message p {
  margin-bottom: 15px;
  font-size: 18px;
}

.countdown-text {
  font-size: 20px;
  color: #e67e22;
  font-weight: bold;
  margin-bottom: 20px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.withered-tree {
  margin: 30px 0;
}

.withered-tree img {
  height: 250px;
}

.withered-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.secondary-button {
  padding: 15px 30px;
  font-size: 18px;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  background-color: var(--bg-color);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.secondary-button:hover {
  background-color: var(--button-hover-bg);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* Écran de succès */
.success-message {
  text-align: center;
}

.success-message h2 {
  margin-bottom: 15px;
  color: var(--success-color);
  font-size: 32px;
}

.success-message p {
  margin-bottom: 30px;
  font-size: 18px;
}

.mature-tree {
  margin: 40px 0;
}

.mature-tree img {
  height: 250px;
}

.primary-button {
  padding: 15px 30px;
  font-size: 18px;
  border: none;
  border-radius: 50px;
  background-color: var(--primary-button-bg);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.primary-button:hover {
  background-color: var(--primary-button-hover);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

/* Responsive design */
@media (max-width: 768px) {
  .time-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .time-buttons {
    grid-template-columns: 1fr;
  }
  
  #timer {
    font-size: 36px;
  }
  
  h1 {
    font-size: 36px;
  }
  
  .quote-container {
    padding: 15px;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .control-button {
    width: 100%;
    justify-content: center;
  }
}