/* /home/bot/telegram-crm/landing-page/styles.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-blue: #1877f2;
  --primary-blue-hover: #1565d8;
  --navy: #0f0f0f;
  --gray-light: #e5e9f0;
  --accent-turquoise: #4fc3f7;
  --dark-bg: #0a0a0a;
  --card-bg: rgba(20, 20, 20, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter",
    sans-serif;
  background: #0f0f0f;
  color: var(--gray-light);
  line-height: 1.6;
  min-height: 100vh;
}

/* Appliquer le fade-in seulement sur la page d'accueil */
body.home {
  opacity: 0;
  transition: opacity 0.6s ease-in;
}

body.home.page-loaded {
  opacity: 1;
}

/* Cercles lumineux animés pour index.html */
.bg-circles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.circle {
  position: fixed;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(24, 119, 242, 0.18) 0%,
    rgba(24, 119, 242, 0.08) 35%,
    rgba(24, 119, 242, 0) 65%
  );
  animation: pulse 8s ease-in-out infinite;
  filter: blur(80px);
}

.circle-1 {
  width: 700px;
  height: 700px;
  top: 15%;
  right: 5%;
  animation-delay: 0s;
}

.circle-2 {
  width: 550px;
  height: 550px;
  bottom: 20%;
  left: 8%;
  animation-delay: 2.5s;
  display: block;
}

.circle-3 {
  width: 450px;
  height: 450px;
  top: 45%;
  left: 15%;
  animation-delay: 5s;
  display: block;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}
/* S'assurer que le contenu soit au-dessus */
.hero,
.navbar,
.footer {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ==================== NAVIGATION ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(20px);
  padding: 20px 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--gray-light);
  text-decoration: none;
  transition: opacity 0.3s;
}

