/* public/seo-common.css — Thème épuré, typographie unifiée & navigation avec séparateurs */

/* Règle globale d'application stricte de la police Baloo 2 sur tous les titres */
h1, h2, h3, h4, h5, h6,
.seo-card h1, .seo-card h2, .seo-card h3, .seo-card h4,
.example-box h3, .example-box h4, .bad-example h3, .bad-example h4, .rule-box h4,
.cta-banner h3, .meld-title, .total-score, .status-badge, .nav-links a, .breadcrumb {
  font-family: 'Baloo 2', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
}

body {
  background: var(--felt-edge, #244f3f) radial-gradient(1100px 760px at 50% 28%, var(--felt, #2f6b54), var(--felt-edge, #244f3f)) no-repeat fixed !important;
  color: var(--ink, #e9edf2);
  font-family: 'Baloo 2', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.seo-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  box-sizing: border-box;
}

/* Header & Navigation sans capsules (séparés par un trait) */
.seo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 26px;
}

.seo-logo {
  height: 75px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}

.seo-logo:hover {
  transform: scale(1.02);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
}

.nav-links a {
  color: var(--gold, #ffd87a);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 6px 14px;
  background: transparent !important;
  border: none !important;
  border-right: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 0 !important;
  white-space: nowrap;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.nav-links a:last-child {
  border-right: none !important;
}

.nav-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 22px;
  line-height: 1.4;
}

.breadcrumb a {
  color: var(--gold, #ffd87a);
  text-decoration: none;
  font-weight: 600;
}

/* Contenu principal épuré sans fond sombre superflu */
.seo-card {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.seo-card h1 {
  font-size: 30px;
  color: var(--gold, #ffd87a);
  margin: 0 0 16px 0;
  font-weight: 700;
  line-height: 1.3;
}

.seo-card h2 {
  color: var(--gold, #ffd87a);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 6px;
  margin: 28px 0 14px 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.seo-card h3 {
  color: #ffffff;
  margin: 20px 0 10px 0;
  font-size: 18px;
  font-weight: 600;
}

.seo-card p, .seo-card li {
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

.seo-card ul, .seo-card ol {
  padding-left: 22px;
  margin: 12px 0 18px 0;
}

.seo-card li {
  margin-bottom: 6px;
}

/* Blocs d'exemples & avertissements sains */
.example-box, .bad-example, .rule-box {
  background: rgba(0, 0, 0, 0.12) !important;
  border: none !important;
  border-left: 4px solid var(--accent, #d9a441) !important;
  padding: 12px 16px !important;
  margin: 16px 0 !important;
  border-radius: 0 8px 8px 0 !important;
}

.bad-example {
  border-left-color: #ff6b6b !important;
}

.example-box h4, .bad-example h4, .rule-box h4 {
  margin: 0 0 6px 0;
  color: var(--gold, #ffd87a);
  font-size: 17px;
}

/* Tableaux avec défilement horizontal garanti */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

th, td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  font-size: 15px;
}

th {
  color: var(--gold, #ffd87a);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
}

/* Calculateur */
.calc-container {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 20px 0 !important;
}

.meld-builder {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.meld-row {
  background: rgba(0, 0, 0, 0.16);
  padding: 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.meld-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.meld-title {
  font-weight: 700;
  color: var(--gold, #ffd87a);
  font-size: 16px;
}

.card-chips-container {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  min-height: 38px;
}

.card-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.chip-black {
  background: #2b3240;
  color: #ffffff;
  border: 1px solid #4a5568;
}

.chip-red {
  background: #3b2024;
  color: #ff6b6b;
  border: 1px solid #742a2a;
}

.chip-joker {
  background: linear-gradient(135deg, #4a2b6b, #2b3240);
  color: #ffd700;
  border: 1px solid #8a4baf;
}

.chip-remove {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}

.chip-remove:hover {
  color: #ff6b6b;
}

.meld-inputs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.card-select {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  min-height: 40px;
}

.card-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.calc-summary {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--accent, #d9a441);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.total-score {
  font-size: 34px;
  font-weight: 800;
  color: var(--gold, #ffd87a);
  margin: 6px 0;
}

.status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 6px;
}

.status-ok { background: #27ae60; color: #fff; }
.status-warning { background: #e67e22; color: #fff; }
.status-danger { background: #c0392b; color: #fff; }

.calc-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.calc-btn {
  background: var(--accent, #d9a441);
  color: #1d222b;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
}

.calc-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  min-height: 44px;
}

.cta-banner {
  margin-top: 32px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--accent, #d9a441);
  border-radius: 12px;
  text-align: center;
}

.cta-btn {
  display: inline-block;
  background: var(--accent, #d9a441);
  color: #1d222b;
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  margin-top: 10px;
}

/* Optimisation mobile (max-width: 640px) */
@media (max-width: 640px) {
  .seo-page {
    padding: 12px 12px 40px;
  }
  .seo-header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
  }
  .seo-logo {
    height: 56px;
  }
  .nav-links {
    justify-content: center;
    width: 100%;
  }
  .nav-links a {
    font-size: 13px;
    padding: 4px 10px;
  }
  .seo-card h1 {
    font-size: 22px;
    margin-bottom: 12px;
  }
  .seo-card h2 {
    font-size: 18px;
    margin: 20px 0 10px 0;
  }
  .seo-card p, .seo-card li {
    font-size: 14px;
  }
  .calc-actions {
    flex-direction: column;
    width: 100%;
  }
  .calc-btn, .calc-btn-secondary {
    width: 100%;
  }
}

@media print {
  body { background: #ffffff !important; color: #000000 !important; font-size: 12pt; }
  .seo-page { max-width: 100% !important; padding: 0 !important; }
  .seo-header, .nav-links, .calc-actions, .cta-banner, .chip-remove, button { display: none !important; }
  .seo-card { background: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
  h1, h2, h3, .total-score, .meld-title { color: #000000 !important; }
  .rule-box, .example-box, .bad-example { background: #f0f0f0 !important; border-left: 4px solid #333333 !important; color: #000000 !important; }
  a { text-decoration: underline !important; color: #000000 !important; }
  .status-badge { border: 1px solid #000000 !important; background: none !important; color: #000000 !important; }
}
