:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #f39c12;
  --success-color: #27ae60;
  --danger-color: #e74c3c;
  --warning-color: #f39c12;
  --info-color: #3498db;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --bg-color: #f5f7fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --border-color: #e0e0e0;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-color: #1a1a1a;
  --card-bg: #2d2d2d;
  --text-color: #ffffff;
  --text-muted: #cccccc;
  --border-color: #404040;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: sans-serif;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1a1a1a;
  color: var(--text-color);
  transition: all 0.3s ease;
}
.titreSave {
  text-align: center;
  font-size: 30px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
h3 {
  font-size: 30px;
  text-align: center;
  text-transform: uppercase;
  margin: 48px 0 16px 0;
}
p {
  font-size: 20px;
  text-align: justify;
  margin-bottom: 0.6rem;
}
/* Wrapper centré */
.wrapper {
  width: 100%;
  max-width: 1260px;
  height: 92vh;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background: white;
  overflow: hidden;
  display: flex;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Wrapper centré */
.wrapper {
  width: 100%;
  max-width: 1260px;
  height: 92vh;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  background: white;
  overflow: hidden;
  display: flex;
}

/* Dashboard layout */
.dashboard {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 16px;
}

/* Hamburger */
.hamburger {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: #2c3e50;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  border-radius: 5px;
  cursor: pointer;
}
.inv,
.hidden {
  display: none;
  opacity: 0;
  visibility: hidden;
}
/* Sidebar */
.sidebar {
  width: 280px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  overflow-y: auto;
  transition: transform 0.3s ease;
  border-radius: 10px;

  display: flex;
  flex-direction: column;
  height: 85vh; /* pleine hauteur de l'écran */
  box-sizing: border-box;
}

.sidebar ul {
  list-style: none;
}

.sidebar li a {
  display: block;
  padding: 15px 20px;
  text-decoration: none;
  color: inherit;
}

.sidebar li a:hover {
  background: #34495e;
}

.user-profile {
  text-align: center;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  margin: 16px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.user-name {
  font-size: 24px;
  font-weight: 600;
}

.user-email a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
}

.barreAuth {
  margin: 16px auto;
  text-align: center;
  padding: 16px;
  width: 100%;
  border: 3px solid orange;
  border-radius: 10px;
}

.barreAuth:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 8px 8px 10px 16px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: var(--accent-color);
}

.nav-icon {
  margin-right: 16px;
  font-size: 24px;
}
.btnVersDemo {
  display: flex;
  align-items: center;
  font-size: 20px;
  text-transform: uppercase;
  color: rgb(75, 75, 75);
  border: 2px darkcyan dashed;
  border-radius: 10px;
  padding: 9px 16px;
  margin: 32px 0 48px 0;
  text-align: center;
  transition: all 0.2s ease-in;
}

.btnVersDemo:hover {
  cursor: pointer;
  border: 2px darkcyan solid;
}

.sousTitre {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-style: italic;
  color: rgb(75, 75, 75);
  border: 2px darkcyan dashed;
  border-radius: 10px;
  padding: 8px 16px;
  margin: 32px 0 48px 0;
  text-align: center;
  transition: all 0.2s ease-in;
}
/* Contenu */
.content {
  flex-grow: 1;
  overflow-y: auto;
  height: 100%;
  width: 100%;
}

/* Sections */
.content section {
  min-height: 85vh;
  border-bottom: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-margin-top: 32px;
  background: var(--card-bg);
  padding: 16px;
  margin: 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.content .section-title {
  font-size: 36px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-color);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  border-left: 6px solid green;
}

.content .section-title::before {
  content: "";
  width: 4px;
  height: 30px;
  margin-right: 16px;
}

.content p {
  margin-bottom: 10px;
}
/* Section iframe spécifique */
.iframe-section {
  padding: 0;
}

.iframe-section iframe {
  display: block;
  width: 100%;
  height: 90vh;
  border-radius: 10px;
}

/* mise en page */

.text-center {
  text-align: center;
}
/* Alignements, espaces, flottements  */
.flex-center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Theme Toggle */
.theme-toggle {
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
}

/*  Cards */

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: background 0.3s, box-shadow 0.3s;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text);
}

