*, ::before, ::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", Sniglet, Arial, Helvetica, sans-serif;
  color: black;
  margin: 20px;
}

#retour,
#imprimer {
  font-family: "Comic Sans MS", Sniglet, Arial, Helvetica, sans-serif;
  font-size: 20px;
  padding: 8px;
  border: 2px solid black;
  border-radius: 8px;
  background-color: #aee;
}

div.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  width: 90vw;
  margin: 0 auto;
  page-break-inside: avoid;
  -moz-column-break-inside: avoid;
       break-inside: avoid;
}

div.partie {
  page-break-inside: avoid;
  -moz-column-break-inside: avoid;
       break-inside: avoid;
}

div.ratio_page {
  aspect-ratio: 2/3;
  width: 100%;
  position: relative;
}
div.ratio_page:nth-child(odd)::before {
  content: "";
  display: block;
  height: calc(100% + 10px);
  width: 4px;
  background-color: black;
  position: absolute;
  right: -10px;
  bottom: -10px;
}
div.ratio_page:nth-child(3)::before {
  top: -10px;
}
div.ratio_page:nth-child(1)::after, div.ratio_page:nth-child(2)::after {
  content: "";
  display: block;
  width: calc(100% + 10px);
  height: 4px;
  background-color: black;
  position: absolute;
  bottom: -10px;
  right: -10px;
}
div.ratio_page:nth-child(2)::after {
  bottom: -10px;
  left: -10px;
}
div.ratio_page table {
  height: 100%;
  width: 100%;
  border-collapse: collapse;
}
div.ratio_page table tbody {
  height: 100%;
  display: flex;
  flex-direction: column;
}
div.ratio_page table tr {
  display: flex;
  flex: 1;
}
div.ratio_page table tr td {
  font-size: 3.5dvw;
  display: grid;
  place-items: center;
  width: 50%;
}
div.ratio_page table tr:not(:last-of-type) {
  border-bottom: 1px solid black;
}
div.ratio_page table .calcul {
  border-right: 1px solid #888;
}
div.ratio_page table .resultat {
  color: red;
}

@media print {
  /* Cache uniquement ce qu'on ne veut pas voir */
  h1, #retour, #imprimer, br {
    display: none !important;
  }
  /* Style des grids */
  div.grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 95vw;
    gap: 1rem;
    margin: 0 auto;
    page-break-inside: avoid;
    -moz-column-break-inside: avoid;
         break-inside: avoid;
  }
  /* Style des cellules */
  div.ratio_page {
    display: block !important;
    aspect-ratio: 2/3;
    width: 100%;
  }
  /* Style global */
  body {
    margin: 0;
    padding: 0;
  }
}/*# sourceMappingURL=index.css.map */