/* -------------------------------------------------------
   BASE TYPO & LAYOUT
---------------------------------------------------------*/
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: #222;
}

main, .main-container {
  padding-top: 20px;
  padding-bottom: 30px;
}

/* Légère limitation de largeur pour un confort de lecture */
.container-fluid {
  max-width: 1100px;
}

/* -------------------------------------------------------
   TITRES (h1–h4)
---------------------------------------------------------*/
h1 {
  font-size: 1.6em !important;
  font-weight: 650;
  margin-top: 1.4em;
  margin-bottom: 0.7em;
  letter-spacing: 0.02em;
}

h2 {
  font-size: 1.35em !important;
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
}

h3 {
  font-size: 1.18em !important;
  font-weight: 600;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}

h4 {
  font-size: 1.05em !important;
  font-weight: 600;
  margin-top: 0.8em;
  margin-bottom: 0.4em;
}

/* Soulignement discret pour certains titres de niveau 1 */
h1:not(.title) {
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.3em;
}

/* -------------------------------------------------------
   SECTIONS ROCCC (optionnel)
   Applique .roccc-section via Markdown : 
   # [R]eliability {.roccc-section}
---------------------------------------------------------*/
.roccc-section {
  position: relative;
  padding-left: 0.2em;
}

.roccc-section::before {
  content: "ROCCC";
  position: absolute;
  left: -70px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background-color: #0073e6;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
}

/* -------------------------------------------------------
   PARAGRAPHES & LISTES
---------------------------------------------------------*/
p {
  font-size: 0.98em;
  margin-bottom: 1em;
}

ul li,
ol li {
  margin-bottom: 0.35em;
}

/* Espacement légèrement supérieur après un bloc de liste */
ul, ol {
  margin-bottom: 0.9em;
}

/* -------------------------------------------------------
   TABLEAUX
---------------------------------------------------------*/
table {
  width: 100% !important;
  margin-top: 1em;
  margin-bottom: 1.5em;
  font-size: 0.95em;
  border-collapse: collapse;
}

thead th {
  background-color: #f7f7f7 !important;
  font-weight: 600 !important;
  border-bottom: 2px solid #e0e0e0 !important;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

tbody td,
thead th {
  padding: 8px 10px !important;
  border-bottom: 1px solid #eeeeee;
}

/* -------------------------------------------------------
   BLOC DE CODE & CHUNKS R
---------------------------------------------------------*/
pre, code {
  font-size: 0.90em !important;
}

pre {
  padding: 10px !important;
  border-radius: 4px !important;
  background-color: #f5f5f5 !important;
  border: 1px solid #e5e5e5 !important;
}

/* -------------------------------------------------------
   CITATIONS / BLOCKQUOTES
---------------------------------------------------------*/
blockquote {
  border-left: 4px solid #0073e6;
  padding-left: 12px;
  margin-left: 0;
  font-style: italic;
  color: #444;
  background-color: #f9fbff;
  padding-top: 6px;
  padding-bottom: 6px;
}

/* -------------------------------------------------------
   ENCADRÉS : NOTE / WARNING / TIP
   Utilisation dans le Rmd :
   ::: note
   Contenu...
   :::
---------------------------------------------------------*/
div.note,
div.warning,
div.tip {
  border-radius: 4px;
  padding: 10px 12px;
  margin: 12px 0;
  font-size: 0.95em;
}

/* Note neutre (info) */
div.note {
  border-left: 4px solid #0073e6;
  background-color: #f4f8ff;
}

/* Avertissement / risque */
div.warning {
  border-left: 4px solid #e67e22;
  background-color: #fff6eb;
}

/* Conseil / bonne pratique */
div.tip {
  border-left: 4px solid #27ae60;
  background-color: #ecf9f1;
}

/* Titre implicite dans les encadrés (si tu veux) */
div.note::before {
  content: "Note";
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78em;
  letter-spacing: 0.09em;
  color: #0050a8;
  display: block;
  margin-bottom: 3px;
}

div.warning::before {
  content: "Attention";
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78em;
  letter-spacing: 0.09em;
  color: #b05a12;
  display: block;
  margin-bottom: 3px;
}

div.tip::before {
  content: "Conseil";
  font-weight: 600;
  text-transform: uppercase;
 font-size: 0.78em;
  letter-spacing: 0.09em;
  color: #1f7f48;
  display: block;
  margin-bottom: 3px;
}

/* -------------------------------------------------------
   TABLE OF CONTENTS (TOC)
---------------------------------------------------------*/
.tocify {
  font-size: 0.9em;
}

.tocify ul li {
  margin-bottom: 2px;
}

.tocify .tocify-item.active {
  font-weight: bold;
  color: #0073e6;
}

/* -------------------------------------------------------
   SEPARATEURS HORIZONTAUX
---------------------------------------------------------*/
hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 30px 0;
}

/* -------------------------------------------------------
   SCHEMA ASCII
---------------------------------------------------------*/
.asciibox {
  text-align: center;
}
.asciibox pre {
  display: inline-block;
  text-align: left;
}