.logo:hover {
  opacity: 0.8;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-buttons {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-login {
  padding: 10px 24px;
  background: transparent;
  color: var(--gray-light);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-login:hover {
  background: rgba(24, 119, 242, 0.1);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

.btn-register {
  padding: 10px 24px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-register:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 119, 242, 0.4);
}

/* ==================== HERO SECTION ==================== */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-left {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  color: white;
}

.gradient-text {
  background: linear-gradient(135deg, #1877f2, #4fc3f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description-box {
  margin-bottom: 40px;
  position: relative;
}

.hero-description {
  font-size: 20px;
  color: #d1d5db;
  line-height: 1.7;
  padding: 20px 20px 20px 24px;
  border-left: 4px solid var(--primary-blue);
  border-radius: 6px 0 0 6px;
  max-width: 520px;
}

.decoration-line {
  position: absolute;
  left: 20px;
  bottom: -50px;
  opacity: 0.8;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.btn-primary,
.btn-secondary {
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary {
  background: white;
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--primary-blue);
}

.btn-secondary:hover {
  background: rgba(24, 119, 242, 0.2);
  transform: translateY(-2px);
}

/* ==================== CHART IMAGE WITH DIAGONAL ANIMATION ==================== */
.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container {
  position: relative;
  width: 100%;
  max-width: 350px;
  animation: diagonalFloat 6s ease-in-out infinite;
}

@keyframes diagonalFloat {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(15px, -15px);
  }
}

.chart-image {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(24, 119, 242, 0.2));
}

.chart-star {
  position: absolute;
  animation: starSparkle 3s ease-in-out infinite;
}

@keyframes starSparkle {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

.chart-star.star-1 {
  top: 15%;
  left: 15%;
  animation-delay: 0s;
}

.chart-star.star-1 path {
  fill: #1877f2;
}

.chart-star.star-2 {
  top: 45%;
  right: 10%;
  animation-delay: 1s;
}

.chart-star.star-2 path {
  fill: #4fc3f7;
}

.chart-star.star-3 {
  bottom: 20%;
  left: 10%;
  animation-delay: 2s;
}

.chart-star.star-3 path {
  fill: #1877f2;
}

/* ==================== FOOTER ==================== */
.footer {
  background: rgba(15, 15, 15, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 0;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left p {
  color: #6b7280;
  font-size: 14px;
}

.footer-right {
  display: flex;
  gap: 32px;
  align-items: center;
}

.footer-right a {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-right a:hover,
.footer-right a.active {
  color: var(--primary-blue);
}

/* ==================== AUTH PAGES ==================== */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 120px 20px 40px;
}

.auth-container {
  width: 100%;
  max-width: 500px;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 48px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: block;
  border-radius: 16px;
}

.auth-header h1 {
  font-size: 32px;
  color: white;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: #8b95a8;
  font-size: 16px;
}

.auth-subtitle a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.auth-subtitle a:hover {
  color: var(--accent-turquoise);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group label {
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group label svg {
  opacity: 0.7;
}

.form-group input {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--gray-light);
  font-size: 16px;
  transition: all 0.3s;
  width: 100%;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.form-group input::placeholder {
  color: #6b7280;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper input {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #8b95a8;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.3s;
}

.toggle-password:hover {
  color: var(--primary-blue);
}

.forgot-password {
  text-align: right;
  margin-top: 4px;
}

.forgot-password a {
  color: var(--primary-blue);
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-password a:hover {
  color: var(--accent-turquoise);
}

.checkbox-group {
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #8b95a8;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: "✓";
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.checkbox-text {
  color: #8b95a8;
}

.checkbox-text a {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.checkbox-text a:hover {
  color: var(--accent-turquoise);
}

.btn-submit {
  padding: 16px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
}

.btn-submit:hover:not(:disabled) {
  background: var(--primary-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.4);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==================== CONTACT PAGE ==================== */
.contact-section {
  min-height: 100vh;
  padding: 140px 0 80px;
  text-align: center;
}

.contact-title {
  font-size: 48px;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
}

.contact-subtitle {
  font-size: 20px;
  color: #8b95a8;
  margin-bottom: 60px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto 80px;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.contact-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-blue);
  box-shadow: 0 12px 32px rgba(24, 119, 242, 0.2);
}

.contact-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.contact-icon.discord {
  background: rgba(88, 101, 242, 0.1);
  color: #5865f2;
}

.contact-icon.mail {
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
}

.contact-card h3 {
  font-size: 24px;
  color: white;
  margin: 0;
}

.contact-card p {
  color: #8b95a8;
  font-size: 16px;
  margin: 0;
}

.contact-info {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.contact-info h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 16px;
}

.contact-address {
  color: #8b95a8;
  font-size: 16px;
  line-height: 1.8;
}

/* ==================== LEGAL PAGES ==================== */
.legal-section {
  min-height: 100vh;
  padding: 140px 0 80px;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 60px;
  backdrop-filter: blur(10px);
}

.legal-content h1 {
  font-size: 42px;
  color: white;
  margin-bottom: 16px;
}

.last-updated {
  color: #8b95a8;
  font-size: 16px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.legal-text {
  color: #d1d5db;
  line-height: 1.8;
}

.legal-text h2 {
  font-size: 28px;
  color: white;
  margin: 40px 0 20px;
}

.legal-text h3 {
  font-size: 22px;
  color: var(--gray-light);
  margin: 28px 0 16px;
}

.legal-text p {
  margin-bottom: 16px;
}

.legal-text ul {
  margin: 16px 0 16px 24px;
}

.legal-text li {
  margin-bottom: 12px;
}

.legal-text a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s;
}

.legal-text a:hover {
  color: var(--accent-turquoise);
}

.legal-text strong {
  color: white;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .hero .container {
    gap: 60px;
  }

  .hero-title {
    font-size: 52px;
  }
}

@media (max-width: 968px) {
  .hero {
    overflow: hidden;
  }

  .hero .container {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }

  .hero-left {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  .chart-container {
    max-width: 300px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-right {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 24px;
  }

  .hero-title {
    font-size: 40px;
  }

  .hero-description {
    font-size: 18px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .nav-buttons {
    gap: 8px;
  }

  .btn-login,
  .btn-register {
    padding: 8px 16px;
    font-size: 14px;
  }

  .auth-card {
    padding: 32px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-title {
    font-size: 36px;
  }

  .legal-content {
    padding: 40px 24px;
  }

  .legal-content h1 {
    font-size: 32px;
  }
}

/* ==================== DASHBOARD PAGES ==================== */
.dashboard-section,
.add-account-section,
.account-details-section {
  min-height: 100vh;
  padding: 140px 0 80px;
}

.dashboard-title {
  font-size: 42px;
  font-weight: 800;
  color: white;
  margin-bottom: 40px;
}

/* Tabs Navigation */
.tabs-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  padding: 16px 32px;
  background: transparent;
  color: #8b95a8;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: var(--gray-light);
  background: rgba(24, 119, 242, 0.05);
}

.tab-btn.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

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

.tab-header h2 {
  font-size: 32px;
  color: white;
  margin: 0;
}

/* Account Section */
.account-section {
  max-width: 800px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
}

.info-row:last-of-type {
  border-bottom: none;
}

.info-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.btn-edit {
  padding: 10px 20px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-edit:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

.danger-zone {
  margin-top: 48px;
  padding: 32px;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
}

.danger-zone h3 {
  font-size: 20px;
  color: #ef4444;
  margin: 0 0 12px 0;
}

.danger-zone p {
  color: #8b95a8;
  margin-bottom: 24px;
  line-height: 1.6;
}

.dashboard-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 32px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.dashboard-card.danger-card {
  border-color: rgba(239, 68, 68, 0.3);
}

.card-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h2 {
  font-size: 24px;
  color: white;
  margin: 0;
}

.card-body {
  padding: 32px;
}

.card-description {
  color: #8b95a8;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Account Info */
.account-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-label {
  font-size: 14px;
  color: #6b7280;
  font-weight: 600;
}

.info-value {
  font-size: 16px;
  color: var(--gray-light);
}

.info-value.status-active {
  color: #10b981;
  font-weight: 600;
}

/* Buttons */
.btn-primary-small {
  padding: 12px 16px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.2);
  min-height: 44px; /* ⭐ AJOUTÉ pour forcer la même hauteur */
}

.btn-primary-small:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.btn-danger {
  padding: 12px 24px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: translateY(-1px);
}

.btn-danger:disabled {
  background: #4b5563 !important;
  color: #6b7280 !important;
  cursor: not-allowed !important;
  opacity: 0.5;
}

.btn-danger:not(:disabled):hover {
  background: #dc2626 !important;
}

.btn-edit-tag {
  background: transparent;
  border: none;
  color: #60a5fa;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-edit-tag:hover {
  background: rgba(96, 165, 250, 0.1);
  color: #93c5fd;
}

#colorPickerDisplay:hover {
  transform: scale(1.05);
  border-color: #60a5fa;
}

.btn-view {
  padding: 8px 16px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: inline-block;
}

.btn-view:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: var(--primary-blue);
}

.btn-telegram {
  padding: 16px 32px;
  background: #229ed9;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(34, 158, 217, 0.3);
}

.btn-telegram:hover {
  background: #1a8bbd;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.4);
}

.btn-crm {
  padding: 14px 28px;
  background: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
}

.btn-crm:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.4);
}

/* Models Grid */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.account-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: all 0.3s;
}

.account-card-link {
  text-decoration: none;
  display: block;
}

.account-card-link .account-card {
  cursor: pointer;
}

.account-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.15);
}

.account-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
}

.account-details {
  flex: 1;
}

.account-name {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0 0 8px 0;
}

.account-status {
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
}

.account-status.connected {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.account-status.disconnected {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.empty-state svg {
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 24px;
  color: var(--gray-light);
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  margin-bottom: 32px;
}

/* Add Model Page */
.add-account-container {
  max-width: 700px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-blue);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 32px;
  transition: all 0.3s;
}

.back-link:hover {
  gap: 12px;
}

.add-account-title {
  font-size: 42px;
  font-weight: 800;
  color: white;
  margin-bottom: 40px;
}

.add-account-title-centered {
  text-align: center;
}

.step-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.step-number {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
}

.step-card h2 {
  font-size: 28px;
  color: white;
  margin-bottom: 12px;
}

.step-card p {
  color: #8b95a8;
  margin-bottom: 32px;
  line-height: 1.6;
}

.telegram-info,
.crm-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(24, 119, 242, 0.05);
  border-radius: 8px;
  margin-top: 24px;
  color: #8b95a8;
  font-size: 14px;
}

.telegram-connected {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  margin-bottom: 24px;
  color: #10b981;
  font-weight: 600;
}

.account-form {
  max-width: 100%;
}

.success-card {
  background: var(--card-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 16px;
  padding: 60px 40px;
  text-align: center;
  backdrop-filter: blur(10px);
}

.success-icon {
  color: #10b981;
  margin-bottom: 24px;
}

.success-card h2 {
  font-size: 32px;
  color: white;
  margin-bottom: 16px;
}

.success-card p {
  color: #8b95a8;
  font-size: 16px;
  margin-bottom: 40px;
}

.success-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Model Details Page */
.account-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 40px;
}

.account-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
}

.account-header-info {
  flex: 1;
}

.account-title-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 12px;
}

.account-title {
  font-size: 36px;
  font-weight: 800;
  color: white;
  margin: 0;
}

.btn-crm-prominent {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--primary-blue), #2196f3);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.btn-crm-prominent:hover {
  background: linear-gradient(135deg, var(--primary-blue-hover), #1976d2);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(24, 119, 242, 0.5);
}

.account-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.account-status-badge.connected {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.account-status-badge.disconnected {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.account-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* Model Settings */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s;
}

.setting-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.setting-info {
  flex: 1;
}

.setting-info h3 {
  font-size: 18px;
  color: white;
  margin: 0 0 8px 0;
}

.setting-info p {
  font-size: 14px;
  color: #8b95a8;
  margin: 0;
}

.btn-edit-setting {
  padding: 10px 20px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
}

.btn-edit-setting:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

/* Members List */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chatter-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s;
}

.chatter-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chatter-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
}

.chatter-info {
  flex: 1;
}

.chatter-info h4 {
  font-size: 16px;
  color: white;
  margin: 0 0 4px 0;
}

.chatter-email {
  font-size: 14px;
  color: #6b7280;
}

.btn-remove-chatter {
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-remove-chatter:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Responsive Dashboard */
@media (max-width: 768px) {
  .dashboard-section,
  .add-account-section,
  .account-details-section {
    padding: 120px 0 60px;
  }

  .dashboard-title,
  .add-account-title {
    font-size: 32px;
  }

  .tabs-navigation {
    flex-direction: column;
    gap: 0;
    border-bottom: none;
  }

  .tab-btn {
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid transparent;
    margin-bottom: 0;
    padding: 16px 24px;
  }

  .tab-btn.active {
    border-left-color: var(--primary-blue);
    border-bottom-color: var(--border-color);
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .btn-edit {
    width: 100%;
    justify-content: center;
  }

  .card-header {
    padding: 20px 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .card-body {
    padding: 24px;
  }

  .account-info,
  .account-info-grid {
    grid-template-columns: 1fr;
  }

  .accounts-grid {
    grid-template-columns: 1fr;
  }

  .account-header {
    flex-direction: column;
    text-align: center;
  }

  .account-title-row {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .account-title {
    font-size: 28px;
  }

  .btn-crm-prominent {
    width: 100%;
    justify-content: center;
  }

  .setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .btn-edit-setting {
    width: 100%;
    justify-content: center;
  }

  .step-card {
    padding: 28px 24px;
  }

  .success-actions {
    flex-direction: column;
  }

  .success-actions .btn-primary,
  .success-actions .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* Progress Steps */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  padding: 0 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
}

.step-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark-tertiary);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #6b7280;
  transition: all 0.3s;
}

.step.active .step-circle {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
  box-shadow: 0 0 0 4px rgba(24, 119, 242, 0.2);
}

.step.completed .step-circle {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.step-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
}

.step.active .step-label {
  color: var(--primary-blue);
}

.step.completed .step-label {
  color: #10b981;
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--border-color);
  margin: 0 8px;
  margin-bottom: 28px;
}

.step.completed + .step-line {
  background: #10b981;
}

/* Step Buttons */
.step-buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.step-buttons .btn-secondary {
  flex: 1;
  justify-content: center;
}

.step-buttons .btn-primary {
  flex: 2;
  justify-content: center;
}

/* Info Boxes */
.info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: rgba(24, 119, 242, 0.1);
  border: 1px solid rgba(24, 119, 242, 0.2);
  border-radius: 10px;
  margin: 24px 0;
  color: #d1d5db;
  font-size: 14px;
  line-height: 1.6;
}

.info-box svg {
  flex-shrink: 0;
  color: var(--primary-blue);
  margin-top: 2px;
}

.info-box-blue {
  background: rgba(24, 119, 242, 0.1);
  border-color: rgba(24, 119, 242, 0.3);
}

.info-box-green {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.info-box-green svg {
  color: #10b981;
}

/* Responsive Steps */
@media (max-width: 768px) {
  .progress-steps {
    flex-wrap: wrap;
    gap: 20px;
  }

  .step-line {
    display: none;
  }

  .step {
    flex: 1 1 auto;
    min-width: 60px;
  }

  .step-label {
    font-size: 11px;
  }

  .step-circle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

.avatar-editable {
  position: relative;
  cursor: pointer;
}

.avatar-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.avatar-editable:hover .avatar-edit-overlay {
  opacity: 1;
}

.avatar-edit-overlay svg {
  color: white;
}

.account-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-edit-name {
  padding: 8px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.btn-edit-name:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: var(--primary-blue);
}

/* Avatar éditable */
.avatar-editable {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.avatar-edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.avatar-editable:hover .avatar-edit-overlay {
  opacity: 1;
}

.avatar-edit-overlay svg {
  color: white;
}

/* Button edit name */
.btn-edit-name {
  padding: 8px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.btn-edit-name:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

/* Success notification */
.success-notif {
  position: fixed;
  top: 24px;
  right: 24px;
  background: rgba(16, 185, 129, 0.95);
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
  z-index: 10000;
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Modal centré avec z-index élevé */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  backdrop-filter: blur(10px);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==================== DASHBOARD LAYOUT ==================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--navy);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: rgba(15, 15, 15, 0.98);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.sidebar-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: white;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 12px;
  overflow-y: auto;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #8b95a8;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s;
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 500;
}

.sidebar-link:hover {
  background: rgba(24, 119, 242, 0.1);
  color: var(--gray-light);
}

.sidebar-link.active {
  background: rgba(24, 119, 242, 0.15);
  color: var(--primary-blue);
}

.sidebar-link svg {
  flex-shrink: 0;
}

.sidebar-badge {
  margin-left: auto;
  background: rgba(24, 119, 242, 0.2);
  color: var(--primary-blue);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-section {
  margin-top: 24px;
}

.sidebar-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px 8px;
}

.sidebar-footer {
  padding: 20px 12px;
  border-top: 1px solid var(--border-color);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
}

.btn-logout svg {
  flex-shrink: 0;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 40px;
  transition: margin-left 0.3s ease;
}

/* Container resserré pour les formulaires */
.main-content-narrow {
  max-width: 800px;
  margin: 0 auto;
}

.sidebar.collapsed ~ .main-content {
  margin-left: 70px;
}

.content-view {
  display: none;
}

.content-view.active {
  display: block;
}

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

.content-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: white;
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: var(--primary-blue);
  transform: translateY(-4px);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
}

.stat-icon.green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stat-icon.blue {
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7;
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 13px;
  color: #8b95a8;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-change {
  font-size: 13px;
  color: #10b981;
  font-weight: 600;
}

/* Chart Container */
.chart-container-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
}

.chart-container-wrapper h2 {
  font-size: 20px;
  color: white;
  margin-bottom: 24px;
}

.empty-chart {
  text-align: center;
  padding: 80px 20px;
  color: #6b7280;
}

.empty-chart svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-chart p {
  font-size: 16px;
}

/* Responsive Dashboard */
@media (max-width: 968px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .content-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

/* ==================== CATEGORY CONTENT ==================== */
.category-content {
  display: none;
  margin-top: 32px;
}

.category-content.active {
  display: block;
}

/* ==================== TAGS LIST ==================== */
.tags-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.tag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.3s;
}

.tag-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tag-preview {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid;
}

.btn-remove-tag {
  padding: 6px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-remove-tag:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ==================== NOTES TEXTAREA ==================== */
.notes-textarea {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  color: var(--gray-light);
  font-size: 15px; /* ⭐ Changé de 14px à 15px */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter",
    sans-serif;
  line-height: 1.8; /* ⭐ Changé de 1.6 à 1.8 */
  resize: vertical;
  transition: all 0.3s;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.notes-textarea::placeholder {
  color: #6b7280;
}

/* ==================== COLOR PICKER ==================== */
.color-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.color-option:hover {
  transform: scale(1.1);
  border-color: white;
}

.color-option.selected {
  border-color: white;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* ==================== MEMBERS LIST ==================== */
.members-list .chatter-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.members-list .chatter-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.chatter-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  font-weight: 700;
}

.chatter-info {
  flex: 1;
}

.chatter-info h4 {
  font-size: 16px;
  color: white;
  margin: 0 0 4px 0;
}

.chatter-email {
  font-size: 14px;
  color: #6b7280;
}

.btn-remove-chatter {
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-remove-chatter:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ==================== VAULT LAYOUT ==================== */
.vault-layout {
  display: flex;
  gap: 0;
  min-height: 600px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.vault-sidebar {
  width: 260px;
  background: transparent;
  border-right: 1px solid var(--border-color);
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.vault-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.vault-sidebar-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.btn-add-category {
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(24, 119, 242, 0.1);
  border: 1px solid rgba(24, 119, 242, 0.3);
  border-radius: 8px;
  color: var(--primary-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-add-category:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: var(--primary-blue);
  transform: translateY(-1px);
}

.vault-categories-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.vault-category-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 4px;
  position: relative;
}

.vault-category-item:hover {
  background: rgba(24, 119, 242, 0.08);
}

.vault-category-item.active {
  background: rgba(24, 119, 242, 0.15);
}

.vault-category-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.vault-category-item.active .vault-category-icon {
  background: var(--primary-blue);
  color: white;
}

.vault-category-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vault-category-name {
  font-size: 15px;
  font-weight: 600;
  color: #d1d5db;
}

.vault-category-item.active .vault-category-name {
  color: white;
}

.vault-category-count {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.vault-category-actions {
  display: none;
  gap: 4px;
}

.vault-category-item:hover .vault-category-actions {
  display: flex;
}

.vault-category-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  color: #8b95a8;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.vault-category-actions button:hover {
  background: rgba(24, 119, 242, 0.2);
  color: var(--primary-blue);
}

.vault-main {
  flex: 1;
  display: flex;
}

.vault-content-card {
  flex: 1;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.vault-content-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

.vault-content-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0;
}

.vault-filters {
  display: flex;
  gap: 12px;
  padding: 24px 32px 0;
}

.vault-filter-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #8b95a8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.vault-filter-btn:hover {
  background: rgba(24, 119, 242, 0.1);
  color: var(--gray-light);
  border-color: rgba(24, 119, 242, 0.3);
}

.vault-filter-btn.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.vault-search-input {
  margin: 20px 32px 0;
  width: calc(100% - 64px);
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #e5e9f0;
  font-size: 15px;
  transition: all 0.3s;
}

.vault-search-input:focus {
  outline: none;
  border-color: var(--primary-blue);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
}

.vault-search-input::placeholder {
  color: #6b7280;
}

.vault-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: 220px; /* Hauteur fixe pour chaque ligne = taille des médias */
  gap: 20px;
  padding: 28px 32px;
  overflow-y: auto;
  height: 760px; /* Hauteur fixe pour ne pas bouger */
  align-content: start;
}

/* ==================== VAULT MEDIA ITEMS ==================== */

/* Conteneur principal - SEUL élément avec border-radius */
.vault-media-item {
  position: relative;
  aspect-ratio: 1/1;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden; /* ⭐ Clippe TOUT */
  cursor: pointer;
  transition: all 0.3s;
  background: #000; /* ⭐ Fond noir au cas où */
}

.vault-media-item:hover {
  border-color: var(--primary-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(24, 119, 242, 0.15);
}

/* Zone de prévisualisation - PAS de border-radius */
.vault-media-preview {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Images et vidéos - PAS de border-radius */
.vault-media-preview img,
.vault-media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Barre de notes - PAS de border-radius, juste collée en bas */
/* Barre de notes avec icône tag - toujours visible */
.vault-media-notes-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

.vault-tag-icon {
  flex-shrink: 0;
  color: #d1d5db;
}

.vault-notes-text {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Badge type de média (photo/video) en bas à droite */
.vault-media-type-badge {
  position: absolute;
  bottom: 38px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px; /* Padding uniforme pour un rendu plus clean */
  background: rgba(0, 0, 0, 0.8);
  border-radius: 6px;
  color: white;
  font-size: 12px;
  font-weight: 600;
  z-index: 3;
}

.vault-media-type-badge svg {
  flex-shrink: 0;
}

.vault-media-type-badge span {
  white-space: nowrap;
}

/* Icônes */
.vault-media-preview .audio-icon,
.vault-media-preview .file-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--primary-blue);
  z-index: 1;
}

/* Durée vidéo */
.vault-media-duration {
  position: absolute;
  bottom: 50px;
  right: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  z-index: 3;
}

.vault-storage-bar {
  padding: 20px 32px;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
}

.vault-storage-text {
  display: block;
  color: #8b95a8;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.vault-storage-progress {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.vault-storage-fill {
  height: 100%;
  background: linear-gradient(90deg, #1877f2, #4fc3f7);
  width: 0%;
  transition: width 0.3s, background 0.3s;
  border-radius: 10px;
}

/* Modal large pour les détails du média */
.modal-large {
  max-width: 1000px;
  width: 95%;
}

.modal-body-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  padding: 32px;
}

.media-preview-large {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.media-preview-large img,
.media-preview-large video {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: contain;
}

.media-info-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.categories-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.category-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.category-checkbox:hover {
  background: rgba(24, 119, 242, 0.1);
}

.category-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.category-checkbox span {
  color: #d1d5db;
  font-size: 14px;
  font-weight: 500;
}

/* Responsive modal */
@media (max-width: 968px) {
  .modal-body-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .media-preview-large {
    min-height: 300px;
  }
}

/* Category selection list */
.category-selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.category-selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.category-selection-item:hover {
  background: rgba(24, 119, 242, 0.1);
  border-color: var(--primary-blue);
}

/* Scrollbar styling */
.vault-categories-list::-webkit-scrollbar,
.vault-media-grid::-webkit-scrollbar,
.category-selection-list::-webkit-scrollbar {
  width: 8px;
}

.vault-categories-list::-webkit-scrollbar-track,
.vault-media-grid::-webkit-scrollbar-track,
.category-selection-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.vault-categories-list::-webkit-scrollbar-thumb,
.vault-media-grid::-webkit-scrollbar-thumb,
.category-selection-list::-webkit-scrollbar-thumb {
  background: rgba(24, 119, 242, 0.3);
  border-radius: 10px;
}

.vault-categories-list::-webkit-scrollbar-thumb:hover,
.vault-media-grid::-webkit-scrollbar-thumb:hover,
.category-selection-list::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 119, 242, 0.5);
}

/* Responsive */
@media (max-width: 968px) {
  .vault-layout {
    flex-direction: column;
  }

  .vault-sidebar {
    width: 100%;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .vault-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    padding: 20px;
  }

  .vault-media-preview {
    height: 160px;
  }
}

/* ==================== MEMBRES & INVITATIONS ==================== */
.members-section {
  margin-bottom: 40px;
}

.members-section-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.members-section-title svg {
  color: var(--primary-blue);
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.member-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(24, 119, 242, 0.3);
}

.member-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.member-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(24, 119, 242, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.member-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.member-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.member-email {
  font-size: 14px;
  color: #6b7280;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-role {
  padding: 6px 12px;
  background: rgba(24, 119, 242, 0.1);
  color: var(--primary-blue);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.member-role.owner {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.btn-remove-member {
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.btn-remove-member:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.05);
}

/* Invitations en attente */
.invitation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.invitation-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(79, 195, 247, 0.3);
}

.invitation-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.invitation-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(79, 195, 247, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4fc3f7;
  flex-shrink: 0;
}

.invitation-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.invitation-email {
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.invitation-meta {
  font-size: 13px;
  color: #6b7280;
}

.invitation-status {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.invitation-status.pending {
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7;
}

.invitation-status.expired {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.btn-cancel-invitation {
  padding: 8px 16px;
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cancel-invitation:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  transform: translateY(-1px);
}

/* Empty state pour invitations */
.invitations-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

.invitations-empty svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.invitations-empty p {
  font-size: 15px;
}

@media (max-width: 768px) {
  .member-item,
  .invitation-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .member-actions,
  .invitation-item > div:last-child {
    width: 100%;
    justify-content: space-between;
  }
}

.btn-resend-invitation {
  padding: 8px 16px;
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7;
  border: 1px solid rgba(79, 195, 247, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn-resend-invitation:hover:not(:disabled) {
  background: rgba(79, 195, 247, 0.2);
  border-color: #4fc3f7;
  transform: translateY(-1px);
}

.btn-resend-invitation:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
