/* ===== VARIABLES & RESET ===== */
:root {
  --primary-color: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-light: #a78bfa;
  --primary-dark: #6d28d9;
  --secondary-color: #f8fafc;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: all 0.2s ease-in-out;
}

/* Reset de base */
.extra-post-container * {
  box-sizing: border-box;
}

.extra-post-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
}

/* ===== MESSAGES & STATES ===== */
.extra-post-login-required,
.extra-post-error-message {
  padding: 2rem 1rem;
  text-align: center;
  background: var(--secondary-color);
  border-radius: var(--radius-lg);
  margin: 0.5rem;
}

.extra-post-login-message h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.extra-post-login-message p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.extra-post-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  margin-top: 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
}

.extra-post-login-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

/* ===== TABS RESPONSIVE ===== */
.extra-post-tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid var(--border-color);
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.extra-post-tabs::-webkit-scrollbar {
  display: none;
}

.extra-post-tab {
  flex: 1;
  min-width: 120px;
  padding: 1rem 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  white-space: nowrap;
}

.extra-post-tab:hover {
  color: var(--primary-color);
  background: var(--border-light);
}

.extra-post-tab.active {
  color: var(--primary-color);
}

.extra-post-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
}

.extra-post-tab-content {
  display: none;
}

.extra-post-tab-content.active {
  display: block;
}

/* ===== PUBLICATION FORM RESPONSIVE ===== */
.extra-post-form-container {
  padding: 1rem;
  background: white;
  border-bottom: 1px solid var(--border-color);
}

.extra-post-form {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.extra-post-avatar img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}

.extra-post-inputs {
  flex: 1;
  min-width: 0;
}

.extra-post-inputs textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  resize: none;
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 80px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--secondary-color);
}

.extra-post-inputs textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: white;
}

.extra-post-inputs textarea::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.extra-post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.extra-post-media-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.extra-post-media-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: var(--transition);
  font-weight: 500;
  white-space: nowrap;
}

.extra-post-media-btn:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.extra-post-submit {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.extra-post-chars {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

.extra-post-chars.warning {
  color: #f59e0b;
}

.extra-post-chars.error {
  color: #ef4444;
  font-weight: 600;
}

.extra-post-publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  white-space: nowrap;
}

.extra-post-publish-btn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.extra-post-publish-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== LOADING SPINNERS ===== */
.loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== PROGRESS BAR ===== */
.extra-post-progress {
  margin-top: 0.75rem;
  display: none;
  align-items: center;
  gap: 0.75rem;
}

.extra-post-progress-bar {
  flex: 1;
  height: 5px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.extra-post-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  transition: width 0.3s ease;
  width: 0%;
  border-radius: 3px;
}

.extra-post-progress-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 35px;
}

/* ===== MEDIA PREVIEW RESPONSIVE ===== */
.extra-post-media-preview {
  margin: 0.75rem 0;
}

.extra-post-media-preview-item {
  position: relative;
  display: inline-block;
  margin: 0.2rem 0;
}

.extra-post-media-preview-item img,
.extra-post-media-preview-item video {
  max-width: 150px;
  max-height: 120px;
  border-radius: 6px !important;
  border: 2px solid var(--border-color);
}

.extra-post-remove-media {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #ef4444;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.extra-post-remove-media:hover {
  background: #dc2626;
  transform: scale(1.1);
}

/* ===== POSTS FEED RESPONSIVE ===== */
.extra-post-feed {
  min-height: 150px;
}

.extra-post-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  background: white;
}

.extra-post-item:hover {
  background: var(--secondary-color);
}

.extra-post-item.new-post {
  animation: newPostHighlight 2s ease-in-out;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 0%, rgba(139, 92, 246, 0.02) 50%, rgba(139, 92, 246, 0.05) 100%);
  border-left: 3px solid var(--primary-color);
}

@keyframes newPostHighlight {
  0%, 100% { background: linear-gradient(90deg, rgba(139, 92, 246, 0.05) 0%, rgba(139, 92, 246, 0.02) 50%, rgba(139, 92, 246, 0.05) 100%); }
  50% { background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 50%, rgba(139, 92, 246, 0.1) 100%); }
}

.extra-post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  gap: 0.75rem;
}