/* Stats Cards123 */
.stats123 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat123-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.stat123-number {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat123-label {
  font-size: 0.9em;
  opacity: 0.9;
}

.details123 {
  background-color: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-top: 20px;
}

.details123 h3 {
  color: #333;
  margin-top: 0;
}

.student123-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.student123-item {
  background: white;
  padding: 10px;
  border-left: 4px solid #667eea;
}

/* Stats Cards */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.stat-card {
  min-width: 180px;
  display: flex;
  align-items: center;
  background: var(--card-bg);
  margin: 8px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.stat-title {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
}

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

.share {
  background: var(--accent-color);
}

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

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

.grid-3 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
  /*     
            flex-direction: column;
            justify-content: center;*/
}

.grid-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-around;
}
.space-30 {
  padding-top: 30px;
}
.space-50 {
  padding-top: 50px;
}
.space-100 {
  margin-top: 100px;
}
/* Cards liens */
.card-lien {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  background: #f8f2e7;
  width: 160px;
  height: 130px;
  padding: 16px;
  margin: 8px;
  font-size: 16px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.card-lien:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.card-lien img {
  margin: 8px;
  width: 54px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.chart-card {
  background: var(--card-bg);
  padding: 24px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 1.16px;
  font-weight: 600;
  color: var(--text-color);
}

.chart-button {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 10px;
  transition: background 0.3s ease;
}

.chart-button:hover {
  background: #e67e22;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: 16px;
}

.chart-container.small {
  height: 200px;
}

.upload-section {
  max-width: 640px;
  border: 2px dashed #aaa;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  border-radius: 10px;
  background-color: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-rep {
  max-width: 640px;
  border: 2px dashed #aaa;
  margin: 0 auto;
  padding: 16px;
  text-align: center;
  margin-bottom: 16px;
  border-radius: 10px;
  background-color: #f9f9f9;
  position: relative;
  transition: all 0.3s ease;
}

.upload-section:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
  cursor: pointer;
}

.upload-section.dragover {
  border-color: #007bff;
  background-color: #e3f2fd;
}

.upload-icon {
  margin-bottom: 10px;
}

.down {
  width: 64px;
  height: 64px;
}

#borrowersFileInput {
  display: none;
}

.file-info {
  font-size: 12px;
  color: #666;
  margin-top: 5px;
}
/* Activity Table */
.activity-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.activity-table th,
.activity-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.activity-table th {
  background: var(--card-bg);
  font-weight: 600;
  color: var(--text-color);
}

.activity-table td {
  color: var(--text-muted);
}

.activity-table tr:hover {
  background: rgba(52, 152, 219, 0.1);
}

.status-badge {
  padding: 8px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
}

.status-active {
  background: rgba(39, 174, 96, 0.1);
  color: var(--success-color);
}

.status-inactive {
  background: rgba(231, 76, 60, 0.1);
  color: var(--danger-color);
}

/*  Gestion */
.contCards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 36px;
}

.gest-card {
  max-width: 180px;
  height: auto;
  margin: 16px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.cadreSup {
  background-color: #fefcef;
  display: grid;
  gap: 8px;
  grid-template-columns: 2fr 5fr;
  max-width: 100%;
  max-height: 260px;
  border: 3px solid red;
  padding: 8px 16px;
  margin: 16px;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
}

.cadreSup h2 {
  font-size: 1.16px;
}

.gest-card:hover,
.cadreSup:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
}

.img-sup {
  max-width: 180px;
  height: auto;
}

.textSup p {
  font-size: 16px;
}
.bordSup {
  border: 5px solid red;
  border-radius: 10px;
}
/*  */
.debugInfosOK {
  color: green;
  font-weight: bold;
  margin-top: 16px;
}

.debugInfosError {
  color: red;
  font-weight: bold;
  margin-top: 16px;
}

.hover-modal {
  display: none;
  position: absolute;
  z-index: 1000;
  background: #111;
  color: #fff;
  border-radius: 8px;
  padding: 14px 18px;
  max-width: 300px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  font-family: sans-serif;
  font-size: 16px;
}

.hover-modal h3 {
  margin-top: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-size: 16px;
  color: #ffc107;
}

.hover-modal div {
  text-align: justify;
}

.hover-modal {
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(5px);
  opacity: 0;
}

