/* Variables Windows 98 */
:root {
  --transition-speed: 0.3s;
  --icon-size-desktop: 48px;
  --icon-size-tablet: 40px;
  --icon-size-mobile: 36px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Styles complémentaires à 98.css */
body {
  margin: 0;
  padding: 0;
  font-family: "MS Sans Serif", Arial, sans-serif;
  min-height: 100vh;
  background-image: url("wp_w98.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  overflow: hidden;
}

.container {
  position: relative;
  width: 100%;
  height: 100vh;
}

.window {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 800px;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.3);
  cursor: default;
  animation: startup 0.5s ease-out;
}

.welcome-text {
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
}

.app-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.app-button {
  display: flex;
  align-items: center;
  width: calc(50% - 5px);
  padding: 10px;
  /*border: 2px solid #dfdfdf; 
  background-color: #efefef; */
  cursor: pointer;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}

.app-button:active {
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

/* Styles pour les icônes */
.app-icon {
  width: var(--icon-size-desktop);
  height: var(--icon-size-desktop);
  margin-right: 10px;
  margin-bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.app-icon img {
  width: 100%;
  height: 100%;
  transition: transform var(--transition-speed);
}

.app-button:hover .app-icon img {
  transform: scale(1.1);
}

.app-info {
  flex-grow: 1;
}

.app-title {
  font-weight: bold;
  margin: 0;
}

.app-desc {
  margin: 0;
  font-size: 0.9em;
  color: #444;
}

.window-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid #dfdfdf;
  padding-top: 5px;
}

.status-bar-field {
  margin: 0;
  font-size: 0.9em;
}

/* Animation pour simuler le démarrage de Windows 98 */
@keyframes startup {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Curseur personnalisé pour les boutons */
.app-button:hover {
  background-color: #d0d0d0;
}

/* Media queries pour la responsivité */
@media (max-width: 1024px) {
  .app-icon {
    width: var(--icon-size-tablet);
    height: var(--icon-size-tablet);
  }
}

/* Mode mobile - affichage sans fenêtre */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .container {
    width: 100%;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .window {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    animation: none !important;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  /* Cacher la barre de titre sur mobile */
  .title-bar {
    display: none !important;
  }

  .window-body {
    padding: 20px;
    flex: 1;
  }

  .welcome-text {
    font-size: 1.5rem;
    margin-bottom: 15px;
  }

  .app-container {
    gap: 10px;
    margin: 20px 0;
  }

  .app-button {
    width: 100%;
    max-width: none;
    height: auto;
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 15px;
  }

  .app-icon {
    width: var(--icon-size-mobile);
    height: var(--icon-size-mobile);
    margin-bottom: 0;
    margin-right: 15px;
  }

  .app-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .app-title {
    font-size: 1.1rem;
    margin-bottom: 4px;
  }

  .app-desc {
    font-size: 0.85rem;
  }

  .status-bar {
    margin-top: auto;
    padding: 10px 0;
  }

  /* Cacher la barre des tâches sur mobile */
  .taskbar {
    display: none !important;
  }

  /* Désactiver les fonctionnalités de fenêtre sur mobile */
  .window.maximized,
  .window.minimized {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .window-body {
    padding: 15px;
  }

  .welcome-text {
    font-size: 1.3rem;
  }

  .app-button {
    padding: 12px;
  }

  .app-icon {
    width: calc(var(--icon-size-mobile) - 4px);
    height: calc(var(--icon-size-mobile) - 4px);
    margin-right: 12px;
  }

  .app-title {
    font-size: 1rem;
  }

  .app-desc {
    font-size: 0.8rem;
  }

  .status-bar {
    flex-direction: column;
    gap: 5px;
    text-align: center;
    font-size: 0.75rem;
  }
}

/* Barre de tâches Windows 98 */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border-top: 2px solid #ffffff;
  display: none; /* Cachée par défaut */
  align-items: center;
  padding: 4px;
  box-shadow: inset 0 2px 0 #dfdfdf, 0 -2px 4px rgba(0, 0, 0, 0.3);
  z-index: 10000;
}

.taskbar.visible {
  display: flex; /* Visible quand il y a des fenêtres minimisées */
}

.taskbar-window-list {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.taskbar-window {
  height: 32px;
  min-width: 150px;
  max-width: 200px;
  padding: 0 8px;
  background: #c0c0c0;
  border: 2px outset #dfdfdf;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
  cursor: pointer;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #ffffff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-window:active,
.taskbar-window.active {
  border-style: inset;
  box-shadow: inset -1px -1px #ffffff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}

.taskbar-window-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Styles pour le déplacement de fenêtre */
.window.maximized {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: 100vh !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
}

.window.maximized .window-body {
  flex: 1;
  overflow-y: auto;
}

.window.minimized {
  display: none;
}

.title-bar {
  cursor: move;
  user-select: none;
}

.window.dragging {
  opacity: 0.8;
}
