/*
BUG : 1re colonne mémo, numérotation pas centrée verticalement

palette
  bleuTerne 173F5F
  bleu #20639B
  vert 3CAEA3
  jaune F6D55C
  rouge ED553B
*/
:root {
  --bleuTerne: #173F5F;
  --bleu: #20639B;
  --vert: #3CAEA3;
  --jaune: #F6D55C;
  /*--rouge: #ED553B;*/
  --rouge: #C55;
  --rougeClair: #f99989;
  --rougeFonce: rgba(239, 10, 0);
}

html {
  scroll-behavior: smooth;
}

/******  TOC STYLES  ******/
   /* div#toc {
      background: #757575;
      border: 1px solid var(--vert);
      border-radius: 4px;
      color: #f2f2f2;
      width: fit-content;
      padding: 5px;
    }

    #tocTitle {
      font-weight: bold;
      cursor : pointer;
      border-bottom:solid 2px var(--vert);
    }

    #tocTitle:hover {
      background: lightgray;
    }

    ul#toc {
      margin: 0;
      list-style-type: none;
    }

    ul#toc li a {
      text-decoration: none;
      color: inherit;
    }

    ul#toc li a:hover {
      text-decoration: underline;
    }*/


div#toc {
    display: table;
    list-style-type: none;
    border: 1px solid #a2a9b1;
    background-color: #f8f9fa;
    padding: 5px;
    margin-bottom: 10px;
}

#toc li {
    margin-bottom: 0.1em;
    display: list-item;
    text-align: -webkit-match-parent;
}

#toc ul {
    list-style: none;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

#toc ul ul {
    margin: 0 0 0 2em;
    text-align: left;
}

#tocnumber {
    color: #202122;
    text-decoration-color: #202122;
}

.toc-title {
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    border-bottom: solid 2px lightgray;
    padding-bottom: 5px;
}

a {
    text-decoration: none;
    color: #0645ad;
    background: none;
}

a:hover #tocnumber {
    text-decoration: underline;
}

a:hover #toctext {
    text-decoration: underline;
}

a:active #toctext {
    color: orange;
}
/******  TOC STYLES END ******/

/******  LIGHTBOX  ******/
    .lightBoxBG {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(.5, .5, .5, .5);
    }

    .lightBoxElement {
      display: flex;
      margin: auto;
      width: 100%;
      height: 100%;
      padding: 50px;
      box-sizing: border-box;
      justify-content: center;
      align-items: center;
      position: absolute;
      z-index: 999;
    }

    .lightBoxVideo {
      justify-content: center;
      align-items: center;
      display: flex;
      width: auto;
      height: 100%;
      margin: auto;
    }

    .lightBoxImage {
      justify-content: center;
      align-items: center;
      display: flex;
      width: auto;
      height: auto !important;
      margin: auto;
      max-height: 100%;
      max-width: 100%;
      flex: 1;
      object-fit: contain;
    }

    .lightBoxClose {
      width: 40px;
      height: 40px;
      position: fixed;
      color: white;
      right: 0px;
      top: 0;
      font-size: 80px;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .lightBoxClose:hover {
      background: white;
      color: black;
    }
/******  LIGHTBOX END  ******/

/******  BODY STYLES  ******/
    body .details,
    body .note,
    body .exp,
    body .illustration,
    body .edit,
    body footer,
    body .mem,
    body #toc{
      display: none;
    }

    body.eleve {
      max-width: 900px;
      margin: auto;
      font-size: 14pt;
    }

    body.cours {
      font-size: 28px;
      margin: 5px;
    }

   body.cours .details,
    body.cours .note,
    body.cours .exp,
    body.cours .illustration,
    body.cours .edit,
    body.cours footer,
    body.cours .mem,
    body.cours #toc{
      display: revert;
    }
/******  BODY STYLES END  ******/

