/* cloud_drive.css - extrait du style de cloud_drive.html */
:root {
  --primary: #1976d2;
  --secondary: #424242;
  --success: #43a047;
  --danger: #e53935;
  --warning: #ffb300;
  --info: #039be5;
  --background: #f5f5f5;
  --header-background: #fff;
  --text: #222;
  --border: #e0e0e0;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --folder-color: #ffb300;
  --snackbar-bg: #333;
  --snackbar-success: #43a047;
  --snackbar-error: #e53935;
  --snackbar-info: #1976d2;
}

[data-theme="dark"] {
  --background: #1a1a1a;
  --header-background: #2d2d2d;
  --text: #f0f0f0;
  --border: #444;
  --folder-color: #ffca28;
  --snackbar-bg: #424242;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--background);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  min-height: 100vh;
}

header {
  background: var(--primary);
  padding: 1rem;
  color: white;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--header-background);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content {
  max-width: 1200px;
  margin: 1rem auto;
  background: var(--header-background);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card {
  background: var(--header-background);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.auth-container {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
}

h1, h2, h3 {
  margin-bottom: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--header-background);
  color: var(--text);
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-info {
  background: var(--info);
  color: white;
}

.btn-icon {
  padding: 0.5rem;
  background: transparent;
  color: var(--text);
}

.btn-icon:hover {
  background: var(--background);
}

button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--background);
  font-weight: 600;
}

tr:hover {
  background: var(--background);
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.actions button {
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

.alert {
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.theme-selector {
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--header-background);
  color: var(--text);
}

#snackbar {
  visibility: hidden;
  min-width: 300px;
  background-color: var(--snackbar-bg);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  z-index: 1000;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

#snackbar.show {
  visibility: visible;
  animation: fadein 0.5s, fadeout 0.5s 4.5s;
}

#snackbar.success {
  background-color: var(--snackbar-success);
}

#snackbar.error {
  background-color: var(--snackbar-error);
}

#snackbar.info {
  background-color: var(--snackbar-info);
}

.snackbar-content {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.snackbar-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
}

@keyframes fadein {
  from {bottom: 0; opacity: 0;}
  to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
  from {bottom: 30px; opacity: 1;}
  to {bottom: 0; opacity: 0;}
}

.breadcrumb {
  color: var(--text);
  font-size: 1.1em;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.account-card {
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

.folder-icon, .file-icon {
  margin-right: 0.5rem;
  display: inline-flex;
}

.navigation-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text);
  opacity: 0.7;
}

.preview-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  animation: fadeIn 0.3s;
}

.preview-content {
  background-color: var(--header-background);
  margin: 5% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow: auto;
  position: relative;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.preview-body {
  max-height: 60vh;
  overflow: auto;
}

.close-preview {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

.file-preview {
  white-space: pre-wrap;
  font-family: monospace;
  background: var(--background);
  padding: 1rem;
  border-radius: 4px;
}

.image-preview {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.svg-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.storage-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.storage-bar {
  flex: 1;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.storage-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 5px;
  transition: width 0.3s;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: var(--snackbar-bg);
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.8rem;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.status-online {
  background-color: var(--success);
}

.status-offline {
  background-color: var(--danger);
}
