/* Styles pour la prévisualisation des articles */
.preview-header {
  background: var(--gray-900);
  color: white;
  padding: 1rem;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.preview-content {
  max-width: 800px;
  margin: 80px auto 0;
  padding: 2rem;
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-meta {
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.article-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
}

.article-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.article-content h2 {
  margin: 2rem 0 1rem;
  color: var(--gray-900);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--gray-700);
}

.article-categories {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.category-tag {
  background: var(--gray-100);
  color: var(--gray-700);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
}

/* Styles pour le formulaire d'édition */
.blog-form {
  max-width: 800px;
  margin: 0 auto;
}

.blog-form .form-group {
  margin-bottom: 1.5rem;
}

.blog-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.blog-form .form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
}

.blog-form textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.blog-form .current-image {
  margin: 1rem 0;
}

.blog-form .preview-image {
  max-width: 200px;
  border-radius: var(--radius);
}

.blog-form .categories-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
}

.blog-form .checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.blog-form .form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Styles pour la liste des articles */
.post-title {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.post-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Styles pour les contrôles d'ordre */
.order-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.order-number {
  font-weight: 600;
  color: var(--gray-700);
  font-size: 0.9rem;
}

.order-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-buttons .btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-buttons .btn i {
  font-size: 0.7rem;
}

/* Styles pour les badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
}

.badge-info {
  background: var(--info-light);
  color: var(--info);
}

.badge-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
}

.badge-success {
  background: var(--success-light);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.published {
  background: var(--success-light);
  color: var(--success);
}

.status-badge.draft {
  background: var(--warning-light);
  color: var(--warning);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .preview-content {
    padding: 1rem;
  }

  .article-title {
    font-size: 2rem;
  }

  .article-image {
    height: 300px;
  }

  .blog-form .categories-list {
    grid-template-columns: 1fr;
  }

  .post-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .post-thumbnail {
    width: 100%;
    height: 120px;
  }
}

/* Styles spécifiques pour la page du blog */
.blog-list {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8fafc;
}

.post-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.post-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e2e8f0;
    color: #475569;
    border-radius: 9999px;
    font-size: 0.875rem;
    margin: 0.25rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.published {
    background: #2ecc71;
    color: white;
}

.status-badge.draft {
    background: #95a5a6;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Styles harmonisés avec la page services */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Styles pour les boutons d'action - identiques à services.css */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ========================================
   PAGE BLOG INDIVIDUELLE
   ======================================== */

/* Hero de l'article */
.article-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.article-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern-light.svg') repeat;
    opacity: 0.1;
    z-index: 1;
}

.article-hero .container {
    position: relative;
    z-index: 2;
}

.article-header {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.95rem;
    font-weight: 500;
}

.article-date i {
    color: #007bff;
    font-size: 1rem;
}

.article-categories {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.article-category {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.article-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1a202c;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-align: center;
}

.article-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #00d4ff);
    margin: 1.5rem auto 0;
    border-radius: 2px;
}

.article-excerpt {
    font-size: 1.25rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
}

/* Contenu de l'article */
.article-content {
    padding: 4rem 0;
    background: white;
}

.article-content .container {
    max-width: 900px;
}

.article-featured-image {
    margin-bottom: 3rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-featured-image:hover img {
    transform: scale(1.02);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 4rem;
}

.article-body h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.article-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2rem 0 1rem;
}

.article-body h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin: 1.5rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body ul, .article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body blockquote {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid #007bff;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    font-size: 1.1rem;
    color: #4a5568;
}

.article-body code {
    background: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #d73a49;
}

.article-body pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-body pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.article-body a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-body a:hover {
    color: #0056b3;
    border-bottom-color: #0056b3;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-body th,
.article-body td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.article-body th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3748;
}

.article-body tr:hover {
    background: #f8f9fa;
}

/* Articles similaires */
.similar-posts {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #e2e8f0;
}

.similar-posts .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 2rem;
    text-align: center;
}

.similar-posts .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #00d4ff);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.similar-posts .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.similar-posts .blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.similar-posts .blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.similar-posts .blog-card-inner {
    padding: 1.5rem;
}

.similar-posts .blog-image {
    position: relative;
    margin: -1.5rem -1.5rem 1.5rem;
    height: 200px;
    overflow: hidden;
}

.similar-posts .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.similar-posts .blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.similar-posts .blog-category-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.similar-posts .blog-category {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.similar-posts .blog-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.similar-posts .blog-meta {
    margin-bottom: 1rem;
}

.similar-posts .blog-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 500;
}

.similar-posts .blog-date i {
    color: #007bff;
    font-size: 0.9rem;
}

.similar-posts .blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.similar-posts .blog-excerpt {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.similar-posts .blog-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.similar-posts .blog-link:hover {
    color: #0056b3;
    transform: translateX(5px);
}

.similar-posts .blog-link i {
    transition: transform 0.3s ease;
}

.similar-posts .blog-link:hover i {
    transform: translateX(3px);
}

/* Responsive */
@media (max-width: 768px) {
    .article-hero {
        padding: 3rem 0 2rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .article-content {
        padding: 2rem 0;
    }
    
    .article-body {
        font-size: 1rem;
    }
    
    .article-body h2 {
        font-size: 1.5rem;
    }
    
    .article-body h3 {
        font-size: 1.25rem;
    }
    
    .similar-posts .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .similar-posts .blog-card-inner {
        padding: 1rem;
    }
    
    .similar-posts .blog-image {
        margin: -1rem -1rem 1rem;
        height: 180px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-excerpt {
        font-size: 1rem;
    }
    
    .article-categories {
        gap: 0.5rem;
    }
    
    .article-category {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }
}

.back-to-home {
  position: relative;
  z-index: 100;
  margin: 6rem 0 0 0;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  background: none;
  border: none;
  box-shadow: none;
  transition: color 0.2s;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}
.back-link i {
  font-size: 1.1rem;
}
.back-link:hover {
  color: var(--secondary-color);
  text-decoration: underline;
  background: rgba(221, 0, 0, 0.1);
}