.extra-post-author {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}

.extra-post-author-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.extra-post-author-name {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extra-post-author-name:hover {
  text-decoration: underline;
  color: var(--primary-color);
}

.extra-post-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.extra-post-actions-dropdown {
  position: relative;
  flex-shrink: 0;
}

.extra-post-actions-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.extra-post-actions-btn:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.extra-post-actions-menu {
  position: absolute;
  right: 0;
  top: 100%;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1000;
  min-width: 140px;
  overflow: hidden;
}

.extra-post-actions-dropdown:hover .extra-post-actions-menu {
  display: block;
}

.extra-post-actions-menu button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
  color: var(--text-primary);
}

.extra-post-actions-menu button:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
}

.extra-post-content {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: pre-line;
  word-wrap: break-word;
  word-break: break-word;
}

.extra-post-media {
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* BORDURES ARRONDIES POUR LES IMAGES ET VIDÉOS */
.extra-post-media img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px !important;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  width: 100%;
  height: auto;
}

.extra-post-media video {
  max-width: 100%;
  max-height: 300px;
  border-radius: 6px !important;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  width: 100%;
  height: auto;
}

.extra-post-media img:hover,
.extra-post-media video:hover {
  transform: scale(1.01);
}

.extra-post-stats {
  margin-bottom: 0.6rem;
}

.extra-post-likes-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.extra-post-interactions {
  display: flex;
  gap: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
}

.extra-post-interactions button,
.extra-post-interactions a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 500;
  min-height: 36px;
}

.extra-post-interactions button:hover,
.extra-post-interactions a:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.extra-post-like-btn.liked {
  color: var(--primary-color);
  font-weight: 600;
}

.like-animation {
  animation: likeBounce 0.6s ease;
}

@keyframes likeBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* ===== MANAGER RESPONSIVE ===== */
.extra-post-manager-container {
  padding: 1rem;
}

.extra-post-manager-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.extra-post-manager-header h2 {
  color: var(--primary-color);
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.extra-post-manager-header p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.extra-post-manager-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.extra-post-stat-card {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.extra-post-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.extra-post-stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.extra-post-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.extra-post-manager-filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.extra-post-filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.extra-post-filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.extra-post-filter-select,
.extra-post-filter-search {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  transition: var(--transition);
  background: white;
  width: 100%;
}

.extra-post-filter-select:focus,
.extra-post-filter-search:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ===== USER POSTS RESPONSIVE ===== */
.extra-post-user-posts {
  min-height: 150px;
}

.extra-post-user-item {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.extra-post-user-item:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.extra-post-user-item.deleting {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
    max-height: 500px;
    margin-bottom: 0.75rem;
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: none;
  }
}

.extra-post-user-item-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
}

.extra-post-user-item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.extra-post-user-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
}

.extra-post-user-item-likes {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.extra-post-user-item-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: white;
  cursor: pointer;
  font-size: 0.7rem;
  transition: var(--transition);
  color: var(--text-secondary);
  font-weight: 500;
  flex: 1;
  min-width: 70px;
  justify-content: center;
}

.extra-post-user-item-actions button:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.extra-post-user-item-content {
  line-height: 1.5;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  white-space: pre-line;
  word-wrap: break-word;
  word-break: break-word;
  color: var(--text-primary);
}

.extra-post-user-item-media {
  margin-top: 0.75rem;
}

/* BORDURES ARRONDIES POUR LES IMAGES DU GESTIONNAIRE */
.extra-post-user-item-media img {
  max-width: 100%;
  max-height: 150px;
  border-radius: 6px !important;
  width: 100%;
  height: auto;
}

.extra-post-user-item-media video {
  max-width: 100%;
  max-height: 150px;
  border-radius: 6px !important;
  width: 100%;
  height: auto;
}

/* ===== MODALS RESPONSIVE ===== */
.extra-post-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.extra-post-modal-open {
  overflow: hidden;
}

.extra-post-modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  max-width: 100%;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.2s ease-out;
  margin: auto;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.extra-post-modal-content h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.extra-post-modal-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.extra-post-modal-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
  font-weight: 600;
  flex: 1;
  min-width: 100px;
  justify-content: center;
}

