/* ================================
   Variables et Thèmes
================================ */
:root {
  --primary-bg: #f9f9f9;
  --primary-text: #333;
  --header-bg: rgba(255, 255, 255, 0.95);
  --footer-bg: rgba(255, 255, 255, 0.95);
  --card-bg: rgba(255, 255, 255, 0.8);
  --input-bg: rgba(255, 255, 255, 0.9);
  --border-color: #ccc;
  --button-bg: #000a28;
  --button-hover-bg: #051b4a;
  --link-color: #0b215b;
  --primary-bg-transparent: rgba(214, 214, 214, 0.6);
  --bg-translucide:rgba(213, 213, 213, 0.76);
  --green:#66d62598;
  --blue:#265abbad;
  --blue2:#265abb2f;
  --grey:#cccccc91;
  --text-c:rgb(238, 238, 238);
}

body.dark-theme {
  --primary-bg: #000;
  --primary-text: #eee;
  --header-bg: rgba(31, 31, 31, 0.92);
  --footer-bg: rgba(27, 27, 27, 0.9);
  --card-bg: rgba(28, 28, 28, 0.8);
  --input-bg: rgba(38, 38, 38, 0.85);
  --border-color: #4c4b4b;
  --button-hover-bg: #000a28;
  --button-bg: #051b4a;
  --link-color: #0e38ac;
  --primary-bg-transparent: rgba(0, 0, 0, 0.72);
  --bg-translucide:rgba(0, 0, 0, 0.76);
  --green:#254b0f98;
  --blue:#182f5a3f;
  --blue2:#265abb2f;
  --grey:#0303039d;
  --text-c:rgb(238, 238, 238);
}

/* ================================
   Réinitialisation et Base
================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html{
  background: var(--primary-bg);
  background-color: var(--primary-bg);
}

body {
  font-family: 'Roboto', sans-serif;
  background: var(--primary-bg);
  background-color: var(--primary-bg);
  color: var(--primary-text);
  min-height: 100vh;
  position: relative;
  padding-bottom: 60px; /* espace pour le footer fixe */
}

/* ================================
   Header
================================ */
header {
  background: var(--header-bg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-img {
  width: 60px;
  object-fit: contain;
  margin-right: 12px;
  margin-left:12px;
  border-radius: 5px;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary-text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
}

nav ul li a {
  text-decoration: none;
  font-size: 16px;
  color: var(--primary-text);
}

nav ul li a.active {
  color: var(--link-color);
  font-weight: bold;
}




/* Styles de base pour le header */
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.nav-menu {
  text-align: center;
  display: flex;
  justify-content: space-between;
  margin:auto;
}

/* Navigation */
nav.nav-menu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav.nav-menu ul li {
  margin: 0 15px;
}

/* Contrôles affichés en ligne sur desktop */
.controls {
  display: flex;
  align-items: center;
}

/* Conteneur regroupant navigation et contrôles */
.menu-dropdown {
  display: flex;
  align-items: center;
  width:100%;
}

/* Bouton de toggle masqué par défaut sur desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
}
.themeimg {
  width:40px;
}
/* Styles pour mobiles */
@media (max-width: 1000px) {
  /* Afficher le bouton de dropdown */
  .menu-toggle {
    display: block;
  }
  .themeimg {
    width:20px;
  }
  /* Masquer par défaut le dropdown */
  .menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: var(--primary-bg);
    border: 1px solid #ccc;
    padding: 10px;
    width: 140px;
    flex-direction: column;
    z-index: 1000;
  }
  /* Afficher le dropdown quand il a la classe active */
  .menu-dropdown.active {
    display: flex;
  }
  .nav-menu{
    text-align:center;
    margin-top:30px;
    margin-bottom: 30px;
  }
  /* Navigation en colonne */
  nav.nav-menu ul {
    flex-direction: column;
    width: 100%;
  }
  nav.nav-menu ul li {
    margin: -5px 0;
  }

  /* Contrôles en colonne */
  .controls {
    width: 100%;
    flex-direction: column;
  }
 
}
.menu-toggle {
  position: relative;
  width: 30px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  /* Assurez-vous que le bouton reste au-dessus du menu */
  z-index: 1100;
}

.menu-toggle .bar {
  display: block;
  width: 100%;
  height: 4px;
  background: #333;
  margin: 6px auto;
  transition: all 0.3s ease;
}

/* Quand le menu est actif, les barres se déplacent et disparaissent */
.menu-toggle.active .bar {
  transform: translateX(30px);
  opacity: 0;
}

/* Pseudo-éléments qui vont dessiner le X */
.menu-toggle::before,
.menu-toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 25px;
  height: 4px;
  background: #333;
  border-radius: 2px;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s ease;
}

