.exchange-box{
  width:100%;
  background:#f5f6f8;
  padding:20px;
  border-radius:10px;
  font-family:Arial, Helvetica, sans-serif;
  box-shadow: -1px -3px 14px rgba(0,0,0,.4);
}

/* Montant */

.top-row{
  display:flex;
  margin-bottom:20px;
}

.btn-title{
  background:#26337a;
  color:white;
  border:none;
  padding:14px 35px;
  border-radius:12px 0 0 12px;
  font-size:16px;
  height: 50px;
}

#amount{
  flex:1;
  height:50px;
  border:1px solid #dcdcdc;
  border-left:none;
  border-radius:0 12px 12px 0;
  font-size:18px;
  text-align:center;
  background:white;
}

/* ligne devises */

.currency-row{
  display:flex;
  align-items:center;
  gap:20px;
  width:100%;
}

/* selects */

.currency-row select{
  height:50px;
  min-width:200px;
  border-radius:12px;
  border:1px solid #cfcfcf;
  padding-left:15px;
  font-size:16px;
  background:white;
}
.currency-row select,
.currency-row .switch,
.currency-row #convert{
  flex:1;
}
/* switch */

.switch{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  font-size:14px;
  color:#666;
}

.toggle{
  position:relative;
  display:inline-block;
  width:46px;
  height:24px;
}

.toggle input{
  display:none;
}

.slider{
  position:absolute;
  cursor:pointer;
  background:#d5d5d5;
  border-radius:30px;
  top:0;
  left:0;
  right:0;
  bottom:0;
}

.slider:before{
  position:absolute;
  content:"";
  height:18px;
  width:18px;
  left:3px;
  bottom:3px;
  background:#1d86c8;
  border-radius:50%;
  transition:0.3s;
}

.toggle input:checked + .slider:before{
  transform:translateX(20px);
}

/* bouton */

#convert{
  height:50px;
  padding:0 30px;
  border:none;
  border-radius:12px;
  background:#FC9E01;
  color:white;
  font-size:16px;
  cursor:pointer;
}

#convert:hover{
  opacity:0.9;
}

/* tableau */

.currency-table{
  width:100%;
  margin-top:30px;
  border-collapse:collapse;
  background:white;
  border-radius:10px;
  overflow:hidden;
}

.currency-table thead{
  background:#26337a;
  color:white;
}

.currency-table th{
  padding:14px;
  text-align:left;
  font-weight:500;
}

.currency-table td{
  padding:12px;
  border-bottom:1px solid #eee;
}

.currency-table tr:hover{
  background:#f8f9fb;
}
/* SECTION GRAPHIQUE (comme dans l'image) */

.exchange-chart{
  background:#FFF;
  margin-top:40px;
  border-radius:6px;
  color:#000;
}

/* TITRE DU GRAPHIQUE */

.exchange-chart h2{
  text-align:center;
  font-size:22px;
  font-weight:600;
  margin-bottom:25px;
}

/* BOUTONS PERIODE */

.chart-periods{
  text-align:center;
  margin-bottom:25px;
}

.chart-periods button{
  background:transparent;
  border:none;
  color:#999;
  font-size:14px;
  font-weight:600;
  margin:0 6px;
  cursor:pointer;
  padding:6px 12px;
  transition:0.2s;
}

.chart-periods button:hover{
  color:#fff;
}

/* BOUTON ACTIF (orange comme image) */

.chart-periods button.active{
  background:#f59e0b;
  color:#fff;
  border-radius:20px;
}

/* ZONE DU GRAPH */

#exchange-chart-container{
  width:100%;
  height:420px;
}

/* MINI GRAPH EN BAS */

#exchange-chart-mini{
  margin-top:20px;
  height:120px;
}
@media (max-width: 992px){
  .currency-row{
    grid-template-columns: 1fr 1fr;
    flex-wrap: wrap;
  }
}
@media (max-width:600px){

  .exchange-box{
    padding:15px;
  }

  /* Montant */

  .top-row{
    flex-direction:column;
  }

  .btn-title{
    width:100%;
    border-radius:12px 12px 0 0;
    text-align:center;
  }

  #amount{
    border-radius:0 0 12px 12px;
    width:100%;
  }

  /* Currency row */

  .currency-row{
    grid-template-columns:1fr;
    gap:15px;
  }

  /* Table scroll */

  .currency-table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
  }

}
