/* --- SIPHADRIVE - STYLE OFFICIEL RETRO (2000s) --- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #111111;
  background-color: #ffffff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #2b5680;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- LOGO & BRANDING --- */
.brand-logo {
  font-size: 26px;
  line-height: 1;
  color: #ffffff;
  display: inline-flex;
  align-items: baseline;
  text-decoration: none !important;
}

.brand-logo .bold {
  font-family: "Arial Black", Arial, Gadget, sans-serif;
  font-weight: 900;
  letter-spacing: -1.5px;
}

.brand-logo .light {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: normal;
  letter-spacing: -0.5px;
}

.user-brand {
  font-size: 18px;
  color: #ffffff;
}

.user-brand .bold {
  font-family: "Arial Black", Arial, Gadget, sans-serif;
  font-weight: 900;
}

.user-brand .light {
  font-family: Arial, Helvetica, sans-serif;
}

/* --- STICKY HEADER WRAPPER --- */
.sticky-header-container {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 500;
  background-color: #ffffff;
  width: 100%;
}

/* --- HEADER & TOP BARS --- */
.header-main {
  background-color: #4575A8;
  color: #ffffff;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #38628d;
}

.header-user-menu {
  position: relative;
  display: inline-block;
}

.header-user-link {
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
}

.header-user-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.top-subbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 18px;
  background-color: #ffffff;
  border-bottom: 1px solid #d4dfec;
  flex-wrap: nowrap;
  gap: 15px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: nowrap;
  min-width: 0;
  flex: 1;
}

.nav-breadcrumbs {
  font-size: 13px;
  color: #4575A8;
  font-weight: normal;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-breadcrumbs a {
  color: #4575A8;
  font-weight: normal;
}

.nav-breadcrumbs span.sep {
  color: #8faecf;
  margin: 0 5px;
  font-weight: normal;
}

.btn-breadcrumb-more {
  background: none;
  border: 1px solid #c0d3e8;
  padding: 1px 4px;
  font-size: 11px;
  cursor: pointer;
  color: #4575A8;
  font-family: Arial, sans-serif;
  line-height: 1;
}

.btn-breadcrumb-more:hover {
  background-color: #eaf1f8;
}

/* --- SEARCH BAR (FIXED RIGHT) --- */
.search-form-retro {
  display: flex;
  align-items: center;
  border: 1px solid #4575A8;
  background-color: #ffffff;
  flex-shrink: 0;
}

.search-form-retro input[type="text"] {
  border: none;
  padding: 4px 8px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  outline: none;
  width: 170px;
}

.search-form-retro button {
  background-color: #4575A8;
  color: #ffffff;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
}

.search-form-retro button:hover {
  background-color: #38628d;
}

/* --- ACTIONS BAR (STRIP BLEUE) --- */
.actions-bar {
  background-color: #4575A8;
  color: #ffffff;
  padding: 6px 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  min-height: 34px;
  border-top: 1px solid #5887ba;
}

.actions-bar .actions-left {
  margin-right: auto;
  font-size: 12px;
  color: #dbe7f3;
}

.actions-bar button, .actions-bar a.action-btn {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-family: Arial, sans-serif;
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  padding: 2px 4px;
}

.actions-bar button:hover:not(:disabled), .actions-bar a.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}

.actions-bar button:disabled {
  color: #8daed3;
  cursor: not-allowed;
}

/* Typographie attachée pour les raccourcis */
.bold-letter {
  font-family: "Arial Black", Arial, Gadget, sans-serif;
  font-weight: 900;
  margin: 0;
  padding: 0;
}

/* --- DROPDOWN "NOUVEAU" & MENUS --- */
.dropdown {
  position: relative;
  display: inline-block;
}

.btn-nouveau {
  background-color: transparent;
  color: #4575A8;
  border: 1px solid transparent;
  font-family: Arial, sans-serif;
  font-size: 13px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
}

.btn-nouveau:hover, .btn-nouveau.active {
  background-color: #eaf1f8;
  border-color: #4575A8;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 170px;
  border: 1px solid #4575A8;
  z-index: 600;
  box-shadow: none;
}

.dropdown-content.right {
  left: auto;
  right: 0;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a, .dropdown-content button {
  color: #222222;
  padding: 7px 12px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  font-size: 12px;
  font-family: Arial, sans-serif;
  text-align: left;
  cursor: pointer;
}

.dropdown-content a:hover, .dropdown-content button:hover {
  background-color: #4575A8;
  color: #ffffff;
}

.dropdown-divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 3px 0;
}

.dropdown-header-info {
  padding: 6px 12px;
  font-size: 11px;
  color: #666666;
  background-color: #f7f9fb;
  border-bottom: 1px solid #eef2f6;
}

/* --- TABLEAU / LISTE DE FICHIERS --- */
.content-area {
  flex: 1;
  padding: 0;
  padding-bottom: 180px; /* Dégagement de sécurité pour les menus déroulants */
  background-color: #ffffff;
  overflow-x: auto;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
}

.file-row {
  border-bottom: 1px solid #4575A8;
  transition: background-color 0.1s;
}

.file-row:hover {
  background-color: #f0f5fa;
}

.file-row.selected {
  background-color: #e0ecf8;
}

.file-row td {
  padding: 7px 14px;
  vertical-align: middle;
}

.col-checkbox {
  width: 30px;
  text-align: center;
}

.col-icon {
  width: 32px;
  text-align: center;
}

.col-name {
  font-size: 13px;
}

.col-name a {
  color: #2b5680;
  font-weight: normal;
}

.col-owner {
  width: 110px;
  color: #555;
  font-size: 12px;
}

.col-size {
  width: 90px;
  text-align: right;
  color: #555;
  font-size: 12px;
}

.col-date {
  width: 160px;
  color: #666;
  font-size: 11px;
}

