@charset "UTF-8";
.form-group {
  margin-bottom: 1rem;
}

.form-control.form-focusable,
.input-group > .form-control.form-focusable {
  border: none;
  background-color: transparent;
  box-shadow: none;
  padding-block-end: 0;
  border-radius: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.form-control.form-focusable:focus,
.input-group > .form-control.form-focusable:focus {
  border-radius: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-color: transparent;
  box-shadow: none;
  outline: none;
  border-bottom: var(--mdb-border-width) var(--mdb-border-style) var(--mdb-primary) !important;
}

/**
 * UI : Sélecteurs personnalisés
 */
.form-selectable {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 5px 0;
}

.form-selectable-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* État Hover */
.form-selectable-item:hover {
  transform: scale(1.1);
}

/* État Actif (Sélectionné) */
.form-selectable-item.active {
  border-color: #7d2ae8; /* Couleur violette de ta capture */
}

/* L'indicateur de check (le petit v violet) */
.form-selectable-item.active::after {
  content: "\f058"; /* Font Awesome Check Circle */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--mdb-body-bg);
  color: #7d2ae8;
  border-radius: 50%;
  line-height: 1;
  font-size: 14px;
}

/* On cache l'input réel mais on le garde pour la soumission du formulaire */
.form-selectable-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Styles spécifiques pour les pastilles de couleur */
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Styles spécifiques pour les icônes */
.icon-swatch {
  width: 40px;
  height: 40px;
  background-color: var(--mdb-tertiary-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mdb-body-color);
}

.modal .modal-header {
  padding-block: 0.25rem 0.2rem;
  border-bottom: none;
  padding-inline: 0.75rem;
}
.modal .modal-footer {
  padding-block: 0.2rem 0.25rem;
  border-top: none;
  padding-inline: 0.75rem;
}
.modal .modal-body {
  padding-block: 0.25rem;
  padding-inline: 0.75rem;
}

/* Styles spécifiques au layout d'authentification */
[data-layout=auth] .auth-background {
  background-image: url('{{ app_asset("images/auth-cover.jpg") }}');
  background-size: cover;
  background-position: center;
  background-attachment: fixed; /* Évite les sauts sur mobile au scroll */
  background-repeat: no-repeat;
}
[data-layout=auth] .auth-overlay {
  background-color: rgba(15, 23, 42, 0.7); /* Filtre sombre */
  /* Utilisation de dvh (dynamic viewport height) mieux supporté sur iOS/Android Safari */
  min-height: 100vh;
  min-height: 100dvh;
}
[data-layout=auth] .auth-card {
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  background: var(--mdb-body-bg, rgba(255, 255, 255, 0.95));
}

[data-layout=dashboard] {
  /* === RESPONSIVE SIDEBAR (MOBILE FIRST) === */
  display: flex;
  height: 100vh;
  overflow: hidden;
  padding-right: 0px;
  /* 1. Styles par défaut (Mobile & Petites Tablettes / < 992px) */
}
[data-layout=dashboard] .app-sidebar {
  width: 100%;
  max-width: 300px;
  z-index: 1040;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0;
  /* Comportement mobile : Fixé par-dessus et caché à gauche */
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  transform: translateX(-100%);
}
[data-layout=dashboard] .app-sidebar.show {
  /* Révélation au clic sur le menu burger */
  transform: translateX(0);
}
[data-layout=dashboard] .app-sidebar {
  /* === STYLES DES LIENS DE NAVIGATION (SIDEBAR) === */
}
[data-layout=dashboard] .app-sidebar .nav-link {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  color: var(--mdb-body-color);
}
[data-layout=dashboard] .app-sidebar .nav-link:hover {
  background-color: var(--mdb-tertiary-bg);
  transform: translateX(2px);
}
[data-layout=dashboard] .app-sidebar .nav-link.active, [data-layout=dashboard] .app-sidebar .nav-link[aria-current=page] {
  background-color: var(--mdb-tertiary-bg);
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
  color: var(--mdb-primary) !important;
  border-left: 3px solid var(--mdb-primary);
  border-radius: 0 8px 8px 0 !important;
}
[data-layout=dashboard] .sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}
[data-layout=dashboard] .sidebar-overlay.show {
  opacity: 1;
  visibility: visible;
}
[data-layout=dashboard] {
  /* 2. Styles pour Desktop (min-width: 992px) */
}
@media (min-width: 992px) {
  [data-layout=dashboard] .app-sidebar {
    /* Reprend sa place dans le flux flexbox principal */
    position: relative;
    height: auto;
    /* Toujours visible sur grand écran */
    transform: translateX(0);
  }
  [data-layout=dashboard] .sidebar-overlay {
    /* Overlay inutile sur grand écran */
    display: none !important;
  }
}

/* ============================================
 * SPACE VIEW : Inputs focusables (plaintext -> input)
 * Note : le sélecteur `.form-focusable` standalone est distinct
 * du sélecteur `.form-control.form-focusable` existant (spécificité supérieure).
 * ============================================ */
