body {
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 16px;
  line-height: 1.6;
  margin: 2em;
  background-color: #fdfdfd;
  color: #222;
}
.download-btn {  margin: 1.5em 0;  padding: 0.5em 1em;  background-color: #800038;  color: white;  border: none;  cursor: pointer;  border-radius: 4px;  font-size: 1em;}.badge-contrat {  display: inline-block;  background-color: #800038;  color: white;  padding: 0.2em 0.6em;  border-radius: 6px;  font-weight: bold;  font-size: 0.85em;  margin-top: 0.5em;}.onglets {  display: flex;  gap: 1em;  margin-bottom: 2em;  flex-wrap: wrap;}.onglet {  padding: 0.4em 1em;  background-color: #f0f0f0;  border-radius: 4px;  cursor: pointer;}.onglet.active {  background-color: #800038;  color: white;}
.texte-contrat .id-contrat {
  font-size: 0.9em;
  color: #800038;
  font-weight: bold;
  margin-bottom: 0.3em;
}

/* Le container existe déjà et lui donne le fond, la taille, etc.
   On ne le touche pas si tout est OK */
.badge-contrat__link {
  display: block;           /* remplit tout le badge */
  width: 100%;
  height: 100%;
  color: inherit;           /* garde la couleur (#fff) du badge */
  text-decoration: none;    /* pas de soulignement dans le badge */
  line-height: inherit;     /* garde la hauteur centrée */
  text-align: center;       /* chiffre centré */
  font: inherit;            /* garde la graisse/tailles du badge */
}

.badge-contrat__link:hover,
.badge-contrat__link:focus {
  filter: brightness(0.95);
  outline: none;
}

.tri-contrats {
  margin: 1em 0;
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: wrap;
}

.tri-contrats a {
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  padding: 0.3em 0.6em;
  border-radius: 4px;
  color: #560027; /* couleur de ton rouge actuel */
  text-decoration: none;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
}

.tri-contrats a:hover,
.tri-contrats a.active {
  background-color: #560027;
  color: white;
  border-color: #560027;
}

.logo-contrat {
  height: 40px;
  vertical-align: middle;
  margin-right: 0.8em;
  margin-bottom: -8px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
.ligne-contrat {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5em;
}

.logo-contrat-container {
  flex: 0 0 auto;
  margin-right: 1em;
}

.logo-contrat-container img {
  height: 40px;
  border-radius: 4px;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

.texte-contrat {
  flex: 1;
}

h1 {
  font-size: 2em;
  color: #880033;
  border-bottom: 2px solid #880033;
  padding-bottom: 0.3em;
  margin-bottom: 1em;
  text-align: left;
}

h2 {
  font-size: 1.5em;
  color: #880033;
  margin-top: 2em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.2em;
}

h3 {
  font-size: 1.2em;
  color: #444;
  margin-top: 1.5em;
}

.onglets {
  display: flex;
  gap: 1em;
  margin-bottom: 1em;
}

.onglet {
  padding: 0.5em 1em;
  background-color: #eee;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.onglet.active {
  background-color: #880033;
  color: white;
  font-weight: bold;
}

.contenu-onglet {
  display: none;
}

.contenu-onglet.active {
  display: block;
}

ul {
  padding-left: 1em;
}

li {
  margin-bottom: 1.5em;
  padding: 0.5em;
  background: #f9f9f9;
  border-left: 4px solid #880033;
  padding-left: 1em;
}

strong {
  color: #000;
}
.onglets, .onglet, .contrat, .contrat-titre, .contrat-texte {
  font-family: inherit !important;
}
/* lien du badge */
.badge-contrat__link {
  text-decoration: none;
  color: inherit;
  display: block;           /* pour occuper le badge en entier */
}

/* petit feedback visuel */
.badge-contrat,
.badge-contrat__link {
  transition: filter .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* selon où est ton background (sur .badge-contrat ou sur le <a>),
   on met l’effet sur les deux sélecteurs pour couvrir les deux cas */
.badge-contrat:hover,
.badge-contrat:focus-within,
.badge-contrat__link:hover,
.badge-contrat__link:focus {
  filter: brightness(0.95);
  outline: none;
  box-shadow: 0 0 0 3px rgba(123, 23, 75, .18); /* discret */
}
