.post-actions-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.action-btn {
  background: #1e1e2e;
  color: white;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}

.action-btn:hover {
  background: #34344a;
  transform: scale(1.02);
}

.like-btn {
  border-color: #ff4f5e;
}

.dislike-btn {
  border-color: #6a6a89;
}

.code-btn {
  border-color: #4c82ff;
}

.rotating-audio {
  animation: spin 4s linear infinite;
}
.paused-audio {
  animation-play-state: paused !important;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 1rem 0;
}

.carousel-track {
  display: flex;
  gap: 8px;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-image {
  flex: 0 0 100%;
  scroll-snap-align: center;
  max-height: 260px;
  border-radius: 10px;
  object-fit: cover;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dot.active {
  background: #fff;
}

.badge-mentor {
  display: inline-block;
  background: gold;
  color: black;
  font-weight: bold;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
}

.badge-pro {
  display: inline-block;
  background: #6c5ce7;
  color: white;
  font-weight: bold;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 12px;
  margin-left: 6px;
}

.code-section {
  background: #1e1e2f;
  color: #f1f1f1;
  border-radius: 10px;
  padding: 1rem;
  margin-top: 1rem;
  overflow-x: auto;
  max-height: 350px;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
  scrollbar-width: thin;
}

.code-section strong {
  color: #ffc107;
  margin-top: 1rem;
  display: block;
}

.code-section pre {
  background: transparent;
  margin: 0 0 1rem 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #00ffae;
  font-family: 'Courier New', monospace;
}

.info-icon {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  cursor: pointer;
  color: var(--secondary-color);
}

.info-icon svg {
  width: 12px;
  height: 12px;
}

.tooltip {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e2f;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  font-size: 0.85rem;
  line-height: 1.4;
  max-width: 220px;
  text-align: center;
  z-index: 100;
  display: none;
  white-space: normal;
}

.tooltip::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #1e1e2f;
}

.action-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

button {
  background: linear-gradient(135deg, #0f1123, #1e2a78);
  color: #ffffff;
  border: none;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  opacity: 0.95;
}

button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  transform: rotate(25deg);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
}

button:hover::before {
  opacity: 1;
}

button:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 3px;
}

.menu-button {
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(108, 92, 231, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.menu-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.menu-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.35);
}

.menu-button:hover::before {
  opacity: 1;
}

.menu-button:active {
  transform: translateY(0) scale(0.98);
}

.menu-button.active {
  background: linear-gradient(135deg, #a29bfe, #6c5ce7);
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(162, 155, 254, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(162, 155, 254, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(162, 155, 254, 0);
  }
}

.dropdown-menu-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1001;
}

.dropdown-content {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background-color: #2a2a3f;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 6px 0;
  min-width: 220px;
  display: none;
  opacity: 0;
  transform: translateY(-15px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dropdown-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(108, 92, 231, 0.6), transparent);
}

.dropdown-content a {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  padding: 12px 16px;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.dropdown-content a:hover {
  background-color: rgba(108, 92, 231, 0.15);
  color: white;
  padding-left: 20px;
}

.dropdown-content a:hover::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #6c5ce7;
  border-radius: 0 3px 3px 0;
}

.dropdown-content a i,
.dropdown-content a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #a29bfe;
}

.dropdown-menu-container.open .dropdown-content {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  -webkit-backdrop-filter: blur(8px) brightness(0.8);
  backdrop-filter: blur(8px) brightness(0.8);
  background: rgba(30, 30, 47, 0.6);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.dropdown-content a {
  transform: translateX(10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s ease;
}

.dropdown-menu-container.open .dropdown-content a {
  transform: translateX(0);
  opacity: 1;
}

.dropdown-menu-container.open .dropdown-content a:nth-child(1) { transition-delay: 0.1s; }
.dropdown-menu-container.open .dropdown-content a:nth-child(2) { transition-delay: 0.15s; }
.dropdown-menu-container.open .dropdown-content a:nth-child(3) { transition-delay: 0.2s; }
.dropdown-menu-container.open .dropdown-content a:nth-child(4) { transition-delay: 0.25s; }
.dropdown-menu-container.open .dropdown-content a:nth-child(5) { transition-delay: 0.3s; }

#deployMessage {
    font-size: 0.95em;
    color: #aaa;
  }

  #deploymentsList {
    background: #2a2a3d;
    padding: 20px;
    border-radius: 12px;
    font-size: 0.95em;
    min-height: 60px;
  }

.friends-section summary {
  font-weight: bold;
  cursor: pointer;
  padding: 8px;
  background: #2a2a40;
  border-radius: 8px;
  color: white;
  margin-bottom: 6px;
}