/******  TIP ICONS STYLES  ******/
    .tipIcon {
      float: right;
      clear: right;
      margin-right: -35px;
      width: 30px;
      margin-top: 0.3rem;
      margin-bottom: 0;
      transition: .2s;
      opacity: .6;
      box-shadow: none;
      filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, .7));
    }

    .tipIcon:hover {
      opacity: 1;
      filter: none;
    }

    .tipText {
      float: right;
      clear: right;
      margin-right: -250px;
      width: 240px;
      margin-top: 0.3rem;
      margin-bottom: 0;
      line-height: 1.3;
      vertical-align: baseline;
      position: relative;
      display: flex;
      padding: 0;
      font-size: 70%;
      border-radius: 3px;
      align-items: center;
    }

    .tipTextIcon {
      width: 30px;
      opacity: .5;
      padding: 3px;
      margin: 5px 5px 5px 0;
    }
/******  TIP ICONS STYLES END  ******/

.t{ /*miniTitle*/
  background: #555;
  width: fit-content;
  padding: 6px 10px;
  color: white;
}

.details t{ /*detailsTitle*/
  filter: invert(1);
  background: black;
}

.i{font-style: italic;}

.b{font-weight: bold;}

kbd{
  color: #aa8657;
  border: solid thin;
  border-radius: 15px;
  background: white;
  padding: 5px;
  box-shadow: 2px 2px 4px black;
}

.unites{
  color: #666;
  font-size: 70%;
}

.unites ul{
  border-left: solid 1px;
  list-style: none;
  padding-left: 10px;
  margin-left:20px;
}

/******  GRID/FLEX STYLES  ******/
    .grid{
      display:grid;
    }

    .grid2{
      display:grid;
      grid-template-columns: 1fr 1fr;
    }

    .grid2 img{
      width:100% !important;
    }

    .grid2 p{
      text-align: center;
      padding:20px;
    }

    .flex{
      display: flex;
      gap: 10px;
      justify-content: space-between;
    }

    .flex>div + .flex>div {
        border-left: solid 1px black;
    }

    .floatL{
      float:left;
    }

    .floatR{
      float:right;
    }

    div.flex div:not(:last-child) {
      border-right: solid 1px;
    }
/******  GRID/FLEX STYLES END  ******/


/*TODO vérifier si cette partie peut-être envelé. De ici …*/
.exercicesBox {
  background: #FF573388;
  box-shadow: 0px 0px 2px 1px;
}

.expBox {
  background: #DAF7A6;
  box-shadow: 0px 0px 2px 1px;
}

.noteBox {
  background: #f7c395b5;
  box-shadow: 0px 0px 2px 1px;
}

.videoBox {
  background: #438bfb7a;
  box-shadow: 0px 0px 2px 1px black;
}
/*… à là*/

/*Details pour exercices corrigés*/
details {
  background-color: #eee;
  padding: 0px;
  cursor: pointer;
  margin: 5px;
}

details:hover{
  background: #ccc;
}

details[open] summary {
  background: #444;
  color: white;
}

details[open] {
  border: solid thick;
}

/*MISE EN FORME*/
body {
  font-family: 'P052',Palatino, Palatino Linotype, Palatino LT STD, Book Antiqua, Georgia, serif;
  /*font-family: "Open Sans", "Segoe UI", Tahoma, sans-serif;*/
  caret-color: transparent;
  color: #353535;
  margin:5px;
  width: calc(100% - 10px);
}

dt {
  text-decoration: underline #F2453F;
}

a {
  text-decoration: none;
  cursor:pointer;
}

a:hover {
  text-decoration: underline;
}

a:link,a:visited {
  color: #06c;
}

footer {
  font-size: x-small;
  text-align: right;
  margin-right: 0;
}

img:not(.noRedim) {
  max-width: 100%;
}

img:not(.tipIcon):not(.lightBoxImage),table.mémo {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 5px;
  max-width: calc(100% - 12px);
}

.noBorders td {
  border: none;
}

.noBorders {
  border: none;
}

.borders{
  border:solid thin #444 !important;
  padding:20px !important ;
}

table.noBorders td {
  border:none;
  vertical-align: top;
}

ol > li::marker {
  font-weight: bold;
}

p.manyEx::before{
  content:'+ exercices ';
}
p.oneEx::before{
  content:'+ exercice ';
}

td.memo-numbering{display: none;}

