/* Vintage macOS-Style Interface CSS */

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(15px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Desktop Background Pattern - Style vintage macOS */
.desktop::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.02) 2px,
      rgba(255, 255, 255, 0.02) 4px
    );
  pointer-events: none;
}

/* Desktop Icons */
.desktop-icons {
  animation: fadeIn 0.6s ease;
  position: relative;
  z-index: 1;
}

.desktop-icon {
  animation: slideUp 0.4s ease;
  animation-fill-mode: backwards;
}

.desktop-icon:nth-child(1) { animation-delay: 0.1s; }
.desktop-icon:nth-child(2) { animation-delay: 0.15s; }
.desktop-icon:nth-child(3) { animation-delay: 0.2s; }
.desktop-icon:nth-child(4) { animation-delay: 0.25s; }
.desktop-icon:nth-child(5) { animation-delay: 0.3s; }
.desktop-icon:nth-child(6) { animation-delay: 0.35s; }

/* Custom WinBox Styles - Vintage macOS */
.wb-full .wb-body {
  background: white !important;
}

.winbox {
  box-shadow: 
    0 0 0 1px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.3),
    0 2px 6px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #999;
}

.wb-header {
  background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 100%) !important;
  border-bottom: 1px solid #999 !important;
  height: 28px !important;
}

/* Boutons macOS vintage - Rouge/Vert */
.wb-close,
.wb-max {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(0, 0, 0, 0.3) !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.2s ease !important;
  margin: 0 3px !important;
}

.wb-close {
  background: linear-gradient(135deg, #ff5f57 0%, #ff3b30 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.wb-max {
  background: linear-gradient(135deg, #28ca42 0%, #20c933 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

.wb-close:hover,
.wb-max:hover {
  transform: scale(1.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 4px rgba(0, 0, 0, 0.3) !important;
}

/* Cacher le bouton minimize */
.wb-min {
  display: none !important;
}

.wb-title {
  color: #000 !important;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.6) !important;
  font-size: 12px !important;
  font-weight: bold !important;
  letter-spacing: 0.3px;
}

/* Scrollbar personnalisé - Style vintage macOS */
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  background: #f0f0f0;
}

::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-left: 1px solid #ccc;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d8d8d8 0%, #b8b8b8 100%);
  border: 1px solid #999;
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #c8c8c8 0%, #a8a8a8 100%);
}

::-webkit-scrollbar-button {
  height: 16px;
  background: linear-gradient(180deg, #e8e8e8 0%, #d0d0d0 100%);
  border: 1px solid #999;
}

::-webkit-scrollbar-button:hover {
  background: linear-gradient(180deg, #d8d8d8 0%, #c0c0c0 100%);
}

/* Responsive */
@media (max-width: 768px) {
  .desktop-icons {
    grid-template-columns: repeat(auto-fill, 80px);
    gap: 20px;
    padding: 15px;
  }
  
  .icon-image {
    width: 48px;
    height: 48px;
  }
  
  .icon-label {
    font-size: 11px;
  }
  
  .taskbar {
    height: 40px;
  }
  
  .taskbar-title,
  .taskbar-time {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .desktop-icons {
    grid-template-columns: repeat(auto-fill, 70px);
    gap: 15px;
    padding: 10px;
  }
  
  .icon-image {
    width: 40px;
    height: 40px;
  }
  
  .icon-label {
    font-size: 10px;
  }
}

/* Loading animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

/* Folder window styles */
.folder-grid::-webkit-scrollbar {
  width: 10px;
}

.folder-grid::-webkit-scrollbar-track {
  background: #f9f9f9;
}

.folder-grid::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 5px;
}

.folder-grid::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state img {
  width: 80px;
  height: 80px;
  opacity: 0.3;
  margin-bottom: 20px;
}

/* Window transitions */
.window-content {
  animation: fadeIn 0.3s ease;
}

/* Print styles */
@media print {
  .taskbar,
  .desktop-icons {
    display: none;
  }
  
  .winbox {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
