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

body {
  font-family: Arial, Sans-Serif;
  line-height: 1.6;
  background-color: #DEF2DC;
  font-size: 16px; /* Base fixe, tout le reste en rem */
  color: #222;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===========================
   LAYOUT - CONTAINER
   =========================== */
.container {
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* ===========================
   BANNIERE (tableau 3 colonnes)
   =========================== */
.banniere {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 1rem 0;
  overflow-x: auto;
}

.banniere > table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.col-left,
.col-right {
  width: 25%;
}

.col-middle {
  width: 50%;
}

/* Sur mobile : redistribuer les colonnes de la bannière */
@media (max-width: 480px) {
  .col-left,
  .col-right {
    width: 20%;
  }
  .col-middle {
    width: 60%;
  }
}

/* ===========================
   CONTENEUR FLEXIBLE (blocs côte à côte)
   =========================== */
.conteneur {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

@media (min-width: 768px) {
  .conteneur {
    flex-direction: row;
  }
}

.bloc {
  padding: 20px;
  border: 1px solid #ccc;
  text-align: left;
  flex: 1; /* Chaque bloc prend une part égale */
}

/* ===========================
   IMAGE
   =========================== */
.mon-image {
  width: 100%;
  height: auto;
  display: block;
  max-width: 100%;
}

/* ===========================
   DISCLAIMER
   =========================== */
.disclaimer {
  padding: 5px 5px 0 5px;
  text-align: center;
  font-size: 0.9rem;
}

/* ===========================
   SECTIONS CHAPTERS + MISC
   =========================== */
.liens {
  display: flex;
  flex-direction: column; /* Mobile : empilé */
  gap: 1rem;
}

@media (min-width: 768px) {
  .liens {
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
  }
}

/* --- CHAPTERS --- */
.chapters {
  width: 100%;
  height: auto;
  margin-bottom: 0.5rem;
}

.chapters > .summary {
  width: 100%;
  padding: 5px;
}

.chapters > ol > li {
  line-height: 2rem;
  padding-left: 0.1rem;
  font-size: 1rem; /* Mobile */
}

.chapters > ol > li > a {
  text-decoration: none;
}

@media (min-width: 768px) {
  .chapters {
    width: 65%;
  }
  .chapters > ol > li {
    font-size: 1.2rem;
  }
}

/* --- MISC --- */
.misc {
  width: 100%; /* Mobile : pleine largeur */
  height: auto;
}

.misc > .summary {
  width: 100%;
  text-align: center;
  padding: 10px 0;
}

.misc > ul > li {
  line-height: 1.8rem;
  padding-left: 1rem;
  font-size: 1.2rem; /* Réduit sur mobile */
}

.misc > ol > li > a {
  text-decoration: none;
}

@media (min-width: 768px) {
  .misc {
    width: 35%;
  }
  .misc > ul > li {
    font-size: 1.5rem;
  }
}

/* ===========================
   DÉLIMITEUR DE CHAPITRE
   =========================== */
#chapter-delimiter {
  font-weight: bold;
  text-align: left;
}

/* ===========================
   TYPOGRAPHIE
   =========================== */

/* Titres */
h1 {
  font-size: 1.5rem;   /* Mobile */
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.3rem;   /* Mobile */
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

@media (min-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.7rem; }
}

/* Paragraphes */
p {
  font-size: 1rem;     /* Mobile */
  padding-right: 0;
  margin-bottom: 0.8rem;
}

@media (min-width: 768px) {
  p {
    font-size: 1.2rem;
    padding-right: 3rem;
  }
}

/* Liens */
a {
  font-size: 1rem;     /* Mobile */
}

@media (min-width: 768px) {
  a { font-size: 1.3rem; }
}

/* Listes */
ol, ul {
  line-height: 2rem;
  padding-left: 1.5rem;
}

li {
  font-size: 1rem;     /* Mobile : base 16px */
  line-height: 1.8;
}

@media (min-width: 768px) {
  li { font-size: 1.25rem; }
}

ol.general-list {
  padding-top: 1rem;
  padding-left: 2rem;
  font-size: 1.4rem;   /* Mobile */
}

@media (min-width: 768px) {
  ol.general-list {
    padding-left: 1rem;
    font-size: 1.7rem;
  }
}

/* ===========================
   TABLEAUX
   =========================== */
table {
  width: 100%;
  border-collapse: collapse;
  /* Permet le scroll horizontal sur petits écrans */
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Exception : la bannière garde son comportement */
.banniere > table {
  display: table;
  overflow-x: visible;
}

td {
  border: 1px solid black;
  padding: 0.5em;
}

tr {
  border: none;
}

/* ===========================
   ACCESSIBILITÉ
   =========================== */
a:focus,
button:focus {
  outline: 2px solid #4a9e46;
  outline-offset: 2px;
}

/* Respect de la préférence "réduire les animations" */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
