/* =========================
   THEME BLOG DOCUFASTER
   ========================= */

:root {
  /* Palette de couleurs par défaut (Light Mode) */
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --accent-color: #6366f1;
  --accent-hover: #4f46e5;
  
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-secondary: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  
  --success-color: #22c55e;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

[data-theme="dark"] {
  /* Palette Dark Mode */
  --primary-color: #3b82f6;
  --primary-hover: #60a5fa;
  --accent-color: #818cf8;
  --accent-hover: #a5b4fc;
  
  --bg-body: #0f172a;
  --bg-card: #1e293b;
  --bg-secondary: #334155;
  
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --border-color: #334155;
  --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Reset & Base pour page standalone */
body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  transition: background-color 0.3s, color 0.3s;
}

/* Header & Footer pour page standalone */
header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary-color);
}

footer {
  background: #1e293b;
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin-top: 4rem;
}

/* =========================
   CONTENU ARTICLE
   ========================= */

/* Container principal */
article {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* En-tête de l'article */
.article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Typographie du contenu */
.article-content {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

.article-content h2 {
  font-size: 1.8rem;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.article-content h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.75rem;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.article-content a:hover {
  color: var(--primary-hover);
}

/* =========================
   COMPOSANTS SPÉCIFIQUES
   ========================= */

/* 1. CTA Box (Appel à l'action) */
.cta-box {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.cta-box h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.cta-button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.2s;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  background-color: var(--primary-hover);
  box-shadow: 0 8px 15px -3px rgba(37, 99, 235, 0.4);
}

/* 2. Definition Box (Snippet SEO) */
.definition-box {
  background-color: var(--bg-card);
  border-left: 4px solid var(--primary-color);
  padding: 2rem;
  margin: 2.5rem 0;
  border-radius: 0 12px 12px 0;
  box-shadow: var(--card-shadow);
}

.definition-box h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.definition-box h2::before {
  content: '💡';
  font-size: 1.5rem;
}

.definition-box p {
  margin-bottom: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

/* 3. Tool Preview (Simulation) */
.tool-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  margin: 2.5rem 0;
}

.tool-header {
  background: var(--bg-secondary);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #22c55e; }

.tool-title {
  margin-left: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-family: monospace;
}

.tool-content {
  padding: 3rem 2rem;
  text-align: center;
}

/* 4. Security Grid (E-E-A-T) */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.security-item {
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: transform 0.2s;
}

.security-item:hover {
  transform: translateY(-3px);
  border-color: var(--primary-color);
}

.security-item h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.security-item p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* 5. Step List */
.step-list {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.step-list li {
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: 2rem;
}

.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--bg-secondary);
  color: var(--primary-color);
  border-radius: 50%;
  text-align: center;
  line-height: 2.5rem;
  font-weight: bold;
  font-size: 1.1rem;
  border: 2px solid var(--border-color);
}

/* 6. Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}

.comparison-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  text-align: left;
  color: var(--text-primary);
  font-weight: 600;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .highlight-green {
  color: var(--success-color);
  font-weight: 600;
}

.comparison-table .highlight-blue {
  color: var(--primary-color);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .article-header h1 {
    font-size: 2rem;
  }
  
  .cta-box {
    padding: 1.5rem;
  }
  
  .definition-box {
    padding: 1.5rem;
  }
}

/* =========================
   PAGE INDEX BLOG
   ========================= */

.page-header {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-secondary);
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.page-header .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow);
  border-color: var(--primary-color);
}

.article-header-img {
  height: 200px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.article-info, .article-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card h2 {
  font-size: 1.25rem;
  margin: 0.5rem 0 1rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.article-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.article-meta, .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.article-category {
  background: var(--bg-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-weight: 500;
  color: var(--primary-color);
}

.read-more {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: auto;
}