@media only screen and (min-width : 1224px) {/* Styles pour ordi */

  td.memo-numbering{display: block;}

  img:not(.tipIcon):not(.lightBoxImage):not(.noRedim) {
    width: 20vw;
    max-width: 100%;
  }

  body {
    width: calc(100% - 40px);
    padding: 20px;
  }

}

@media only screen and (max-width : 1224px) {/* Styles pour smartphone */

    body {
    width: calc(100% - 4px);
    padding: 2px;
  }

  div#toc{width:calc( 100% - 12px);}
  .mémo ul{padding-left: 5px;}
}

.details img:not(.tipIcon):not(.lightBoxImage):not(.noRedim){
  width:80%;
}

.w100 {
  width: 100% !important;
}

.w90 {
  width: 90% !important;
}

.w80 {
  width: 80% !important;
}

.w70 {
  width: 70% !important;
}

.w60 {
  width: 60% !important;
}

.w50 {
  width: 50% !important;
}

.w40 {
  width: 40% !important;
}

.w30 {
  width: 30% !important;
}

.w20 {
  width: 20% !important;
}

.details {
  background-color: #555;
  color: #EEE;
  padding: 10px;
  box-shadow: -5px 0 #555, 20px 0 #555;
  width: 100%;
}

.mem {
  background-color: #555b;
  color: #EEE;
  padding: 15px 15px 5px 0px;
  border-radius: 25px;
}

.questionMark {
  padding: 0px 1ch;
  border: solid 8px #3caea3;
  margin: 1ch 1ch 1ch 0;
  border-radius: 2ch;
  font-weight: bold;
  position: relative;
}

a#qM {
  text-decoration: none;
  color: #EEE;
}

a#qM:hover {
  filter: drop-shadow(3px 3px 2px black);
}

strong {
  text-decoration: underline solid red 2px;
}

h2,
h3,
h4 {
  color: var(--rouge);
  font-variant: small-caps;
  text-decoration: underline 1px;
  font-weight: normal;
}

h1 {
  color: var(--rouge);
  border-bottom: solid 1px var(--rouge);
  font-size: 1.953em;
  line-height: 1;
}

.r {
  color: var(--rouge);
  font-weight: bold;
}

.encR {
  border: solid 3px var(--rouge) !important;
  background: #eee;
  padding: 0px 20px;
  color: #353535;
  margin: 10px auto;
  width:fit-content;
}

span.encR{
  display: inline-block;
  padding: 5px 20px;
}

.encN{
  border: solid 3px #333 !important;
  background: #eee;
  padding: 0px 20px;
  color: #353535;
  width: fit-content;
  margin: 10px auto;
}

.encN>p{
  margin:0;
  margin-left: -15px;
}

.u{
  text-decoration: underline;
}

.l{
  text-align: left;
}

.c {
  text-align: center;
}

.g{
  color:#999;
}

.edit {
  caret-color: var(--bleu);
  border: 2px dashed var(--bleu);
  padding-left: 3px;
  margin-top: 5px;
}

.edit:focus{
  box-shadow:0px 0px 8px 5px var(--bleu);
}

.v{
  color:forestgreen;
  font-weight: bold;
}

.details .v{
  color:#89f589;
}

svg #grille:hover{
	display:none;	
}

.whiteBG {
  background: white;
}

.b {
  font-weight: bold;
}

table {
  border-collapse: collapse;
  width: 100%;
}

td,
th {
  border: 1px solid #aaa;
  padding: 8px;
}

div:not(.details) tr:nth-child(even) {
  background-color: #f2f2f2;
}

th {
  padding-top: 12px;
  padding-bottom: 12px;
}

/*.encR math:not([display=inline]) {
  font-size: xxx-large;
}*/

.printOnly{
  background-color: #eee;
}

.printOnly *{
  visibility: hidden;
}

/*style for dashed frame to indicate hidden element*/
span.hideBox {
  border: dashed 1px gray;
  cursor:pointer;
  transition: all .3s;
  /*vertical-align: top; sinon pb au niveau des listes dont les items sont masqués non en fait c'est galère, pour les bullets normale ça les décale*/
}

span.hideBox.hidden {
  border-color: transparent;
  background: none;
}

