/* FONTES */
@font-face {
    font-family:"BBBBaskervvol-Fondue";
    src: url('fontes/baskervvol/BBBBaskervvol-Fondue.ttf');
  }
  
  
  @font-face {
    font-family:"Venus+Acier";
    src: url('fontes/otf/Venus%2bAcier.otf');
  }
  
  /* VARIABLES */
  :root {
    --main-color: red;
    --font-title: "Venus+Acier";
    --font-texte-courant: "BBBBaskervvol-Fondue";
    --col-min: 7%;
    --col-max: 86%;
    --row-min: 14%;
    --row-max: 86%;
    --section-h: 5dvh;
  }
  
  /* GENERAL */
  body, html, main {
    height: 100vh;
    margin: 0;
    padding:0;
  }
  
  h1,
  h2,
  h3,
  h4,
  p, 
  ul{
    font-weight: normal;
    margin: 0;
  }
  
  ul li {
    list-style-type: none;
  }
  
  a{
    text-decoration: none;
    color: black;
  }
  
  input:focus{
    outline: none;
  }
  
  *:focus {
    outline: none;
  }
  
  .thinsp {
    letter-spacing: -0.165em;
  }
  
  /* HEADER */
  header {
    height: 5vh;
  }
  
  header ul{
    display: flex;
    height: 100%;
    margin: 0;
    padding: 0;
    align-items: baseline;
  }
  
  header ul li{
    list-style-type: none;
    padding: 0;
    font-family: var(--font-title);
    font-size: 2rem;
    line-height: 1.75;
    text-transform: uppercase;
    color: var(--main-color);
  }
  
  header ul li:before{
    content: '';
  }
  
  header ul li#logo {
    height: 80%;
    margin-top: .25;
    text-align: center;
    align-self: center;
  }
  
  header img {
    max-width: 100%;
    max-height: 100%;
  }
  
  header nav {
    position: fixed;
    right: 0;
    top: 0;
    padding-right: .25em;
  }
  
  header ul li {
    padding-left: .25em;
  }
  
  header nav ul li.active a,
  header nav ul li:hover a{
    color: var(--main-color);
  }
  
  /* CONSTRUCTION */
  main {
    height: 95vh;
    display: grid;
    grid-template-columns: var(--col-min) var(--col-max) var(--col-min);
    grid-template-rows: var(--row-max) var(--row-min);
  }
  
  section {
    box-sizing: border-box;
    border: 1px solid var(--main-color);
    overflow-y: hidden;
    overflow-x: hidden;
    padding-left: .75em;
    position: relative;
    margin-top: -1px;
    margin-left: -1px;
  }
  
  section:hover:not(.feuillet) {
    color: var(--main-color);
    cursor: nesw-resize;
  }
  
  section > *:not(.feuillet label){
    width: 60vw;
  }
  
  section h1 {
    margin: 0;
  }
  
  section.clicked:hover {
    color: black;
  }
  
  section.clicked {
    overflow-y: auto;
  }
  
  section.clicked:hover {
    cursor:default;
  }
  
  /* TYPO */
  section h1{
    font-size: 6rem;
    text-transform: uppercase;
    font-family: var(--font-title);
    margin: 0;
  }
  
  section h1.hidden {
    display: none;
  }
  
  section:hover h1.hidden {
    display: block;
    position: fixed;
    top: 0;
    right: 10vw;
    text-align: right;
  }
  
  section.clicked:hover h1.hidden {
    display: none;
  }
  
  article{
    /* padding-left: 1rem; */
    padding-bottom: 2rem;
  }
  
  article ul li {
    list-style-position: outside;
    margin-right: .25em;
  }
  
  article ul li::marker {
    content: "◇ ";
  }
  
  article a {
    color: black;
    text-decoration: underline 1px var(--main-color);
    -webkit-text-decoration: underline 1px var(--main-color);
    text-underline-offset: 3px;
    -webkit-text-decoration-line:  underline !important;
    -webkit-text-decoration-color: var(--main-color) !important;
    -webkit-text-decoration-style: solid !important;
    -webkit-text-decoration-thickness: 3px !important;
  }
  
  article a:hover {
    color: var(--main-color);
  
  }
  
  article h2,
  .feuillet label{
    font-size: 1.5rem;
    font-family: var(--font-title);
    text-transform: uppercase;
  }
  
  article h3{
    font-family: var(--font-title);
    margin-top: 1em;
  }
  
  article p, 
  article li{
    font-size: 1.5rem;
    font-family: var(--font-texte-courant);
    font-variation-settings: "wght" 400;
    line-height: 1.15;
  }
  
  article > p,
  article > h2,
  article > h3  {
      text-indent: 1.5rem;
  }
  
  article h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    letter-spacing: .02em;
  }
  
  article > p:nth-of-type(1),
  article > h2 + p,
  article > h3 + p {
    text-indent: 0;
  }
  
  article code {
    border-radius: 4px;
    padding: 0 .25em;
    background: rgb(255 0 0 / 10%);
    font-weight: normal;
  }
  
  article code:hover {
    background: rgb(255 0 0 / 25%);
  }
  
  section#calculateur  {
    background-color: rgb(255 0 0 / 10%);
  }
  
  code{
    font-family: var(--font-texte-courant);
  }

  strong{
    font-weight: bold;
  }
  
  article ins {
    display: none;
    position: absolute;
    border: 1px solid;
    border-radius: .5em;
    font-size: 1rem;
    padding: .5em .75em;
    z-index: 1;
    text-decoration: none;
    background-color: white;
    max-width: 300px;
    text-indent: 0;
    line-height: 1em;
    text-transform: none;
    letter-spacing: 0;
  }
  
  article code:hover + ins {
    display: initial;
  }
  
  article img {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  /* Feuillets */
  .container {
    display: flex;
    flex-wrap: wrap;
  }
  
  .container > input,
  .container > input ~ div {
    display: none;
  }
  
  .feuillet{
    display: none;
    border:0;
    padding: 0;
    margin-top: 0;
    margin-left: 0;
  }
  
  section.clicked[data-column="1"] > section.feuillet{
    right: calc(2*(var(--col-min)));
  }
  
  section.clicked[data-column="2"] > section.feuillet{
    right: var(--col-min);
  }
  
  section.clicked[data-column="3"] > section.feuillet{
    right: 0;
  }
  
  section.clicked[data-row="1"] > section.feuillet{
    bottom: calc(var(--row-min) - 0.7%);
  }
  
  section.clicked[data-row="2"] > section.feuillet{
    bottom: 0;
  }
  
  section.clicked > section.feuillet{
    display: flex;
    position: fixed;
    justify-content: end;
  }
  
  .container > input:checked + div.feuille{
    display: block;
  }
  
  .feuillet label{
    box-sizing: border-box;
    border: 1px solid var(--main-color);
    padding: 0.25em;
    padding-bottom: 0;
    background: white;
    margin-left: -1px;
  }
  
  .feuillet label:hover{
    background: var(--main-color);
    color: white;
    cursor: pointer;
  }
  
  input[data-id="1"]:checked ~ .feuillet label[data-id="1"] {
    background: var(--main-color);
    color: white;
  }
  
  input[data-id="2"]:checked ~ .feuillet label[data-id="2"] {
    background: var(--main-color);
    color: white;
  }
  
  input[data-id="3"]:checked ~ .feuillet label[data-id="3"] {
    background: var(--main-color);
    color: white;
  }
  
  input[data-id="4"]:checked ~ .feuillet label[data-id="4"] {
    background: var(--main-color);
    color: white;
  }
  
  input[data-id="5"]:checked ~ .feuillet label[data-id="5"] {
    background: var(--main-color);
    color: white;
  }
  
  /* Calculator */
  
  section#calculateur .calculator .part {
    margin: 2em 0;
  }

  section#calculateur article {
    padding-bottom: 0;
  }
  
  section#calculateur h3 {
    display: flex;
  }
  
  section#calculateur h3 .infos .question-mark{
    align-self: baseline;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  section#calculateur .calculator ul li {
    display: flex;
    border-bottom: 1px solid lightgray;
    text-transform: lowercase;
    padding: 0.16em 0;
  }
  
  section#calculateur .calculator ul li::before {
    content: "◇ ";
    margin-right: .25em;
  }
  
  section#calculateur .calculator ul li label {
    width: 50%;
  }
  
  section#calculateur .calculator ul li input {
    width: 25%;
    font-family: 'venus+acier';
    font-size: 1rem;
    border: none;
  }
  
  section#calculateur .calculator ul li input:focus {
    outline: 1px solid;
  }
  
  section#calculateur .calculator ul li input.alert {
    border-color: var(--main-color);
    color: var(--main-color);
  }
  
  section#calculateur .calculator ul li .alert {
    margin-left: .25em;
  }
  
  section#calculateur .calculator .label-autre {
    margin-left:2%;
    width:50%;
    font-size: 1rem;
    margin-bottom: 5px;
  }
  section#calculateur .calculator .infos {
    position: relative;
    display: flex;
    align-items: center;
    font-family: var(--font-texte-courant);
    hyphens: auto;
  }
  
  section#calculateur .calculator .infos .text {
    display: none;
    position: absolute;
    border: 1px solid;
    border-radius: .5em;
    font-size: 1rem;
    padding: .5em .75em;
    z-index: 1;
    background-color: white;
    width: 300px;
    left: 2.5em;
    text-indent: 0;
    line-height: 1em;
    text-transform: none;
    letter-spacing: 0;
    text-decoration: none;
  }
  
  section#calculateur .calculator .infos .question-mark {
    border: 1px solid;
    text-align: center;
    width: 1.5em;
    height: 1.5em;
    font-size: 1rem;
    border-radius: 50%;
    margin-left: .5em;
    text-transform: lowercase;
    display: flex;
    align-items: end;
    justify-content: center;
  }
  
  section#calculateur .calculator .infos .question-mark:hover {
    background-color: var(--main-color);
    color: white;
  }
  
  section#calculateur .calculator .infos .question-mark:hover + .text {
    display: block;
  
  }
  
  section#calculateur .calculator ul li input.alert ~ span.alert:after {
    content: attr(data-value);
    position: absolute;
    color: var(--main-color);
    font-size: .5em;
  }
  
  section#calculateur .calculator .prix-jours {
    display: inline;
    padding-left: .5em;
    font-family: 'venus+acier';
  }
  
  section#calculateur .calculator .total p:not(.alert) {
    padding-left: .25em;
    display: flex;
    justify-content: end;
  }
  
  section#calculateur .total {
    margin-top: .5em;
    text-align: right;
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
  }
  
  section#calculateur p.alert {
    display: none;
    color: var(--main-color);
    font-size: 1em;
    width: 100%;
    margin-top: 0.25em;
  }
  
  section#calculateur p.alert.visible {
    display: block;
  }
  
  section#calculateur .calculator .total p:not(.alert) > span {
    padding: 0.25em .5em 0 .5em;
    /* padding: 1em 1.5em 0 1.5em; */
    border: 1px solid var(--main-color);
  }
  
  section#calculateur .total span.total-jours {
    border-left: 1px solid var(--main-color);
    margin-left: -1px;
    font-family: 'venus+acier';
  }
  
  section#calculateur .total span.price {
    background-color: var(--main-color);
    color: white;
    padding: 0 .5em;
    font-family: 'venus+acier';
  }
  
  section#calculateur #total {
    display: none;
  }
  
  section#calculateur #total span:nth-child(1){
    padding-right: .25em;
  }
  
  section#calculateur.clicked #total {
    font-family: 'venus+acier';
    display: flex;
    border-right: 1px solid var(--main-color);
    border-top: 1px solid var(--main-color);
    position: fixed;
    left: var(--col-min);
    border-bottom: 0;
    background-color: white;
    margin-top: 0;
  }
  
  section#calculateur.clicked #total span {
    padding: 0.25em;
    padding-bottom: 0;
  }
  
  section#calculateur[data-row="1"].clicked #total {
    bottom: calc(1*var(--row-min) - 0.7%);
  }
  
  section#calculateur[data-row="2"].clicked #total {
    bottom: 0%;
  }
  
  section#calculateur .print {
    display: none;
    position: fixed;
    top: var(--col-min);
    right: var(--col-min);
    text-align: right;
    background:none;  
    width: 15vw;
    margin: 0.5em 1.5em;
  }
  
  section#calculateur.clicked .print {
    display: block;
  }
  
  section#calculateur .print button {
    cursor: pointer;
    border: solid var(--main-color) 1px;
    font-family: var(--font-texte-courant);
    background: white;  
    font-size: 1rem;
    padding: 0.25em;
    padding-bottom: 0;
    margin-bottom: .5em;
  }
  
  section#calculateur .print button:hover {
    background-color: var(--main-color);
    color: white;
  }
  
  section#calculateur .print p {
    font-size: 1rem;
  }
  
  /* RESPONSIVE */
  
  @media only screen and (max-width: 1040px) {
  
    /* General */
    body, html{
      height: 100dvh;
    }
  
    main{
      height: 95dvh;
      display: flex;
      flex-direction: column;
    }
  
    ul{
      padding-left: 0;
    }
  
    article{
      padding-bottom: 0.5rem;
    }
  
    article h3{
      margin:1.5rem;
      margin-bottom: 0;
      margin-left: 0;
    }
  
    /* Header */
    header {
      height: 5dvh;
    }
  
    header nav{
      height: 5dvh;
    }
  
    header ul{
      align-items: baseline;
    }
    
    header ul li{
      display: flex;
      align-items: center;
    }
  
    header #title{
      display: none;
    }
  
    section{
      margin: 0;
      border-bottom: none;
      border-left:none;
    }
  
    section.container{
      height: 5dvh;
    }
  
    section.container.clicked{
      height: 70dvh; 
      padding-bottom: 1.5rem;
    }
  
    section:hover h1.hidden {
      display: none;
      z-index: 10;
    }
  
    .feuillet label{
      border-bottom:0;
      border-right:0;
      border-left: 1px solid var(--main-color);
      border-top: 1px solid var(--main-color);
    }
  
    .feuillet label,
    section#calculateur.clicked #total span{
      padding: 0.15rem;
      padding-bottom: 0;
    }
    
    section.clicked[data-column] > section.feuillet{
      right: 0;
    }
  
    section.clicked[data-row="2"][data-column="2"] > section.feuillet{
      bottom: calc(var(--section-h));
    }
  
    /* section.clicked[data-row="2"][data-column="1"] > section.feuillet{
      bottom: calc(2*(var(--section-h)) + 1dvh);
    } */

    section.clicked[data-row="2"][data-column="1"] > section.feuillet{
      bottom: calc(2*(var(--section-h)));
    }
  
    section.clicked[data-row="2"][data-column="1"] > section.feuillet{
      bottom: calc(2*(var(--section-h)));
    }
  
    /* section.clicked[data-row="1"][data-column="3"] > section.feuillet{
      bottom: calc(3*(var(--section-h)) + 1dvh);
    } */

    section.clicked[data-row="1"][data-column="3"] > section.feuillet{
      bottom: calc(3*(var(--section-h)));
    }
  
    section.clicked[data-row="1"][data-column="2"] > section.feuillet,
    section#calculateur[data-row="1"].clicked #total{
      bottom: calc(4*(var(--section-h)));
      text-indent: 0;
    }
  
    section#calculateur[data-row="1"].clicked #total{
      left:0;
    }
  
    section.clicked[data-row="1"][data-column="1"] > section.feuillet{
      bottom: calc(5*(var(--section-h)));
    }
  
    section > :not(.feuillet label) {
      width: 95vw;
    }
  
    /* Calculateur */
    article code:hover + ins {
      display: block;
      max-width: 40%;
    }

    section#calculateur .calculator .infos{
      position: static;
    }
  
    section#calculateur .calculator .infos .question-mark:hover + .text {
     display: block;
     position: fixed;
     margin: 0;
     width: calc(80vw - 35em);    
     left: 0.75em;
     top: 40vh;   
     height: calc(20vh - 1em);    
     overflow-y: auto;
    }
  
    section#calculateur .calculator .part{
      margin: 0;
    }
  
    section#calculateur.clicked .print{
      position: relative;
      width: auto;
      margin: 0;
      margin-top: 0.5em;
      right: 0;
    }
  
    section#calculateur .calculator ul li input{
      width: 15%;
    }
  
    section#calculateur .calculator ul li label{
      width: 40%;
    }
  
    section#calculateur .calculator .total p:not(.alert){
      margin-top: 0.25em;
      margin-bottom:0;
    }
  
    section#calculateur .calculator .taux ul li label,
    section#calculateur .calculator .droits ul li label,
    section#calculateur .horsRenumeration ul li label{
      width: 55%;
    }
  
    section#calculateur .calculator ul li{
      align-items: baseline;
    }
  
    div.total .price{
      max-width: 100px;
      min-width: 75px;
    }
  
    section#calculateur .total{
      margin-top: 0;
    }
  
    /* Tailles typos */
    header ul li{
      font-size: 1.8rem;
    }
  
    section h1{
      font-size: 2.7rem;
    }
  
    article h2,
    .feuillet label,
    #total span{
      font-size: 1rem;
      line-height: 1.2;
      position:relative;
      bottom: 0;
    }
  
    article p, 
    article li{
      font-size: 1rem;
      line-height: 1.15;
    }
  
    article h3 {
      font-size: 1.1rem;
      line-height: 1.2;
      letter-spacing: .02em;
    }
  
    section#calculateur .calculator .infos .question-mark{
      font-size: 0.8rem;
    }
  }
  
  @media only screen and (max-width: 1000px){
    section#calculateur .calculator .infos .question-mark:hover + .text {
      width: calc(80vw - 30em);
    }
  
    article code:hover + ins {
      max-width: 50%;
    }
  }
  
  @media only screen and (max-width: 900px){
    section#calculateur .calculator .infos .question-mark:hover + .text {
      width: calc(80vw - 25em);
    }
  
    article code:hover + ins {
      max-width: 55%;
    }
  }
  
  @media only screen and (max-width: 700px){
    section#calculateur .calculator .infos .question-mark:hover + .text {
      width: calc(80vw - 20em);
    }
  
    article code:hover + ins{
      max-width: 60%;
    }
  }
  
  @media only screen and (max-width: 600px){
    section#calculateur .calculator .infos .question-mark:hover + .text {
      width: calc(80vw - 15em);
    }
  
    article code:hover + ins{
      max-width: 65%;
    }
  }
  
  @media only screen and (max-width: 500px){
    section#calculateur .calculator .infos .question-mark:hover + .text {
      width: calc(80vw - 5.5em);
    }
    article code:hover + ins {
      max-width: 70%;
    }
  }
  
  @media only screen and (max-width: 400px){
    section h1{
      font-size: 2.4rem;
    }
  }

  @media screen and (max-height: 900px){
    #title,
    #logo,
    nav ul li{
      font-size: 1.8rem;
    }
  }

  @media screen and (max-height: 800px){
    #title,
    #logo,
    nav ul li{
      font-size: 1.65rem;
    }
  }

  @media screen and (max-height: 700px){
    #title,
    #logo,
    nav ul li{
      font-size: 1.5rem;
    }
  }

  @media screen and (max-height: 630px){
    #title,
    #logo,
    nav ul li{
      font-size: 1.4rem;
    }
  }

  @media screen and (max-height: 615px){
    #title,
    #logo,
    nav ul li{
      display: none;
    }
  }