.friends-section ul {
  list-style: none;
  padding-left: 16px;
  margin-top: 10px;
}

.friends-section li {
  padding: 6px 0;
  color: #ddd;
  border-bottom: 1px solid #444;
}

#postCreationSection form,
#subscriptionSection {
  background: #2a2a40;
  padding: 15px;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#postCreationSection input,
#postCreationSection textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #444;
  background: #1e1e2f;
  color: white;
  border-radius: 6px;
}

#postCreationSection button,
#subscribeBtn {
  background: #5c6bc0;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

#postCreationSection button:hover,
#subscribeBtn:hover {
  background: #7986cb;
}

.user-bio {
  background: #1c1c2b;
  color: #eee;
  padding: 1rem;
  border-radius: 8px;
  white-space: pre-line;
  margin-bottom: 1rem;
}

.terminal-section {
  margin-top: 20px;
}

.moderation-item {
  background: #1b1b1b;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #333;
  border-radius: 6px;
}
.comments {
  background-color: #1a1a2e;
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.comment-input {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 0.5rem;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #101020;
  color: white;
  font-size: 0.9rem;
}

.comment-btn {
  padding: 0.5rem 1rem;
  background: linear-gradient(90deg, #7f5af0, #5f4bd9);
  border: none;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.comment-btn:hover {
  background: linear-gradient(90deg, #9b7eff, #7a63f2);
}

.comment-list {
  margin-top: 0.8rem;
  border-top: 1px solid #333;
  padding-top: 0.5rem;
}

.comment {
  background-color: #262642;
  border: 1px solid #333;
  padding: 0.7rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  color: #ddd;
}

.comment strong {
  color: #fff;
  font-weight: 600;
}
.comments-section {
  max-height: 30vh;
  overflow-y: auto;
  margin-top: auto;
  flex-shrink: 0;
}
.comment-list {
  max-height: 600px;
  overflow-y: auto;
}
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.5);
    background: linear-gradient(145deg, #f8f8f8, #e0e0e0);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo img {
    width: 70%;
    height: auto;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.logo:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 4px 8px rgba(255, 255, 255, 0.4);
    background: linear-gradient(145deg, #ffffff, #d8d8d8);
}

.logo:hover::before {
    opacity: 0.6;
}

.logo:hover img {
    transform: scale(1.08);
    filter: 
        brightness(1.1) 
        drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.logo:active {
    transform: scale(0.98) rotate(2deg);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 4px 8px rgba(0, 0, 0, 0.05);
    transition-duration: 0.1s;
}

.logo.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(108, 92, 231, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
    }
}

.project-manager-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: grey;
  padding: 20px;
  border-radius: 6px;
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 60px;
  cursor: pointer;
}

.project-manager-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.project-manager-actions button {
  padding: 8px 12px;
  background: #4a6fa5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.project-list-container {
  margin-top: 20px;
}

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

.project-item {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.project-item.active {
  background: #e0e0ff;
  border-color: #4a6fa5;
}

.project-item h4 {
  margin: 0 0 5px 0;
}

.project-item small {
  color: #666;
}

.storage-info {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.storage-bar {
  width: 100%;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  margin-top: 5px;
}

.storage-fill {
  height: 100%;
  background: #4a6fa5;
  border-radius: 5px;
  width: 0%;
}

.floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #4a6fa5;
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

.drop-zone {
  border: 2px dashed #888;
  padding: 20px;
  text-align: center;
  color: #888;
  border-radius: 6px;
  margin: 10px 0;
  cursor: pointer;
}
.drop-zone.dragover {
  background-color: #f0f0f0;
  border-color: #333;
}

#highlighted-code {
  background: #1e1e2f;
  padding: 1rem;
  margin-top: 10px;
  border-radius: 6px;
  overflow-x: auto;
  max-height: 300px;
  white-space: pre;
  font-family: monospace;
}

.preview-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fullscreen-preview {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 9999;
  border: none;
  background: #fff;
}

.fullscreen-preview {
  background: rgba(0, 0, 0, 0.9);
}
#fullscreenBtn {
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
}
#exitFullscreenBtn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 10000;
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);

  background: var(--error-color);
  padding: 12px 18px;
  font-weight: 600;
}
#exitFullscreenBtn:hover {
  background: #444;
}
:root {
  --main-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --dark-bg: #1a1a2e;
  --darker-bg: #16213e;
  --light-text: #f1f1f1;
  --lighter-text: #ffffff;
  --card-bg: rgba(26, 26, 46, 0.9);
  --border-color: rgba(255, 255, 255, 0.1);
  --success-color: #00b894;
  --error-color: #ff7675;
  --glass-effect: rgba(255, 255, 255, 0.05);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.code-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}
