/* =============================================================================
   SHARED.CSS — Fondation Neo Glass Design System
   Smart Data Pay — Conventions Collectives
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --accent: #42D80F;
  --accent-dark: #2a8c06;
  --accent-bg: rgba(66, 216, 15, 0.07);
  --accent-bg2: rgba(66, 216, 15, 0.12);
  --accent-light: #f0fde8;
  --bg: #f4f5f7;
  --bg2: #fafbfc;
  --card: #ffffff;
  --text: #1e2028;
  --text2: #5a5e6e;
  --text3: #9498a8;
  --border: #e2e4ea;
  --border-light: #f0f1f4;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

/* ===== HIDE SCROLLBAR ===== */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  overflow-x: hidden;
  max-width: 100vw;
}
html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* ===== RESET ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent);
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-secondary {
  background: var(--card);
  color: var(--text2);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--text3);
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-accent {
  background: var(--accent-light);
  color: var(--accent-dark);
}
.badge-gray {
  background: #f0f1f4;
  color: var(--text3);
}

/* ===== CARTES CONTENU ===== */
.content-card {
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border-light);
  max-width: 100%;
  overflow: hidden;
}

.content-theme {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}

.content-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: #3a3d4a;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.content-body p {
  margin-bottom: 6px;
}
.content-body strong {
  font-weight: 600;
  color: var(--text);
}
.content-body ul, .content-body ol {
  margin: 6px 0 6px 20px;
}
.content-body li {
  margin-bottom: 3px;
}

/* ===== FOOTNOTES ===== */
.content-body .footnote {
  font-size: 12px;
  color: #7a7e8a;
  font-style: italic;
  padding: 6px 10px;
  border-left: 2px solid #d1d5db;
  margin-top: 8px;
  background: #f9faf7;
  border-radius: 0 4px 4px 0;
}

/* ===== TABLEAUX ===== */
.content-body table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12.5px;
  table-layout: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.content-body thead th {
  background: var(--text);
  color: #fff;
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.content-body thead th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}
.content-body thead th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}
.content-body tbody tr:nth-child(even) {
  background: #f6f8f4;
}
.content-body tbody tr:nth-child(odd) {
  background: #fff;
}
.content-body td {
  padding: 7px 12px;
  border: 1px solid #e8eaef;
  color: #3a3d4a;
}
.content-body td:first-child {
  font-weight: 500;
}

/* Table responsive wrapper */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 10px 0;
  max-width: 100%;
}

/* ===== ARTICLES DE REFERENCE ===== */
.articles-block {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f9faf7;
  border-radius: var(--radius);
  border: 1px solid #e8eaef;
}
.articles-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.articles-title::before {
  content: "\1F4C4";
  font-size: 14px;
}
.articles-title .chevron {
  margin-left: auto;
  transition: transform var(--transition);
  font-size: 10px;
  color: var(--text3);
}
.articles-title .chevron.open {
  transform: rotate(180deg);
}
.article-item {
  font-size: 12px;
  color: var(--text2);
  padding: 4px 10px;
  background: #fff;
  border-left: 2px solid var(--border);
  margin-bottom: 4px;
  line-height: 1.55;
  border-radius: 0 4px 4px 0;
}

/* ===== LOADING ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text3);
  font-size: 14px;
  gap: 10px;
}
.loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-state p {
  font-size: 15px;
}

/* ===== DATE DE MISE A JOUR ===== */
.update-date-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
  background: #f0fde8;
  border: 1px solid #d4f5c4;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: #2a8c06;
}
.update-date-banner svg {
  color: #42D80F;
}

/* ===== UTILITAIRES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== CTA SMART DATA PAY (mode restreint) ===== */
.cta-smartdatapay {
  margin: 3rem 0 6rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #fff;
  overflow: hidden;
}
.cta-content {
  padding: 3rem 2.5rem;
  text-align: center;
}
.cta-icon {
  margin-bottom: 1.5rem;
}
.cta-icon svg {
  stroke: #60a5fa;
}
.cta-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}
.cta-description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.cta-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2rem;
}
.cta-feature {
  font-size: 0.95rem;
  color: #e2e8f0;
}
.cta-button {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-button:hover {
  background: #1d4ed8;
  color: #fff;
}

/* Bandeau fixe en bas */
.cta-bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f172a;
  color: #cbd5e1;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}
.cta-bottom-banner a {
  color: #60a5fa;
  font-weight: 600;
  text-decoration: none;
}
.cta-bottom-banner a:hover {
  color: #93bbfc;
}

@media (max-width: 600px) {
  .cta-content {
    padding: 2rem 1.5rem;
  }
  .cta-title {
    font-size: 1.3rem;
  }
  .cta-features {
    flex-direction: column;
    align-items: center;
  }
  .cta-bottom-banner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