.hide {
  opacity: 0;
}

.h {
  transition: opacity .3s;
}

table.acad td, table.acad th {
  border:none;
  border-top : solid 1px;
  border-bottom: solid 1px;
  text-align: left;
}


table.acad tr:first-of-type td{
  font-weight: bold;
}

table.mémo td {
  padding: 20px;
  border: solid 2px black;
}

table.mémo td:first-of-type {
  border: none;
  font-weight: bold;
  text-align: center;
  width: 1%;
  padding: 0 5px 0 0;
}

table.mémo {
  width: max-content;
  max-width: min(1200px, 100%);
}

table.mémo th {
  padding: 0;
  background-color: revert;
  color: #353535;
  border: none;
}

table.mémo a {
  color: inherit;
  text-decoration: inherit;
}

table.eqTable td{
  border:none;
}

table.eqTable td:last-of-type{
  border-left: solid 1px;
  padding-left: 25px;
}

.timer {
  position: fixed;
  top: 0;
  right: 0;
  background: black;
  border-top: 6px solid green;
  opacity: 0.6;
  padding: 15px;
  line-height: 1;
  font-size: 3em;
  user-select: none;
  color: gray;
}

.timer.reverse {
  border-top-color: blue;
}

.timer.fini {
  transition: all .5s;
  border-color: black;
  background: red;
  box-shadow: 0 0 0 0 rgba(232, 76, 61, 1);
  animation: pulse 1.25s infinite cubic-bezier(0.66, 0, 0, 1);
  right: 50%;
  top: 50%;
  transform: translate(50%, -50%);
}

.timer.running {
  color: white;
}

.timer.set {
  animation: blink 1s infinite;
}

/*RandomNamePicker*/
button:not([disabled]) {
  background: #f9c412;
  color: #181818
}

#topDiv {
  background: #181818bb;
  color: #eee;
  display: flex;
  left: 0px;
}

button {
  cursor:pointer;
  display: inline-block;
  padding: .5em 1.5em;
  text-align: center;
  margin: 5px;
  border-radius: .3em;
  max-width: 100%;
  overflow: visible;
  font-size: 20px;
  border: none;
  opacity: .8;
  transition: all .2s
}

button[disabled] {
  background: #e6e6e6;
  color: #404040;
  cursor: not-allowed
}

#namesInput {
  border: solid 1px gray;
  border-radius: 5px;
  padding: 5px;
  margin: 5px;
  flex: 2 1 auto;
  font-size: xx-small;
}

#namesInput:empty:before {
  content: attr(data-placeholder);
  color: #444;
}

#container {
  margin: auto
}

#nameDisplay {
  align-self: center;
  flex-grow: 1;
  text-align: center;
}

button#pick {
  background: #4caf50;
  color: #fff;
  display: none;
}

button#kick {
  background: #aa624c;
  color: #fff;
  display: none;
}

button#kickPick {
  background: #6786e1;
  color: #fff;
  display: none;
}

button:hover {
  box-shadow: 0 0 0 2px #fff;
  opacity: 1
}

#controls {
  display: flex;
  height: fit-content;
}

@keyframes blink {
  50% {
    border-color: #fff;
  }
}

@keyframes pulse {
  to {
    box-shadow: 0 0 0 600px rgba(232, 76, 61, 0);
  }
}

.timer p {
  margin: 0;
}

@media print {
  body.eleve {
    font-size: 12pt !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px;
  }


  /*body.eleve .exercices,*/
  body.eleve .exp,
  body.eleve .note,
  body.eleve .illustration,
  body.eleve .infos,
  body.eleve footer,
  body.eleve .mémo,
  body.eleve .act,
  body.eleve .mem {
    display: none;
  }

  table {
    max-width: 98%;
  }

  body.eleve td,
  body.eleve th {
    border: solid 2px gray;
  }

  body.eleve h1 {
    border: none;
    padding-top: 0;
    margin-top: 0;
  }

  .h {
    opacity: 1;
  }

  .hideBox {
    border: none !important;
  }

  body.eleve h1,
  body.eleve h2,
  body.eleve h3,
  body.eleve h4 {
    color: black;
  }
}