.extra-post-cancel-btn {
  background: var(--secondary-color);
  color: var(--text-secondary);
}

.extra-post-cancel-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.extra-post-confirm-btn {
  background: #ef4444;
  color: white;
}

.extra-post-confirm-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.extra-post-save-btn {
  background: var(--primary-color);
  color: white;
}

.extra-post-save-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* ===== EDIT FORM RESPONSIVE ===== */
.extra-post-edit-content {
  margin-bottom: 1.5rem;
}

.extra-post-edit-content textarea {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  font-size: 0.8rem;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: var(--transition);
  background: var(--secondary-color);
}

.extra-post-edit-content textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
  background: white;
}

.extra-post-edit-chars {
  text-align: right;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-weight: 500;
}

.extra-post-edit-chars.warning {
  color: #f59e0b;
}

.extra-post-edit-chars.error {
  color: #ef4444;
  font-weight: 600;
}

/* ===== STATES RESPONSIVE ===== */
.extra-post-loading {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-direction: column;
}

.extra-post-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8rem;
}

.extra-post-load-more-container {
  text-align: center;
  padding: 1.5rem;
}

.extra-post-load-more {
  background: white;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.8rem;
  transition: var(--transition);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  max-width: 200px;
  justify-content: center;
}

.extra-post-load-more:hover {
  background: var(--secondary-color);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.extra-post-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== NOTIFICATIONS MAXLOVE RESPONSIVE ===== */
.extra-post-notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: white;
  z-index: 10001;
  font-weight: 600;
  max-width: none;
  box-shadow: var(--shadow-lg);
  animation: notificationSlideIn 0.3s ease-out;
  text-align: center;
  font-size: 0.9rem;
}

/* MODIFICATION : Fond violet pour les notifications d'erreur */
.extra-post-notification-error {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
  border-left: 4px solid #6d28d9;
}

.extra-post-notification-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-left: 4px solid #047857;
}

.extra-post-notification-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-left: 4px solid #b45309;
}