.form-focusable:not(.form-control) {
  border: 1px solid transparent;
  background-color: transparent;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  width: 100%;
  transition: all 0.2s ease;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
  outline: none;
  box-shadow: none;
  text-overflow: ellipsis;
}
.form-focusable:not(.form-control):hover {
  background-color: var(--mdb-tertiary-bg, rgba(0, 0, 0, 0.03));
}
.form-focusable:not(.form-control):focus {
  border-color: var(--mdb-border-color);
  background-color: var(--mdb-body-bg);
  box-shadow: 0 0 0 2px rgba(125, 42, 232, 0.1);
  text-overflow: clip;
}
.form-focusable:not(.form-control).completed {
  text-decoration: line-through;
  color: var(--mdb-secondary-color);
}

/* ============================================
 * SPACE VIEW : Boutons d'actions (toujours visibles)
 * ============================================ */
.action-btn {
  opacity: 1;
  transition: opacity 0.2s, color 0.2s;
  background: transparent;
  border: none;
}
.action-btn:hover {
  color: #7d2ae8 !important;
}

.action-btn-dropdown {
  opacity: 1;
}

/* ============================================
 * SPACE VIEW : Composant Todo Row
 * ============================================ */
.todo-row {
  transition: background-color 0.15s ease;
  border-radius: 8px;
  border: 1px solid transparent;
}
.todo-row:hover {
  background-color: #f8fafc;
  border-color: #f1f5f9;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* ============================================
 * SPACE VIEW : Composant Note Card
 * ============================================ */
.note-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
}
.note-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.note-content p:last-child {
  margin-bottom: 0;
}
.note-content h1,
.note-content h2,
.note-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1e293b;
}
.note-content ul {
  padding-left: 1.2rem;
}

/* ============================================
 * SPACE VIEW : Composant Folder Card
 * ============================================ */
.folder-card {
  border: none;
  border-radius: 12px;
  position: relative;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 120px;
  transition: transform 0.2s ease;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  z-index: 1;
}
.folder-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
.folder-card::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 0;
  width: 45%;
  height: 20px;
  background-color: inherit;
  border-radius: 12px 12px 0 0;
  filter: brightness(0.95);
  z-index: -1;
}

/* ============================================
 * SPACE VIEW : Composant File Row
 * ============================================ */
.file-row {
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  transition: all 0.2s;
  margin-bottom: 0.5rem;
  cursor: grab; /* Indique qu'on peut l'attraper */
}
.file-row:hover {
  background: #f8f9fa;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.file-row {
  /* État quand on est en train de le glisser */
}
.file-row.dragging {
  opacity: 0.5;
  border-style: dashed;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.file-row .file-icon {
  font-size: 1.5rem;
  width: 40px;
  text-align: center;
}

/* ============================================
 * SPACE VIEW : Navigation par onglets
 * ============================================ */
.space-tabs .nav-link {
  color: var(--mdb-secondary-color);
  font-weight: 500;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 1.5rem;
}
.space-tabs .nav-link:hover {
  border-color: transparent;
  color: #0f172a;
}
.space-tabs .nav-link.active {
  color: #7d2ae8;
  font-weight: 700;
  border-bottom: 3px solid #7d2ae8;
  background: transparent;
}

/* ============================================
 * SPACE VIEW : FAB contextuel (Bouton flottant)
 * ============================================ */
.fab-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1050;
  display: none; /* Caché par défaut, géré par JS */
}

.btn-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #7d2ae8;
  color: white;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(125, 42, 232, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: transform 0.2s;
}
.btn-fab:hover {
  transform: scale(1.05);
  color: white;
}

.fab-menu-group {
  display: none;
}
.fab-menu-group.active {
  display: block;
}

/* ============================================
 * SPACE VIEW : Bouton paramètres de l'espace
 * ============================================ */
.btn-space-settings {
  color: var(--mdb-secondary-color);
  transition: color 0.2s, transform 0.2s, background-color 0.2s;
  padding: 0.5rem;
  margin-left: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.btn-space-settings:hover {
  color: var(--mdb-body-color);
  transform: rotate(90deg);
  background-color: var(--mdb-tertiary-bg);
}

.folder-row-container {
  margin-bottom: 0.5rem;
}

.folder-row {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.folder-row:hover {
  background-color: #f8fafc;
}
.folder-row {
  /* Animation du chevron */
}
.folder-row .chevron-icon {
  transition: transform 0.3s ease;
}
.folder-row.expanded .chevron-icon {
  transform: rotate(90deg);
}

.folder-files-container {
  border-left: 2px solid #e2e8f0;
  margin-left: 1.2rem;
  padding-left: 1rem;
  margin-top: 0.5rem;
}

.drag-over {
  background-color: rgba(125, 42, 232, 0.05) !important; /* Violet très clair */
  border: 2px dashed #7d2ae8 !important; /* Bordure pointillée violette */
  border-radius: 10px;
}