.hover-modal.show {
  transform: translateY(0);
  opacity: 1;
}

/* Graphismes */
p {
  text-align: justify;
}

.font-ill-0 {
  font-size: 20px;
  margin: 8px;
}

.font-ill-1 {
  font-size: 16px;
  margin: 8px;
}

.font-ill-2 {
  font-size: 48px;
  margin: 10px;
}

.font-ill-3 {
  font-size: 48px;
  margin: 16px;
}

.picto-card {
  max-width: 72px;
}

.pictoA {
  max-width: 90%;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
}

/* barre mémoire dispo */
.bar-container {
  width: 50%;
  margin: 0 auto;
  background-color: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  height: 25px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
}

.bar-used {
  background-color: #019d3a;
  height: 100%;
  width: 0;
  transition: width 1s ease-out;
}

.down {
  width: 64px;
  height: 64px;
}
/* Top et Flop */
.jour-item {
  max-width: 45%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 0.2em 0.5em;
  margin-bottom: 0.5em;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
  transition: background 0.3s;
}
.jour-item:hover {
  background: #eef6fc;
}

.jour-date {
  font-weight: bold;
  color: #2a6f97;
}

.jour-passage {
  color: #555;
}

.txtPass {
  font-style: italic;
  color: #888;
  margin-left: 4px;
}

/* Top and Flop */

.jourTop,
#jourFlop {
  flex: 1 1 300px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.jourTop {
  border-left: 6px solid #4caf50;
}

#jourFlop {
  border-left: 6px solid #f44336;
}

.jour-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  margin: 0.48px 0;
  border-radius: 6px;
  background: white;
  font-size: 1.16px;
  font-family: "Segoe UI", sans-serif;
  transition: background 0.3s;
}

.jour-item:hover {
  background: #f0f0f0;
}

.jour-date {
  font-weight: bold;
  color: #333;
}

.jour-passage {
  color: #666;
}

.txtPass {
  font-style: italic;
  font-size: 0.9em;
}

/* Responsive container for both */
.topFlopContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-around;
  margin-top: 16px;
}

/* Footer */
footer {
  max-width: 960px;
  margin-top: 16px;
  width: 100%;
  flex-shrink: 0;
  color: rgb(95, 95, 95);
  font-family: "Roboto", sans-serif;
  font-size: 8px;
  text-align: center;
  line-height: 1.4;
}
.footerGrid {
  display: grid;
  gap: 8px;
  grid-template-columns: 2fr 4fr 2fr;
}
/* Ligne de séparation */
.hr-light {
  height: 1px;
  background-color: blue;
  border: none;
  margin: 24px auto 16px;
}
/* Test storage */

.storage-header h3 {
  margin: 0;
  font-size: 10px;
  color: #1f2937;
}

.storage-header p {
  margin: 0.16px 0 16px;
  color: #4b5563;
  font-size: 16px;
}

.progress-bar-container {
  width: 30%;
  height: 14px;
  margin: 0 auto;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;

  background: linear-gradient(to right, #10b981, #059669);
  transition: width 0.5s ease;
}

.storage-info {
  font-size: 8px;
  font-weight: 400;
  color: #333333;
  text-align: center;
  text-transform: lowercase;
}

.storage-info .percent {
  color: #10b981;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }

  .hamburger {
    display: block;
  }

  .sidebar {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    transform: translateY(-200%);
    z-index: 9;
  }

  .sidebar.open {
    transform: translateY(0);
  }

  .cadreSup {
    max-height: 220px;
  }

  .cadreSup h2 {
    font-size: 10px;
  }

  .img-sup {
    max-width: 80px;
    height: auto;
  }

  .textSup p {
    font-size: 10px;
  }

  .jour-item {
    font-size: 10px;
  }

  .font-ill-0 {
    font-size: 10px;
    margin: 0.16px;
  }
}
/* syle charge sauvegarde */
#zipSection {
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  max-width: 100%;
  margin: 16px auto;
  font-family: "Segoe UI", sans-serif;
  background: #fefefe;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

#zipSection label {
  display: block;
  font-size: 24px;
  margin-bottom: 16px;
  cursor: pointer;
  color: #444;
}

#zipInput {
  font-size: 1.16px;
  padding: 8px;
}