@keyframes notificationSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== SKELETON LOADING RESPONSIVE ===== */
.extra-post-skeleton {
  background: linear-gradient(90deg, #f8fafc 25%, #f1f5f9 50%, #f8fafc 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-light);
}

.extra-post-skeleton-header {
  display: flex;
  gap: 0.6rem;
  padding: 1rem;
}

.extra-post-skeleton-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f8fafc 25%, #f1f5f9 50%, #f8fafc 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

.extra-post-skeleton-content {
  flex: 1;
}

.extra-post-skeleton-line {
  height: 10px;
  border-radius: 5px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #f8fafc 25%, #f1f5f9 50%, #f8fafc 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

.extra-post-skeleton-line.short {
  width: 60%;
}

.extra-post-skeleton-line.medium {
  width: 80%;
}

.extra-post-skeleton-line.long {
  width: 100%;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== DRAG & DROP ===== */
.extra-post-drag-over {
  background: var(--secondary-color) !important;
  border: 2px dashed var(--primary-color) !important;
  border-radius: var(--radius-md);
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablettes (768px et plus) */
@media (min-width: 768px) {
  .extra-post-container {
    max-width: 600px;
    margin: 1rem auto;
  }
  
  .extra-post-tabs {
    padding: 0 1rem;
  }
  
  .extra-post-tab {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .extra-post-form-container {
    padding: 1.5rem;
  }
  
  .extra-post-form {
    gap: 1rem;
  }
  
  .extra-post-avatar img {
    width: 48px;
    height: 48px;
  }
  
  .extra-post-inputs textarea {
    min-height: 100px;
    padding: 1rem;
    font-size: 1rem;
  }
  
  .extra-post-media-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .extra-post-publish-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
  
  .extra-post-item {
    padding: 1.5rem;
  }
  
  .extra-post-header {
    flex-direction: row;
    align-items: flex-start;
  }
  
  .extra-post-user-item-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  
  .extra-post-user-item-actions {
    justify-content: flex-end;
  }
  
  .extra-post-user-item-actions button {
    flex: 0 1 auto;
  }
  
  .extra-post-manager-filters {
    flex-direction: row;
    align-items: end;
  }
  
  .extra-post-filter-group {
    width: auto;
  }
  
  .extra-post-filter-search {
    min-width: 200px;
  }
  
  .extra-post-modal-content {
    max-width: 400px;
    padding: 2rem;
  }
  
  .extra-post-modal-actions {
    flex-wrap: nowrap;
  }
  
  .extra-post-modal-actions button {
    flex: 0 1 auto;
  }
  
  .extra-post-notification {
    left: auto;
    right: 1rem;
    max-width: 320px;
  }
}

/* Desktop (1024px et plus) */
@media (min-width: 1024px) {
  .extra-post-container {
    max-width: 600px;
  }
  
  .extra-post-manager-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .extra-post-stat-card {
    padding: 1.5rem;
  }
  
  .extra-post-stat-number {
    font-size: 2rem;
  }
}

/* Très petits mobiles (480px et moins) */
@media (max-width: 480px) {
  .extra-post-container {
    border-radius: 0;
    margin: 0;
  }
  
  .extra-post-tabs {
    flex-direction: row;
  }
  
  .extra-post-tab {
    min-width: 100px;
    padding: 0.8rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .extra-post-form {
    flex-direction: column;
    align-items: stretch;
  }
  
  .extra-post-avatar {
    align-self: flex-start;
  }
  
  .extra-post-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .extra-post-media-buttons {
    justify-content: center;
  }
  
  .extra-post-submit {
    justify-content: space-between;
  }
  
  .extra-post-interactions {
    flex-wrap: wrap;
  }
  
  .extra-post-interactions button,
  .extra-post-interactions a {
    flex: 0 0 calc(50% - 0.2rem);
    font-size: 0.7rem;
  }
  
  .extra-post-user-item-actions {
    justify-content: space-between;
  }
  
  .extra-post-user-item-actions button {
    flex: 0 0 calc(50% - 0.25rem);
    margin-bottom: 0.25rem;
  }
}

/* Support tactile amélioré */
@media (hover: none) and (pointer: coarse) {
  .extra-post-tab:hover {
    background: transparent;
  }
  
  .extra-post-actions-dropdown:hover .extra-post-actions-menu {
    display: none;
  }
  
  .extra-post-actions-dropdown:active .extra-post-actions-menu,
  .extra-post-actions-dropdown:focus .extra-post-actions-menu {
    display: block;
  }
  
  .extra-post-interactions button:active,
  .extra-post-interactions a:active {
    transform: scale(0.95);
  }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #a78bfa;
    --primary-hover: #8b5cf6;
    --primary-light: #c4b5fd;
    --primary-dark: #7c3aed;
    --secondary-color: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-light: #1e293b;
  }
  
  .extra-post-container {
    background: #0f172a;
    color: var(--text-primary);
  }
  
  .extra-post-inputs textarea,
  .extra-post-edit-content textarea,
  .extra-post-filter-select,
  .extra-post-filter-search {
    background: #1e293b;
    color: var(--text-primary);
    border-color: var(--border-color);
  }
  
  .extra-post-inputs textarea:focus,
  .extra-post-edit-content textarea:focus,
  .extra-post-filter-select:focus,
  .extra-post-filter-search:focus {
    background: #1e293b;
  }
  
  .extra-post-media-btn,
  .extra-post-load-more,
  .extra-post-user-item-actions button {
    background: #1e293b;
    color: var(--text-primary);
    border-color: var(--border-color);
  }
  
  .extra-post-stat-card,
  .extra-post-user-item {
    background: #1e293b;
    border-color: var(--border-color);
  }
  
  .extra-post-skeleton,
  .extra-post-skeleton-avatar,
  .extra-post-skeleton-line {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  }
}

/* ===== ACCESSIBILITY ===== */
.extra-post-btn:focus,
.extra-post-tab:focus,
.extra-post-actions-btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Amélioration du contraste pour l'accessibilité */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000;
    --text-muted: #333;
  }
}

/* Support réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
  .extra-post-container * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .extra-post-form-container,
  .extra-post-actions-dropdown,
  .extra-post-interactions {
    display: none !important;
  }
  
  .extra-post-item {
    break-inside: avoid;
    border: 1px solid #ccc !important;
  }
}

/* ===== CORRECTION DES IMAGES - PAS ÉTIRÉES ===== */

/* Images dans les publications */
.extra-post-media {
  margin-bottom: 0.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: var(--secondary-color);
}

.extra-post-media img {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 8px !important;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  object-fit: contain; /* Empêche l'étirement */
  object-position: center;
}

.extra-post-media video {
  max-width: 100%;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 8px !important;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  object-fit: contain; /* Empêche l'étirement */
  object-position: center;
}

.extra-post-media img:hover,
.extra-post-media video:hover {
  transform: scale(1.02);
}

/* Images dans l'aperçu */
.extra-post-media-preview-item {
  position: relative;
  display: inline-flex;
  margin: 0.2rem 0;
  justify-content: center;
  align-items: flex-start;
  background: var(--secondary-color);
  border-radius: 6px;
  padding: 4px;
}

.extra-post-media-preview-item img,
.extra-post-media-preview-item video {
  max-width: 150px;
  max-height: 120px;
  width: auto;
  height: auto;
  border-radius: 4px !important;
  border: 2px solid var(--border-color);
  object-fit: contain; /* Empêche l'étirement */
  object-position: center;
}

/* Images dans le gestionnaire */
.extra-post-user-item-media {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  background: var(--secondary-color);
  border-radius: 6px;
  padding: 4px;
  max-width: fit-content;
}

.extra-post-user-item-media img {
  max-width: 200px;
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: 6px !important;
  object-fit: contain; /* Empêche l'étirement */
  object-position: center;
}

.extra-post-user-item-media video {
  max-width: 200px;
  max-height: 150px;
  width: auto;
  height: auto;
  border-radius: 6px !important;
  object-fit: contain; /* Empêche l'étirement */
  object-position: center;
}

/* ===== AMÉLIORATIONS RESPONSIVE POUR IMAGES ===== */

/* Tablettes */
@media (min-width: 768px) {
  .extra-post-media img {
    max-height: 450px;
  }
  
  .extra-post-media video {
    max-height: 450px;
  }
  
  .extra-post-media-preview-item img,
  .extra-post-media-preview-item video {
    max-width: 180px;
    max-height: 140px;
  }
  
  .extra-post-user-item-media img,
  .extra-post-user-item-media video {
    max-width: 250px;
    max-height: 180px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .extra-post-media img {
    max-height: 500px;
  }
  
  .extra-post-media video {
    max-height: 500px;
  }
}

/* Mobiles très petits */
@media (max-width: 480px) {
  .extra-post-media {
    margin: 0 -1rem 0.75rem -1rem;
    border-radius: 0;
  }
  
  .extra-post-media img,
  .extra-post-media video {
    max-height: 300px;
    border-radius: 0 !important;
    width: 100%;
  }
  
  .extra-post-user-item-media {
    max-width: 100%;
    justify-content: center;
  }
  
  .extra-post-user-item-media img,
  .extra-post-user-item-media video {
    max-width: 100%;
    max-height: 200px;
  }
}

/* ===== OPTIMISATIONS D'AFFICHAGE ===== */

/* Empêche le flou sur les images haute résolution */
.extra-post-media img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  -ms-interpolation-mode: bicubic;
}

/* Améliore le chargement progressif */
.extra-post-media {
  position: relative;
  min-height: 100px;
}

/* Animation de chargement pour images */
.extra-post-media.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-light);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 2;
}

/* Fond de placeholder pendant le chargement */
.extra-post-media img[src=""],
.extra-post-media img:not([src]) {
  background: linear-gradient(45deg, var(--border-light) 25%, transparent 25%), 
              linear-gradient(-45deg, var(--border-light) 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, var(--border-light) 75%), 
              linear-gradient(-45deg, transparent 75%, var(--border-light) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* ===== CORRECTIONS SPÉCIFIQUES ===== */

/* Pour les images portrait (hauteur > largeur) */
.extra-post-media img[data-aspect-ratio="portrait"] {
  max-height: 500px;
  max-width: 100%;
}

/* Pour les images paysage (largeur > hauteur) */
.extra-post-media img[data-aspect-ratio="landscape"] {
  max-width: 100%;
  max-height: 400px;
}

/* Pour les images carrées */
.extra-post-media img[data-aspect-ratio="square"] {
  max-width: 400px;
  max-height: 400px;
  width: 100%;
  height: auto;
}