.col-dots {
  width: 35px;
  text-align: center;
}

.btn-dots {
  background: none;
  border: 1px solid transparent;
  color: #4575A8;
  font-size: 15px;
  font-weight: bold;
  padding: 1px 6px;
  cursor: pointer;
  line-height: 1;
}

.btn-dots:hover {
  background-color: #d6e4f2;
  border-color: #4575A8;
}

/* Badges indicateurs discrets */
.badge-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge-readonly {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.badge-pinned {
  background-color: #e2e3e5;
  color: #383d41;
  border: 1px solid #d6d8db;
}

/* --- PLACEHOLDERS D'ICÔNES RÉTRO --- */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.icon-folder-svg {
  width: 18px;
  height: 14px;
  background-color: #f7ca44;
  border: 1px solid #ba8d0c;
  border-radius: 1px;
  position: relative;
  display: inline-block;
}
.icon-folder-svg::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 1px;
  width: 7px;
  height: 3px;
  background-color: #f7ca44;
  border-top: 1px solid #ba8d0c;
  border-left: 1px solid #ba8d0c;
  border-right: 1px solid #ba8d0c;
}

.icon-file-svg {
  width: 14px;
  height: 17px;
  background-color: #ffffff;
  border: 1px solid #4575A8;
  border-radius: 1px;
  position: relative;
  display: inline-block;
}
.icon-file-svg::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 8px;
  height: 1px;
  background-color: #4575A8;
  box-shadow: 0 3px 0 #4575A8, 0 6px 0 #4575A8, 0 9px 0 #4575A8;
}

/* --- FLASH MESSAGES STICKY --- */
.flash-container {
  padding: 8px 18px;
  background-color: #fcf8e3;
  border-bottom: 1px solid #fbeed5;
  color: #8a6d3b;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: opacity 0.5s ease-out;
}

.flash-container.danger {
  background-color: #f2dede;
  border-color: #ebccd1;
  color: #a94442;
}

.flash-container.success {
  background-color: #dff0d8;
  border-color: #d6e9c6;
  color: #3c763d;
}

.flash-close {
  cursor: pointer;
  font-weight: bold;
  padding: 0 5px;
  color: inherit;
}
.flash-close:hover {
  opacity: 0.7;
}

/* --- FOOTER --- */
.footer-main {
  background-color: #4575A8;
  color: #ffffff;
  padding: 16px 18px;
  text-align: center;
  font-size: 13px;
  margin-top: auto;
  border-top: 2px solid #38628d;
}

.footer-main strong {
  font-family: "Arial Black", Arial, Gadget, sans-serif;
  font-weight: 900;
}

/* --- GESTIONNAIRE D'UPLOAD --- */
.upload-tray {
  position: fixed;
  bottom: 12px;
  right: 12px;
  width: 320px;
  background-color: #ffffff;
  border: 2px solid #4575A8;
  box-shadow: none;
  z-index: 1000;
  display: none;
}

.upload-tray.visible {
  display: block;
}

.upload-tray-header {
  background-color: #4575A8;
  color: #ffffff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.upload-tray-body {
  padding: 10px;
  font-size: 12px;
}

.retro-progress {
  height: 14px;
  background-color: #e4ecf3;
  border: 1px solid #4575A8;
  margin: 6px 0;
  overflow: hidden;
}

.retro-progress-bar {
  height: 100%;
  background-color: #4575A8;
  width: 0%;
}

/* --- MODALES RÉTRO SANS OMBRE --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-overlay.show {
  display: flex;
}

.retro-modal {
  background-color: #ffffff;
  border: 2px solid #4575A8;
  width: 90%;
  max-width: 440px;
  box-shadow: none;
}

.retro-modal-header {
  background-color: #4575A8;
  color: #ffffff;
  padding: 8px 12px;
  font-weight: bold;
  font-size: 13px;
}

.retro-modal-body {
  padding: 15px;
  font-size: 13px;
}

.retro-modal-footer {
  padding: 10px 15px;
  background-color: #f2f6fa;
  border-top: 1px solid #d4dfec;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn-retro {
  background-color: #e8f0f8;
  border: 1px solid #4575A8;
  padding: 5px 14px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  cursor: pointer;
  font-weight: bold;
  color: #2b5680;
}

.btn-retro:hover {
  background-color: #4575A8;
  color: #ffffff;
}

.btn-retro-primary {
  background-color: #4575A8;
  color: #ffffff;
  border-color: #38628d;
}

.btn-retro-primary:hover {
  background-color: #38628d;
}

.btn-retro-danger {
  background-color: #b73232;
  color: #ffffff;
  border-color: #781c1c;
}

.btn-retro-danger:hover {
  background-color: #8c1e1e;
}

.retro-input {
  width: 100%;
  padding: 5px;
  font-family: Arial, sans-serif;
  border: 1px solid #4575A8;
  margin-top: 6px;
  outline: none;
}

/* --- ARBORESCENCE RÉTRACTABLE --- */
.folder-tree-box {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #4575A8;
  background-color: #ffffff;
  margin-top: 8px;
  padding: 4px 0;
}

.tree-node {
  user-select: none;
}

.tree-row {
  display: flex;
  align-items: center;
  padding: 3px 6px;
  cursor: pointer;
}

.tree-row:hover {
  background-color: #eaf1f8;
}

.tree-row.selected {
  background-color: #4575A8;
  color: #ffffff;
}

.tree-toggle {
  display: inline-block;
  width: 16px;
  text-align: center;
  font-family: monospace;
  font-weight: bold;
  color: #4575A8;
  cursor: pointer;
}

.tree-row.selected .tree-toggle {
  color: #ffffff;
}

.tree-children {
  display: none;
}

.tree-children.open {
  display: block;
}