.tab {
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--light-text);
  transition: all 0.2s;

  padding: 0.7rem 1.5rem;
  border-radius: 8px 8px 0 0;
  background: rgba(0, 0, 0, 0.2);

}

.tab:hover {
  color: var(--lighter-text);
}

.tab.active {
  color: var(--main-color);
  border-bottom-color: var(--main-color);
  font-weight: 500;

}

.code-editor {
  width: 100%;
  height: 300px;
  background: #1e1e2f;
  color: #f8f8f2;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 1rem;
  border: none;
  resize: none;
  outline: none;
}

.code-editor.active {
  display: block;
}
body {
  /* Polices améliorées avec fallback optimisé */
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Couleurs avec contraste vérifié */
  background-color: var(--dark-bg, #121212); /* Valeur de fallback */
  color: var(--light-text, #f5f5f5); /* Valeur de fallback */
  
  /* Typographie améliorée */
  line-height: 1.6; /* Légèrement augmenté pour meilleure lisibilité */
  font-size: 1rem;
  font-weight: 400;
  
  /* Disposition */
  min-height: 100vh;
  min-height: 100dvh; /* Prend en compte les barres d'interface mobiles */
  margin: 0;
  padding: 0 0 80px;
  
  /* Rendu des polices */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  
  /* Gestion du défilement doux si nécessaire */
  scroll-behavior: smooth;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

/* En-tête modernisé */
h1 {
  font-size: 2.5rem;
  margin: 2rem 0 1.5rem;
  text-align: center;
  font-weight: 800;
  background: linear-gradient(90deg, var(--main-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.3px;
  line-height: 1.3;
  text-transform: uppercase;
}

h2, h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0;
  color: var(--lighter-text);
}

/* Layout */
.tool-grid, .editor-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}
tool-grid > section:hover, .module-controls:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.editor-grid {
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 768px) {
  .tool-grid, .editor-grid {
    grid-template-columns: 1fr;
  }
}

/* Form elements */
input, select, textarea {
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
}

input[type="text"], select, textarea {
  width: 100%;
  background: var(--darker-bg);
  color: var(--light-text);
  margin-bottom: 0.5rem;
}

input[type="color"] {
  width: 40px;
  height: 30px;
  padding: 2px;
}



/* Code section */
.code-tabs {
  display: flex;
  margin-bottom: 0.5rem;
}

.tab {
  margin-right: 0.3rem;
  border-radius: 4px 4px 0 0;
}

.tab.active {
  background: var(--darker-bg);
}



/* Éditeur de code */
.code-container {
  background: #1e1e2f;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

textarea {
  width: 100%;
  height: 100%;
  font-family: 'Courier New', monospace;
  background: var(--darker-bg);
  resize: vertical;
  font-size: 0.85rem;
}

/* Preview */
iframe {
  width: 100%;
  height: 300px;
  border: 1px solid var(--border-color);
  background: white;

}

/* Form groups */
.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.form-group label {
  min-width: 60px;
  font-size: 0.9rem;
}
.module-controls {
  background: linear-gradient(145deg, #1e1e2f, #2b2b3d);
  padding: 24px;
  border-radius: 6px;
  max-width: 420px;
  margin: 30px auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  color: #fff;
  font-family: 'Segoe UI', 'Roboto', sans-serif;
  transition: box-shadow 0.3s ease;
}

.module-controls:hover {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

.module-controls h3 {
  margin-bottom: 16px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffffdd;
  letter-spacing: 0.5px;
}

.module-controls select {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #2b2b3d;
  color: #fff;
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffffaa' viewBox='0 0 20 20'%3E%3Cpath d='M5.516 7.548a.75.75 0 0 1 1.06-.032L10 10.74l3.424-3.224a.75.75 0 0 1 1.028 1.092l-4 3.768a.75.75 0 0 1-1.028 0l-4-3.768a.75.75 0 0 1-.032-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  transition: border 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.module-controls select:hover {
  background-color: #34344a;
}

.module-controls select:focus {
  outline: none;
  border: 1px solid #7e57c2;
  box-shadow: 0 0 0 3px #7e57c280;
}

/* Notifications */
.toast {
  position: fixed;
  bottom: 6rem;
  right: 1rem;
  background: #323232;
  color: gold;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.5s;
}

.toast.show {
  opacity: 1;
}

/* Footer */
.bandeau-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;

   color: var(--light-text);
  text-align: center;
  font-size: 0.9rem;
  background: linear-gradient(90deg, var(--darker-bg), var(--dark-bg));
  padding: 1rem;
  font-weight: 500;
}
.bandeau-footer a {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

.footer-links {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #aaa;
}

.footer-links a {
  color: #aaa;
  margin: 0 0.3rem;
}

/* Accessibility focus styles */
:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}
/* Module Preview */
.module-preview-container {
  margin-top: 1rem;

}

.module-preview-container h3 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

#modulePreview {
  height: 150px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}
/* Remplacer la section #loader existante par ceci */
#loader {
  display: none; /* Caché par défaut */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  width: 60px;
  height: 60px;
}

#loader::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 8px;
  border: 4px solid #6c5ce7;
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.3);
}



/* --- PROFIL BLUESKY STYLE --- */
.user-info, #profilForm, .module-controls, #postCreationSection, .friends-section, #friendRequestsContainer {
  background: rgba(30, 30, 47, 0.96);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  padding: 24px 18px;
  margin: 44px auto 36px auto;
  max-width: 480px;
  width: 100%;
  color: #f1f1f1;
  font-size: 1.05rem;
  transition: box-shadow 0.2s;
}
.profile-header-content {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.profile-stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  margin: 18px 0 0 0;
}
.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.05rem;
  color: #b2b2ff;
}
.profile-stat .stat-number {
  font-weight: 700;
  font-size: 1.18rem;
  color: #fff;
  background: #23233a;
  border-radius: 16px;
  padding: 2px 16px;
  margin-bottom: 2px;
}
.profile-stat .stat-label {
  font-size: 0.92rem;
  color: #a29bfe;
}
.user-bio {
  background: none;
  color: #d6d6e7;
  padding: 0;
  border-radius: 0;
  margin-bottom: 1.2rem;
  font-size: 1.08rem;
  text-align: center;
  box-shadow: none;
  font-weight: 400;
}
.profile-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 0 0;
}
.profile-actions button {
  min-width: 100px;
  font-size: 1rem;
  padding: 8px 18px;
  border-radius: 22px;
  border: 1px solid #5c6bc0;
  background: #23233a;
  color: #a29bfe;
  font-weight: 500;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.profile-actions button#subscribeBtn {
  background: linear-gradient(135deg, #5c6bc0, #7986cb);
  color: #fff;
  border: none;
}
.profile-actions button:hover {
  background: #39396a;
  color: #fff;
}
#profilForm button, #viewAllPostsBtn {
  border-radius: 22px;
  font-size: 1.05rem;
  padding: 10px 0;
  background: linear-gradient(135deg, #5c6bc0, #7986cb);
  color: #fff;
  border: none;
  box-shadow: none;
}
.module-controls {
  margin-top: 44px;
  margin-bottom: 44px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  background: rgba(30, 30, 47, 0.96);
}
#postCreationSection {
  margin-top: 44px;
  margin-bottom: 44px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}
