/* ============================================
   GLOBAL CSS - Saint-Malo Débloqué
   Blog High Tech / Réparation Électronique
   © 2026
   ============================================ */

/* ---- RESET & BASE ANTI-OVERFLOW ---- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #0d1421;
  color: #e8eef4;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, iframe, embed, object, canvas, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

table {
  max-width: 100%;
}

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

/* ---- TYPOGRAPHY ---- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.75em;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: break-word;
  word-wrap: break-word;
  color: #ffffff;
}

p {
  margin: 0 0 1em;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

a {
  color: #50e6ff;
  transition: color 0.2s;
}

a:hover {
  color: #0078d4;
}

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

pre, code {
  overflow-x: auto;
  max-width: 100%;
  word-break: break-word;
}

/* ---- LAYOUT ---- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- BADGES & TAGS ---- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
}

.badge-blue {
  background-color: rgba(0, 120, 212, 0.2);
  color: #50e6ff;
  border: 1px solid rgba(0, 120, 212, 0.4);
}

.badge-yellow {
  background-color: rgba(255, 185, 0, 0.15);
  color: #ffb900;
  border: 1px solid rgba(255, 185, 0, 0.3);
}

.badge-green {
  background-color: rgba(0, 200, 100, 0.15);
  color: #00c864;
  border: 1px solid rgba(0, 200, 100, 0.3);
}

/* ---- SECTION BLOCKS ---- */
.section {
  padding: 64px 0;
}

.section-dark {
  background-color: #0a0f1a;
}

.section-mid {
  background-color: #111827;
}

.section-title {
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 1rem;
  color: #b0c4d8;
  margin-bottom: 40px;
}

/* ---- CARDS ---- */
.card {
  background-color: #111827;
  border: 1px solid #1e2d3d;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: #0078d4;
  transform: translateY(-3px);
}

/* ---- ARTICLE CARD ---- */
.article-card {
  background-color: #111827;
  border: 1px solid #1e2d3d;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}

.article-card:hover {
  border-color: #0078d4;
  transform: translateY(-4px);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

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

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

.article-card-body h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  line-height: 1.35;
  color: #f0f6fc;
}

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

.article-card-body h3 a:hover {
  color: #50e6ff;
}

.article-card-body p {
  font-size: 0.875rem;
  color: #b0c4d8;
  line-height: 1.6;
  margin: 0;
}

.read-time {
  font-size: 0.75rem;
  color: #8a9eb2;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- FORMS ---- */
input,
textarea,
select {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  background-color: #0d1421;
  border: 1px solid #1e2d3d;
  color: #e8eef4;
  border-radius: 6px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #0078d4;
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.2);
}

input::placeholder,
textarea::placeholder {
  color: #5a7a90;
}

/* ---- TABLES ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  color: #e8eef4;
}

.data-table th {
  background-color: rgba(0, 120, 212, 0.15);
  color: #50e6ff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 2px solid #0078d4;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #1a2a3a;
  vertical-align: top;
}

.data-table tr:hover td {
  background-color: rgba(0, 120, 212, 0.05);
}

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

/* ---- FOCUS VISIBLE GLOBAL ---- */
:focus-visible {
  outline: 2px solid #50e6ff;
  outline-offset: 2px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  line-height: 1;
}

.btn:focus-visible {
  outline: 2px solid #50e6ff;
  outline-offset: 2px;
}

.btn-primary {
  background-color: #0078d4;
  color: #fff;
  border-color: #0078d4;
}

.btn-primary:hover {
  background-color: #0063b1;
  border-color: #0063b1;
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  color: #50e6ff;
  border-color: #50e6ff;
}

.btn-secondary:hover {
  background-color: rgba(80, 230, 255, 0.1);
  color: #50e6ff;
  transform: translateY(-1px);
}

.btn-accent {
  background-color: #ffb900;
  color: #0a0f1a;
  border-color: #ffb900;
}

.btn-accent:hover {
  background-color: #e6a800;
  border-color: #e6a800;
  color: #0a0f1a;
  transform: translateY(-1px);
}

/* ---- SCROLLBAR CUSTOM ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0f1a;
}

::-webkit-scrollbar-thumb {
  background: #1e2d3d;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0078d4;
}

/* ---- SELECTION ---- */
::selection {
  background-color: rgba(0, 120, 212, 0.35);
  color: #fff;
}

/* ---- PROGRESS BARS ---- */
.progress-bar {
  background-color: #1e2d3d;
  border-radius: 50px;
  height: 8px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 50px;
  background-color: #0078d4;
  transition: width 0.6s ease;
}

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.text-accent  { color: #50e6ff; }
.text-yellow  { color: #ffb900; }
.text-muted   { color: #b0c4d8; }
.text-white   { color: #fff; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mt-32 { margin-top: 32px; }
.mb-32 { margin-bottom: 32px; }
.hidden { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- RESPONSIVE GLOBAL ---- */
@media (max-width: 768px) {
  body { overflow-x: hidden; }

  .container,
  .container-narrow {
    padding: 0 16px;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .grid, [class*='grid'] {
    grid-template-columns: 1fr !important;
  }

  .btn {
    padding: 11px 20px;
    font-size: 0.9rem;
  }

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

@media (max-width: 480px) {
  .section-title {
    font-size: 1.25rem;
  }

  .badge {
    font-size: 0.68rem;
  }
}
