/* ================================================
   GLOBAL.CSS - RFENCE.FR
   Styles globaux - Sécurité / Tech / Entreprise
   ================================================ */

/* ---- Reset & Box Model ---- */
*, *::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: #161616;
  color: #e8e8e8;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ---- Anti-overflow texte ---- */
p, li, td, th, h1, h2, h3, h4, h5, h6, span, a {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ---- Tableaux responsive ---- */
table {
  max-width: 100%;
  border-collapse: collapse;
  width: 100%;
}

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

/* ---- Liens globaux ---- */
a {
  color: #0f62fe;
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
  outline: none;
}

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

/* ---- Focus visible ---- */
:focus-visible {
  outline: 2px solid #0f62fe;
  outline-offset: 3px;
}

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

/* ---- Selection ---- */
::selection {
  background-color: #0f62fe;
  color: #ffffff;
}

/* ---- Section container ---- */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Section label ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f62fe;
  margin-bottom: 10px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 2px;
  background-color: #0f62fe;
  border-radius: 2px;
}

.section-label--light {
  color: #6ea6ff;
}

.section-label--light::before {
  background-color: #6ea6ff;
}

.section-label--dark {
  color: #0f62fe;
}

/* ---- Section header ---- */
.section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 40px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-title--light {
  color: #ffffff;
}

.section-desc {
  font-size: 15px;
  color: #a8a8a8;
  line-height: 1.65;
  align-self: end;
}

.section-desc--light {
  color: #a8a8a8;
}

/* ---- Bouton global ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: #0f62fe;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  border: 2px solid #0f62fe;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #0353e9;
  border-color: #0353e9;
  color: #ffffff;
  text-decoration: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: transparent;
  color: #0f62fe;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  border: 2px solid #0f62fe;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: #0f62fe;
  color: #ffffff;
  text-decoration: none;
}

/* ---- Badge catégorie ---- */
.cat-badge {
  display: inline-block;
  padding: 3px 10px;
  background-color: #e8f0ff;
  color: #0f62fe;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---- Code & pre ---- */
pre, code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.875em;
  background-color: #262626;
  color: #42be65;
  border-radius: 4px;
  overflow-x: auto;
  max-width: 100%;
}

code {
  padding: 2px 6px;
}

pre {
  padding: 16px;
  white-space: pre-wrap;
}

/* ---- Blockquote ---- */
blockquote {
  border-left: 3px solid #0f62fe;
  padding: 16px 20px;
  margin: 24px 0;
  background-color: #1a2332;
  color: #e0e0e0;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

/* ---- Forms ---- */
input[type="email"],
input[type="text"],
input[type="search"],
textarea,
select {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

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

  .section-container {
    padding: 0 16px;
  }

  .section-header {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 28px;
  }

  .section-title {
    font-size: 24px;
  }

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

  table td, table th {
    font-size: 13px;
  }
}

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

  .section-desc {
    font-size: 14px;
  }
}