#userCreations {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}
.slider-item {
  background: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 18px 0;
  border-bottom: 1px solid #23233a;
  margin-bottom: 0;
}
.slider-item:last-child {
  border-bottom: none;
}
.slider-item h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
  color: #fff;
}
.slider-item p {
  color: #b2b2ff;
  font-size: 0.98rem;
  margin-bottom: 6px;
}
.slider-item img {
  border-radius: 10px;
  margin-top: 8px;
  max-width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
@media (max-width: 700px) {
  .user-info, #profilForm, .module-controls, #postCreationSection, .friends-section, #friendRequestsContainer {
    padding: 10px 2vw;
    max-width: 100vw;
    margin: 24px 0 24px 0;
  }
  .profile-header-content {
    margin-top: 40px;
  }
  .profile-stats {
    gap: 16px;
    flex-wrap: wrap;
  }
}
/* --- FIN PROFIL BLUESKY STYLE --- */

#openChat {
  position: fixed;
  bottom: 24px;
  right: 32px;
  z-index: 999;
  background: linear-gradient(135deg, #5c6bc0, #7986cb);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 32px;
  box-shadow: 0 4px 24px rgba(60,60,120,0.18);
  cursor: pointer;
  font-size: 1.08rem;
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
#openChat:hover {
  background: linear-gradient(135deg, #7986cb, #5c6bc0);
  box-shadow: 0 8px 32px rgba(60,60,120,0.22);
  transform: translateY(-2px) scale(1.04);
}
#chatPopup {
  display: none;
  position: fixed;
  bottom: 90px;
  right: 32px;
  width: 370px;
  height: 520px;
  z-index: 999;
  background: rgba(34, 34, 54, 0.98);
  border-radius: 28px;
  box-shadow: 0 8px 40px rgba(30,30,60,0.22);
  overflow: hidden;
  border: 1.5px solid #39396a;
  padding: 0;
  transition: box-shadow 0.2s, background 0.2s;
}
#chatPopup iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 28px;
  background: transparent;
}
@media (max-width: 600px) {
  #chatPopup {
    width: 98vw;
    height: 60vh;
    right: 1vw;
    bottom: 80px;
    border-radius: 18px;
  }
  #openChat {
    right: 1vw;
    bottom: 16px;
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 1rem;
  }
}