.menu-toggle.active::before {
  transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.menu-toggle.active::after {
  transform: translate(-50%, -50%) rotate(-45deg) scale(1);
}











/* Contrôles (langue et mode) */
.controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
#fromNetwork {
  padding: 6px 0px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
  background: var(--input-bg);
  color: var(--primary-text);
  width:50%;
  height:54px;
  text-align: center;
}
#toNetwork {
  padding: 6px 0px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
  background: var(--input-bg);
  color: var(--primary-text);
  width:50%;
  height:54px;
  text-align: center;
}
#language-selector {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--primary-text);
}
#currency-selector {
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--primary-text);
}

#theme-toggle {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}


/* ================================
   Conteneurs Principaux
================================ */
main{
  z-index:1;
  position:relative;
}

#confirmDiv {
  z-index: 2;
  position: absolute;
  margin: auto;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  padding-top:200px;
  background: var(--bg-translucide);
}

.container-glass {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 10px;
  padding: 20px;
  margin: auto auto;
  margin-top:100px;
  max-width: 800px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}


/* ================================
   Sections (Hero, About, Contact)
================================ */
.hero {
  text-align: center;
  padding: 60px 20px;
  margin-top:10%;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 40px;
}

.btn {
  background: var(--button-bg);
  color: #fff;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 50px;
  transition: background 0.3s, transform 0.3s;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--button-hover-bg);
  transform: scale(1.05);
}

/* ================================
   Carte Swap
================================ */
.swap-card {
  max-width: 530px;
  margin: 50px auto;
  margin-top:50px;
  padding: 30px 25px;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  color: var(--primary-text);
}

.swap-card h1 {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
}

.swap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.swap-row2 {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.swap-input {
  flex: 1;
  padding: 22px 16px;
  padding-left:70px;
  font-size: 18px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--primary-text);
  text-align: right;
  transition: border-color 0.3s;
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
  width:110px;
}
.swap-input:focus {
  outline: none;
  border-color: var(--link-color);
}

.address-input {
  flex: 1;
  padding: 30px 16px;
  padding-right: 50px;
  padding-left: 84px;
  font-size: 12px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--primary-text);
  text-align: right;
  transition: border-color 0.3s;
}
.address-input:focus {
  outline: none;
  border-color: var(--link-color);
}
.address-img{
  position:absolute;
  right:39px;
  width:20px;
}

.swap-label {
  font-weight: 500;
  font-size: 13px;
  margin-left: 18px;
  position: absolute;
  width: 52px;
  color:grey;
}

/* Crypto Selector */
.crypto-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  border: solid 0.1pt var(--border-color);
  border-radius: 10px;
  padding: 10px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  height:67px;
}
.crypto-selector2 {
  display: flex;
  align-items: center;
  gap: 8px;
  border: solid 0.1pt var(--border-color);
  border-radius: 10px;
  padding: 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  width:40%;
}



.crypto-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 50%;
}

