/* =========================================
   Cholet Services - BLOG PROFESSIONNEL
========================================= */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  color: #222;
  line-height: 1.6;
}

.cs-blog-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 20px;
}

/* Header du blog */
.cs-blog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.cs-blog-title {
  margin: 0;
  font-size: 32px;
  color: #2c3e50;
  font-weight: 700;
}

.cs-blog-new-article {
  display: inline-block;
  padding: 12px 24px;
  background: #2c3e50;
  color: #fff;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s ease;
  border: 2px solid #2c3e50;
}

.cs-blog-new-article:hover {
  background: #fff;
  color: #2c3e50;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.15);
}

/* Articles */
.cs-article-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e6e9ee;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* Image de couverture */
.cs-article-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e6e9ee;
}

/* Titre de l'article */
.cs-article-title {
  margin: 0 0 12px 0;
  font-size: 26px;
  color: #2c3e50;
  font-weight: 700;
  line-height: 1.3;
}

/* Métadonnées */
.cs-article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e6e9ee;
  font-size: 14px;
  color: #666;
}

.cs-article-author {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #2c3e50;
}

.cs-article-author::before {
  content: "👤";
  font-size: 12px;
}

/* Badge de statut */
.cs-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cs-badge-draft {
  background: #fff8e6;
  color: #e67e22;
  border: 1px solid #ffd8a6;
}

.cs-badge-published {
  background: #e8f8ee;
  color: #1f7a3b;
  border: 1px solid #bfe8cd;
}

/* Contenu de l'article */
.cs-article-content {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 24px;
}

.cs-article-content p {
  margin: 0 0 16px 0;
}

.cs-article-content p:last-child {
  margin-bottom: 0;
}

/* Actions */
.cs-article-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid #e6e9ee;
}

.cs-action-edit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #2c3e50;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cs-action-edit:hover {
  background: #1f2c38;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* État vide */
.cs-no-articles {
  text-align: center;
  padding: 60px 20px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  color: #666;
  font-size: 16px;
}

.cs-no-articles-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .cs-blog-container {
    padding: 0 16px;
    margin: 1rem auto;
  }
  
  .cs-blog-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .cs-blog-title {
    font-size: 28px;
    text-align: center;
  }
  
  .cs-blog-new-article {
    text-align: center;
  }
  
  .cs-article-card {
    padding: 20px;
  }
  
  .cs-article-title {
    font-size: 22px;
  }
  
  .cs-article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .cs-article-content {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .cs-article-actions {
    justify-content: center;
  }
  
  .cs-action-edit {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================
   Cholet Services - FORMULAIRES BLOG
   (À ajouter à la fin du fichier blog.css)
========================================= */

/* Conteneur d'édition */
.cs-edit-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 20px;
}

.cs-edit-title {
  margin: 0 0 28px 0;
  font-size: 28px;
  color: #2c3e50;
  font-weight: 700;
}

/* Formulaire */
.cs-edit-form {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid #e6e9ee;
}

.cs-form-group {
  margin-bottom: 24px;
}

.cs-form-group label {
  display: block;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 15px;
}

.cs-form-input,
.cs-form-textarea,
.cs-form-select,
.cs-form-file {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d5dbe2;
  border-radius: 12px;
  font-size: 15px;
  font-family: Arial, sans-serif;
  background: #fff;
  color: #222;
  transition: all 0.3s ease;
}

.cs-form-input:focus,
.cs-form-textarea:focus,
.cs-form-select:focus {
  outline: none;
  border-color: #2c3e50;
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.15);
}

.cs-form-input {
  height: 48px;
}

.cs-form-textarea {
  min-height: 200px;
  resize: vertical;
  line-height: 1.6;
}

.cs-form-file {
  padding: 12px;
  border: 2px dashed #d5dbe2;
  background: #f8f9fa;
  cursor: pointer;
}

.cs-form-file:hover {
  border-color: #2c3e50;
  background: #f3f5f8;
}

.cs-form-select {
  height: 48px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%232c3e50' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
  padding-right: 40px;
  appearance: none;
}

.cs-form-actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid #e6e9ee;
}

.cs-button {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cs-button-preview {
  background: #f3f5f8;
  color: #2c3e50;
  border: 2px solid #d5dbe2;
}

.cs-button-preview:hover {
  background: #e6e9ee;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cs-button-submit {
  background: #2c3e50;
  color: #fff;
}

.cs-button-submit:hover {
  background: #1f2c38;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* Prévisualisation */
.cs-preview-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cs-preview-box {
  background: #fff;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.cs-preview-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid #e6e9ee;
}

.cs-preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 14px;
}

.cs-preview-statut {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.cs-preview-statut-brouillon {
  background: #fff8e6;
  color: #e67e22;
  border: 1px solid #ffd8a6;
}

.cs-preview-statut-publie {
  background: #e8f8ee;
  color: #1f7a3b;
  border: 1px solid #bfe8cd;
}

.cs-preview-content {
  font-size: 16px;
  line-height: 1.8;
  color: #444;
}

.cs-preview-content p {
  margin: 0 0 16px 0;
}

.cs-preview-close {
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cs-preview-close:hover {
  background: #a83225;
  transform: translateY(-2px);
}

/* Responsive pour les formulaires */
@media (max-width: 768px) {
  .cs-edit-container {
    padding: 0 16px;
    margin: 1rem auto;
  }
  
  .cs-edit-form {
    padding: 20px;
  }
  
  .cs-edit-title {
    font-size: 24px;
  }
  
  .cs-form-actions {
    flex-direction: column;
  }
  
  .cs-button {
    width: 100%;
  }
  
  .cs-preview-box {
    padding: 20px;
  }
}