.cover-container {
  position: relative;
  width: 100%;
  height: 180px;
  background: #222;
  border-radius: 0 0 24px 24px;
  margin-bottom: 0;
  overflow: visible !important;
}
header {
  position: relative;
  padding: 80px 0 20px 0;
  background: none;
  text-align: center;
  overflow: visible !important;
}
.avatar-container {
  position: absolute;
  left: 50%;
  bottom: -48px;
  transform: translateX(-50%);
  z-index: 2;
}

.profile-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 36px auto 0 auto;
  background: none;
  border-bottom: 2px solid #23233a;
  max-width: 480px;
}
.tab-btn {
  background: none;
  border: none;
  outline: none;
  color: #a29bfe;
  font-size: 1.08rem;
  font-weight: 600;
  padding: 10px 28px 10px 28px;
  border-radius: 22px 22px 0 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  margin-bottom: -2px;
  position: relative;
}
.tab-btn.active {
  background: #23233a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(60,60,120,0.08);
  border-bottom: 2px solid #5c6bc0;
  z-index: 2;
}
.tab-btn:hover:not(.active) {
  background: #23233a33;
  color: #fff;
}
.tab-content {
  max-width: 540px;
  margin: 0 auto;
  animation: fadeInTab 0.3s;
}
@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (max-width: 700px) {
  .profile-tabs {
    gap: 6px;
    max-width: 100vw;
  }
  .tab-btn {
    font-size: 1rem;
    padding: 8px 10px;
  }
  .tab-content {
    max-width: 100vw;
    padding: 0 2vw;
  }
}

/* Bouton retirer le fond */
#remove-bg-btn {
  background: linear-gradient(135deg, #23233a, #6c5ce7);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
  transition: background 0.2s, transform 0.2s;
}
#remove-bg-btn:hover {
  background: linear-gradient(135deg, #6c5ce7, #23233a);
  transform: scale(1.05);
}
#remove-bg-btn svg {
  display: inline-block;
  vertical-align: middle;
}

/* Loader animé centré */
#loader {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  width: 60px;
  height: 60px;
}
#loader::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 8px;
  border: 4px solid #6c5ce7;
  border-top: 4px solid #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* TikTok Editor UI */
.tiktok-editor-bg {
  background: #111118;
  min-height: 100vh;
  font-family: 'Montserrat', system-ui, sans-serif;
}
.tiktok-editor-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding-bottom: 90px;
}
.tiktok-media-preview {
  margin: 32px 0 0 0;
  width: 340px;
  height: 600px;
  background: #18181f;
  border-radius: 32px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 500px) {
  .tiktok-media-preview {
    width: 98vw;
    height: 60vw;
    min-height: 320px;
    border-radius: 18px;
  }
}
.tiktok-fab {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff0050, #00f2ea);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  font-size: 1.5rem;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}
.tiktok-fab:hover {
  background: linear-gradient(135deg, #00f2ea, #ff0050);
  transform: scale(1.08);
}
.tiktok-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: rgba(20,20,30,0.98);
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 16px 0 24px 0;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.18);
  z-index: 10;
}
.tiktok-tool-btn {
  background: linear-gradient(135deg, #23233a, #6c5ce7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.15);
  transition: background 0.2s, transform 0.2s;
  font-size: 1.1rem;
}
.tiktok-tool-btn:hover {
  background: linear-gradient(135deg, #6c5ce7, #23233a);
  transform: scale(1.08);
}
.tiktok-tool-btn svg {
  display: inline-block;
  vertical-align: middle;
}
@media (max-width: 700px) {
  .tiktok-toolbar {
    flex-direction: column;
  }
  
  .tiktok-tool-btn {
    width: 100%;
    margin: 2px 0;
  }
}

/* Script auto-injecté pour le bouton de rechargement sans cache */
@import url('auto-reload-button.js');