.crypto-info-selected {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.network-badge {
  background: rgba(0,0,0,0.05);
  color: var(--primary-text);
  padding: 4px 6px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 2px;
  width:100px;
}

.select-btn {
  font-size: 12px;
  background: rgba(0,0,0,0.05);
  color: var(--primary-text);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.select-btn:hover {
  background: rgba(0,0,0,0.1);
}

.rate-row label {
  margin-right: 10px;
  font-weight: 500;
  font-size: 15px;
}

.swap-rate-type {
  background: rgba(0,0,0,0.05);
  color: var(--primary-text);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.cashback-row {
  justify-content: center;
  margin-bottom: 20px;
}

.cashback-link {
  font-size: 14px;
  color: var(--link-color);
  text-decoration: none;
  text-align: center;
}

.cashback-link:hover {
  text-decoration: underline;
}

.swap-button {
  width: 100%;
  padding: 14px 0;
  font-size: 16px;
  font-weight: bold;
  background: var(--button-bg);
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.swap-button:hover {
  background: var(--button-hover-bg);
  transform: scale(1.02);
}

/* ================================
   Formulaires (Contact)
================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--primary-text);
  transition: border 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--link-color);
}

/* ================================
   Overlays (sélection crypto)
================================ */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-bg-transparent);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.overlay.active {
  display: flex;
}

.overlay-content {
  background: var(--card-bg);
  color: var(--primary-text);
  padding: 30px;
  border-radius: 16px;
  max-width: 600px;
  width: 90%;
  position: relative;
}

.overlay-content h2 {
  margin-bottom: 20px;
  text-align: center;
}

.search-input {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--primary-text);
  background: var(--primary-bg-transparent);
}

.crypto-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.crypto-card {
  background: var(--primary-bg-transparent);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  width: calc(50% - 10px);
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s;
}

.crypto-card:hover {
  background: var(--primary-bg);
}

.crypto-card img {
  width: 32px;
  height: 32px;
  margin-right: 10px;
  border-radius: 50%;
  object-fit: contain;
}

.crypto-info h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.crypto-info p {
  font-size: 12px;
  color: #555;
  margin-bottom: 2px;
}

.close-overlay {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
}

/* ================================
   Footer (fixé en bas)
================================ */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--footer-bg);
  color: var(--primary-text);
  text-align: center;
  padding: 10px 0;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index:1000;
}

/* ================================
   Bootloader
================================ */
.divloader{
  height: 100%;
  width: 100%;
  position:fixed;
  top:0;
  left:0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000000f0;
  margin: 0;
  z-index: 100000;
}
.loader {
  position: relative;
  width: 80px;
  height: 80px;
}    .hex-loader {
  width: 120px;
  height: 120px;
}
.hex-loader svg {
  width: 100%;
  height: 100%;
}
.hex1 {
  fill: none;
  stroke: #7384cf;
  stroke-width: 5;
  animation: dash 1.5s ease-in-out infinite;
}
.hex2 {
  fill: none;
  stroke: #193f92;
  stroke-width: 5;
  animation: dash 15s ease-in-out infinite;
}

@keyframes dash {
  0% {
    stroke-dasharray: 10, 20;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 10, 20;
    stroke-dashoffset: -100;
  }
  100% {
    stroke-dasharray: 10, 20;
    stroke-dashoffset: 0;
  }
}

.qr-code-container {
  width: 128px;
  height: 128px;
  background: #fff;
  border-radius: 8px;
  border:solid rgb(182, 182, 182) 0.1pt;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-row {
  display: flex;
  margin-bottom: 45px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 50px;
  margin-top: 60px;
}
.rec-input {
  flex: 1;
  padding: 22px 16px;
  padding-left: 100px;
  font-size: 18px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--primary-text);
  text-align: right;
  transition: border-color 0.3s;
  width: 110px;
  margin-top: 30px;
}
.rec-label {
  font-weight: 500;
  font-size: 13px;
  margin-left: 18px;
  position: absolute;
  width: 100px;
  color: grey;
  margin-top: 30px;
}
.deposit-amount {
  margin-top: 36px;
  position: absolute;
  right: 30px;
}
.arrow {
  fill: #7384cf;
}

.imgC{
  
  display:flex;
  width: 50px;
  margin:auto;
  margin-bottom:10px;
  padding:5px;
}
.tC{
  color:var(--primary-text);
  text-align: center;
  font-size:13px;
}
.divC{
  
  padding:5px;
  background:var(--grey);
  border-radius: 10px;
  width:22%;
}
.divB{
  background: var(--blue);
  animation: bluT 1s ease-in-out infinite;
}
.divA{
  background:var(--green);
}

@keyframes bluT {
0% {
background: var(--blue);
}
50% {
background: var(--blueT);
}
100% {
background: var(--blue);
}
}