/* ===== DCLC - CSS GLOBAL V5.1 ===== */
/* Polices système uniquement - JAMAIS de Google Fonts */

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

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== ANTI-OVERFLOW GLOBAL ===== */
img, video, iframe, embed, object, svg {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

table {
  max-width: 100%;
}

.table-responsive,
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
}

/* ===== TYPOGRAPHIE ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.25;
  color: #0f172a;
  font-weight: 700;
}

p {
  line-height: 1.75;
  color: #374151;
}

a {
  color: #0f766e;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #0d9488;
}

a:focus {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
  border-radius: 3px;
}

/* ===== VARIABLES CSS ===== */
:root {
  --color-primary: #0f766e;
  --color-primary-dark: #0d5c56;
  --color-primary-light: #14b8a6;
  --color-secondary: #f59e0b;
  --color-secondary-dark: #d97706;
  --color-accent: #1e3a8a;
  --color-dark: #0a1628;
  --color-dark-mid: #1e293b;
  --color-text: #374151;
  --color-text-light: #64748b;
  --color-bg: #f8fafc;
  --color-bg-alt: #f1f5f9;
  --color-border: #e2e8f0;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --container-max: 1200px;
  --container-pad: 24px;
  --transition: 0.2s ease;
}

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  width: 100%;
}

/* ===== SECTION ===== */
.section {
  padding: 72px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: 2rem;
  color: #0f172a;
  margin-bottom: 12px;
  font-weight: 800;
}

.section-header p {
  color: #64748b;
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== BADGE CATÉGORIE ===== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background-color: #e0f2fe;
  color: #0369a1;
}

.badge-primary {
  background-color: #ccfbf1;
  color: #0f766e;
}

.badge-secondary {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-accent {
  background-color: #dbeafe;
  color: #1e3a8a;
}

/* ===== CARTES ARTICLES ===== */
.article-card {
  background-color: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

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

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.article-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.article-card-meta time {
  font-size: 0.8rem;
  color: #94a3b8;
}

.read-time {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-time svg {
  width: 12px;
  height: 12px;
  fill: #94a3b8;
}

.article-card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.35;
}

.article-card-body h3 a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.2s;
}

.article-card-body h3 a:hover {
  color: #0f766e;
}

.article-card-body p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
  flex: 1;
}

/* ===== BOUTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
  letter-spacing: 0.02em;
}

.btn:focus {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: #0f766e;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #0d5c56;
  color: #ffffff;
}

.btn-secondary {
  background-color: #f59e0b;
  color: #0a1628;
}

.btn-secondary:hover {
  background-color: #d97706;
  color: #0a1628;
}

.btn-outline {
  background-color: transparent;
  color: #0f766e;
  border: 2px solid #0f766e;
}

.btn-outline:hover {
  background-color: #0f766e;
  color: #ffffff;
}

/* ===== FORMULAIRES ===== */
input,
textarea,
select,
button {
  font-family: inherit;
}

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: #0f172a;
  background-color: #ffffff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  font-size: 16px; /* évite le zoom iOS */
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ===== TABLEAUX ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  background-color: #0f766e;
  color: #ffffff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: #374151;
  vertical-align: middle;
}

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

.data-table tr:nth-child(even) td {
  background-color: #f8fafc;
}

.data-table tr:hover td {
  background-color: #f0fdfa;
}

/* ===== UTILITAIRES ===== */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== OVERFLOW WORDS ===== */
p, h1, h2, h3, h4, h5, h6, li, td, th {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ===== RESPONSIVE (auto-repair) ===== */
@media (max-width: 1024px) {
  :root {
    --container-pad: 20px;
  }

  .section {
    padding: 56px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .article-card img {
    height: 180px;
  }

  .article-card-body {
    padding: 16px;
  }

  .btn {
    padding: 11px 20px;
  }
}

@media (max-width: 768px) {
  :root {
    --container-pad: 16px;
  }

  html {
    font-size: 15px;
  }

  .section {
    padding: 40px 0;
  }

  .section-header {
    margin-bottom: 28px;
  }

  .section-header h2 {
    font-size: 1.45rem;
    margin-bottom: 8px;
  }

  .section-header p {
    font-size: 0.95rem;
    max-width: 100%;
  }

  .article-card {
    flex-direction: column;
    width: 100%;
  }

  .article-card img {
    height: 160px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .article-card-body {
    padding: 14px;
  }

  .article-card-body h3 {
    font-size: 0.98rem;
  }

  .article-card-body p {
    font-size: 0.85rem;
  }

  .article-card-meta {
    gap: 6px;
    margin-bottom: 8px;
  }

  .article-card-meta time {
    font-size: 0.75rem;
  }

  .read-time {
    font-size: 0.75rem;
    gap: 3px;
  }

  .read-time svg {
    width: 11px;
    height: 11px;
  }

  .btn {
    padding: 10px 18px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .btn-outline {
    border-width: 2px;
  }

  .badge {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  .container {
    padding: 0 var(--container-pad);
  }

  .table-responsive,
  .table-wrapper {
    border-radius: 6px;
  }

  .data-table th,
  .data-table td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .data-table th {
    font-size: 0.8rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="search"],
  textarea {
    padding: 10px 14px;
    font-size: 16px;
  }

  label {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  :root {
    --container-pad: 12px;
  }

  html {
    font-size: 14px;
  }

  .section {
    padding: 28px 0;
  }

  .section-header {
    margin-bottom: 20px;
  }

  .section-header h2 {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  .section-header p {
    font-size: 0.875rem;
  }

  .article-card img {
    height: 140px;
  }

  .article-card-body {
    padding: 12px;
  }

  .article-card-body h3 {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }

  .article-card-body p {
    font-size: 0.82rem;
  }

  .article-card-meta {
    gap: 5px;
    margin-bottom: 6px;
  }

  .article-card-meta time {
    font-size: 0.7rem;
  }

  .read-time {
    font-size: 0.7rem;
  }

  .read-time svg {
    width: 10px;
    height: 10px;
  }

  .btn {
    padding: 9px 14px;
    font-size: 0.82rem;
    gap: 5px;
    border-radius: var(--radius-sm);
  }

  .badge {
    font-size: 0.65rem;
    padding: 2px 8px;
    letter-spacing: 0.03em;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .data-table th {
    font-size: 0.75rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="search"],
  textarea {
    padding: 9px 12px;
    font-size: 16px;
    border-radius: var(--radius-sm);
  }

  label {
    font-size: 0.8rem;
    margin-bottom: 4px;
  }

  .table-responsive,
  .table-wrapper {
    border-radius: 4px;
  }

  .container {
    padding: 0 var(--container-pad);
  }
}