:root {
    --font-size: clamp(36px, 8vw, 120px);
    --nav-font: clamp(18px, 1.2vw, 25px);
    --bg: #0b0b0b;
    --turquoise: #42e2b2; 
    --hotpink: #2b2b2b;
    --white: #ffffff;
    --frame-thickness: clamp(6px, 0.3vw, 12px);
    --frame-gap: clamp(10px, 0.5vw, 20px);
    --radius: clamp(12px, 0.6vw, 30px);
    --button-height: clamp(35px, 2vw, 50px);
    --button-padding: clamp(10px, 1vw, 16px);
  width: clamp(800px, 52vw, 1600px);
  --keyboard-max-width: 1600px;
  --key-size: calc((var(--keyboard-width) / 15) * 1.2)
  --key-radius: 8px;
  --key-gap: 8px;
  --keyboard-bottom: 5vh;
  --key-bg: rgba(255, 255, 255, 0.92);
  --key-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  --accent: #42e2b2; /* couleur turquoise de ton thème */
  --text-color: #494949;
}

html, body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background: linear-gradient(to bottom, #000000 15%, #42e2b2 );
    background-repeat: no-repeat;
    background-size: 100% 100%;
    color: rgb(255, 255, 255);
    font-family: Poppins, sans-serif,;
    opacity: 1;
}

body { background: var(--bg); }

.bg {
  position: fixed;
  inset: 0;
  z-index:-1;
  background-size: cover;
  background-position: 50% 45%;
  background-repeat: no-repeat;
  transition: background-image 0.5s;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 96%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 2vw, 40px);
  background: transparent;
}

.logo_serv {
    margin-right: auto;
    height: clamp(80px, 6vw, 120px);
    width: clamp(80px, 6vw, 120px);
    position: relative;
    top: clamp(10px, 1vw, 15px);
    right: clamp(8px, 0.5vw, 12px);
}

nav a {
    text-decoration: none;
    color: white;
    font-family: Poppins, sans-serif;
    white-space: nowrap;
}

.text-surligner {
   position: relative;
   color: white;
   cursor: pointer;
   transition: transform 0.3s ease;
   display: inline-block;

}

.text-surligner.active::after {
  transform: scaleX(0.8);
}

.navbar a::after {
   content: "";
   position: absolute;
   left: 0;
   bottom: -7px;
   width: 100%;
   height: 5px;
   background-color: #42e2b2;
   border-radius: 4px;
   transform-origin: center;
   transform: scaleX(0);
   transition: transform 0.3s ease;
   z-index: 0;
 }


 .navbar a:hover::after {
   transform: scaleX(0.8);
 }

.text-surligner:hover {
   color: white;
   cursor: pointer;
   transition: transform 0.3s ease;
   display: inline-block;
}

.navbar {
  display: flex;
  gap: clamp(30px, 4vw, 50px);
  list-style: none;
  margin: 0 auto;
  padding: 0;
  font-size: var(--nav-font);
  font-weight: 600;
  flex-grow: 1;
  justify-content: center;
  
}

.navbar a {
    text-decoration: none;
    color: white;
    text-transform: uppercase;
    display: inline-block;
    cursor: pointer;
    opacity: 0.7;
    position: relative;
    z-index: 1;
}

.navbar a:hover {
    opacity: 1;
}

.logo_navbar {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
    
}

.logo_navbar img {
    padding: 8px 12px;
    display: inline-block;
    height: 30px;
    cursor: pointer;
    opacity: 0.7;
}

.logo_navbar img:hover {
    opacity: 1;
}

.logo-social {
  opacity: 0.7;
}

.logo-social:hover {
  opacity: 1;
}

.logo_navbar a.vote_bouton {
    display: flex;
    background: linear-gradient(to right, #420168 , #ff5f02 );
    color: white;
    padding: 0 var(--button-padding);
    height: var(--button-height);
    border-radius: var(--radius);
    text-decoration: none;
    text-transform: uppercase;
    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: 600;
    font-family: Poppins;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.logo_navbar a.vote_bouton:hover {
    background: linear-gradient(to bottom, #420168 , #ff5f02 );
    color:#42e2b2 ;
}

.menu_factions {
    display: none;
    position: absolute;
    border-radius: 10px;
    border: solid 5px #42e2b2;
    margin-top: 2px;
    text-decoration: none;
    left: -25px;
    padding: 10px;
    min-width: 175px;
    overflow-y: auto;
}

.menu_factions a {
    display: block;
    flex-direction: column;
    text-transform: uppercase;
    color: white;
    font-family: Poppins;
    position: relative;
    font-size: clamp(14px, 1.2vw, 20px);
    font-weight: 600;
    padding: 1px 10px;
    margin: 2px 10px;
    align-items: center;
    
}

.menu_factions a:hover {
    background: rgba(66, 226, 178, 0.8);
    border-radius: 10px;
}

.menu_deroulant1:hover .menu_factions {
    display: flex;
    flex-direction: column;

}

.menu_deroulant1:hover .menu_factions a {
    font-family: Poppins;
    text-align: center;
}
.menu_deroulant1 {
    position: relative;
}

.menu_factions a::after {
    content: none;
}

.menu_utile {
    display: none;
    position: absolute;
    border-radius: 10px;
    border: solid 5px #42e2b2;
    margin-top: 2px;
    text-decoration: none;
    left: -39px;
    padding: 10px;
    overflow-y: auto;
}

.menu_utile a {
    display: block;
    flex-direction: column;
    text-transform: uppercase;
    color: white;
    font-family: Poppins;
    position: relative;
    font-size: clamp(10px, 1.2vw, 20px);
    font-weight: 600;
    padding: 2px 5px;
    margin: 5px 5px;
    align-items: center;
    
}

.menu_utile a:hover {
    background: rgba(66, 226, 178, 0.8);
    border-radius: 10px;
}

.menu_deroulant2:hover .menu_utile {
    display: flex;
    flex-direction: column;

}

.menu_deroulant2:hover .menu_utile a {
    font-family: Poppins;
    text-align: center;
}
.menu_deroulant2 {
    position: relative;
}

.menu_utile a::after {
    content: none;
}

.keyboard-wrap,
.keyboard {
  max-width: none !important;
  min-width: auto !important;
}

.keyboard-wrap {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  bottom: -2.4vh;
  min-height: 0;  
  width: var(--keyboard-width);
  max-width: var(--keyboard-max-width);
  z-index: 999;
  display: inline-flex;
  justify-content: center;
  padding: 20px;
  perspective: 300px;
  padding: 6px 8px; 
  max-width: 200px;  
  width: fit-content;
  min-width: auto;
}

.keyboard {
  display: inline-block;
  padding: 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2b2b2b, #0f0f0f);
  width: clamp(800px, 52vw, 1600px);
  box-shadow:
    0 12px 20px rgba(0,0,0,0.5),
    inset 0 4px 8px rgba(255,255,255,0.1),
    inset 0 -4px 8px rgba(0,0,0,0.3);
  transform: perspective(900px) rotateX(8deg);
  transform-origin: bottom center;
  transition: transform 0.2s;
}

@keyframes rainbow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.keyboard::after,
.keyboard::before {
  content: '';
  position: absolute;
  background: linear-gradient(145deg, #2b2b2b, #0f0f0f);
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}

.keyboard::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(145deg, #2b2b2b, #0f0f0f);
}

.keyboard::before {
  top: 0;
  left: -3px;
  width: calc(100% + 6px);
  height: 100%;
  border-radius: 20px;
  box-shadow: inset 3px 0 3px rgba(0,0,0,0.3), inset -3px 0 3px rgba(0,0,0,0.3);
}

.key .label {
  font-family: monospace;
  font-weight: bold;
  font-size: 17px;
  color: #474747;
  transition: color 0.2s;
}

.key .label.rgb {
  transition: color 0.5s linear;
}


.row {
  display: flex;
  gap: 6px;
  align-items: center;

}

.row .key.spacer {
  margin-right: 0;
}

.rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.rows .row {
  position: relative;
}

.rows.rgb-on .row:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, #42e2b2);
  background-size: 400% 100%;
  animation: rgbLineFlow 3s linear infinite;
  filter: blur(4px);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

@keyframes rgbLineFlow {
  0%   { background-position: 0% 0%; }
  100% { background-position: 400% 0%; }
}

.key{
--w: calc(var(--key-size));
min-width:var(--w);
height:var(--w);
padding:2px 5px;
border-radius:var(--key-radius);
display:inline-flex;
align-items:center;
justify-content:center;
background:var(--key-bg);
box-shadow: var(--key-shadow);
cursor:pointer;
font-weight:600;
transform-style:preserve-3d;
transition:transform .12s cubic-bezier(.2,.9,.3,1), box-shadow .12s ease, background .12s ease;
user-select:none;
--key-size: 36px;
--key-gap: 6px;
--key-radius: 6px;
min-width: var(--key-size);
height: var(--key-size);
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--key-radius);
background: linear-gradient(to bottom, #4a4a4a, #1a1a1a);
box-shadow:
    0 6px 8px rgba(0,0,0,0.5),
    inset 0 3px 4px rgba(255,255,255,0.2),
    inset 0 -3px 4px rgba(0,0,0,0.3);
cursor: pointer;
font-weight: 600;
color: #5f5f5f;
transition: all 0.12s ease;
}

.key::after,
.key::before {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 0 0 6px 6px;
  pointer-events: none;
}

.key::after {
  top: 100%;
  left: 0;
  width: 100%;
  height: 6px;
  border-radius: 0 0 6px 6px;
}

.key::before {
  top: 0;
  left: -3px;
  width: calc(100% + 6px);
  height: 100%;
  border-radius: 6px;
  box-shadow: inset 3px 0 3px rgba(0,0,0,0.3), inset -3px 0 3px rgba(0,0,0,0.3);
}

#keyboard-inner {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.arrow-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.arrow-block .row {
  display: flex;
  gap: 6px;
  margin-left: 20px;
}

.arrow-block .row.arrows-row.flèches {
  margin-top: 52px;
}

.arrow-block .row.arrows-row.flèches .up-row {
  justify-content: center;
}

.key.arrow, .key {
  width: 36px;
  height: 36px;
}

.top-row {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.row.arrows-row:last-child {
  justify-content: flex-start;
  transform: translateX(0px);
  gap: 6px;
}

.row.arrows-row {
  display: flex;
  gap: 4px;
}

.key.arrow {
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.key.spacer {
  width: 0px;
  height: 36px;
  margin: 0;
  
  background: transparent;
  box-shadow: none;
}

.key.spacer:active {
    transform: translateY(none);
    box-shadow: none;
    background: transparent;
}

.key img {
  display: block;
  margin: 0 auto;
  pointer-events: none;
}

.key.wide { min-width: calc(var(--key-size) * 2.2); }
.key.extra-wide {
  min-width: calc(var(--key-size) * 2.2);
  height: var(--key-size);
}

.key.space {
  min-width: calc(var(--key-size) * 9.5); 
}

.key.enter-tall {
  position: absolute;
  top: calc(var(--key-size) + 8px);
  height: calc(var(--key-size) * 2 + 12px);
  min-width: var(--key-size);
  display: flex;
  align-items: center;
  justify-content: center;
  left: 100.5%;
  top: 0%;
  width: 47px;
 
}

.key.enter-tall .label {
  font-size: 28px;
  margin-bottom: 15px;
}

.key.shift-tall {
    position: absolute;
    left: 101%;
    width: 18.2%;
}

.key.shiftLeft-tall {
  min-width: 52px;
}

.key.shift-tall .label {
  font-size: 30px;
}

.key.ctrl-tall {
    position: absolute;
    left: 101%;
    width: 8.1%;
}

.key.ctrlLeft-tall { 
  min-width: 66px; 
}


.key.tab-tall {
  width: 70px;
}

.key.tab-tall .label {
  font-size: 30px;
  font-weight: 400;
}

.key.maj-tall {
  width: 90px;
}

.key .sub{display:block;font-size:11px;opacity:.7}

.key:active, .key.active {
  transform: translateY(4px);
  box-shadow: inset 0 2px 4px rgba(80, 80, 80, 0.3);
  background: linear-gradient(to bottom, #252525, #252525);
}

.key.highlight {
  background: #555;
  transform: scale(0.95);
}

.key.physical-active {
  transform: translateY(4px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  background: linear-gradient(to bottom, #252525, #252525);
}

.key.rgb-active::after {
  background: radial-gradient(circle at 50% 100%, var(--rgb-color, #42e2b2) 0%, transparent 80%);
  height: 4px;
  box-shadow: 0 0 1px 1px var(--rgb-color, #42e2b2);
}

.key.no-rgb::after {
  background: none ;
  box-shadow: none ;
}

.key.rgb-active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 40%;
  border-radius: 1px 1px 0 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent);
  pointer-events: none;
}

.key.rgb-active {
  box-shadow: 
      0 0 2px var(--rgb-color, #ffffff),
      0 0 4px var(--rgb-color, #ffffff),
      
      0 0 8px var(--rgb-color, #ffffff);
  transition: box-shadow 0.4s ease;
}

.key[data-key="alt"],
.key[data-key="e"],
.key[data-key="z"],
.key[data-key="s"],
.key[data-key="q"],
.key[data-key="d"],
.key[data-key="f"],
.key[data-key="F1"],
.key[data-key="F2"],
.key[data-key="F6"],
.key[data-key="F9"],
.key[data-key="Tab"],
.key[data-key="ControlLeft"],
.key[data-key="ControlRight"],
.key[data-key="ShiftLeft"],
.key[data-key="w"],
.key[data-key="x"],
.key[data-key="b"],
.key[data-key="o"],
.key[data-key="ArrowDown"],
.key[data-key="ArrowRight"],
.key[data-key="g"],
.key[data-key="ArrowUp"],
.key[data-key="ArrowLeft"],
.key[data-key="Backspace"],
.key[data-key="u"] {
  --rgb-color: #42e2b2cc;
}

.key:not([data-key="alt"]):not([data-key="e"]):not([data-key="z"])
.key:not([data-key="s"]):not([data-key="q"]):not([data-key="d"])
.key:not([data-key="f"]):not([data-key="F1"]):not([data-key="F2"])
.key:not([data-key="F6"]):not([data-key="F9"]):not([data-key="Tab"])
.key:not([data-key="ControlLeft"]):not([data-key="ControlRight"])
.key:not([data-key="ShiftLeft"]):not([data-key="w"]):not([data-key="x"])
.key:not([data-key="b"]):not([data-key="o"]):not([data-key="ArrowDown"])
.key:not([data-key="ArrowRight"]):not([data-key="g"])
.key:not([data-key="ArrowUp"]):not([data-key="ArrowLeft"])
.key:not([data-key="Backspace"]):not([data-key="u"]) {
  --rgb-color: #ffffffb9;
}


.key[data-key="RGB"].rgb-active::after,
.key[data-key="Win"].rgb-active::after {
    background: radial-gradient(circle at 50% 100%, #ffffff 0%, transparent 80%);
    box-shadow: 0 0 3px rgba(255,255,255,0.5);
}

.key img {
  transition: opacity 0.4s ease;
}

.key:not(.rgb-active) img {
  opacity: 0.2;
}

.key.rgb-active img {
  opacity: 1;
}

.marque {
  position: absolute;
  font-family: "Fascinate", sans-serif;
  bottom: 84%;
  left: 84%;
  font-size: 29px;
  text-shadow: 3px 3px 4px #42e2b2;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

#screen-message {
  position: fixed;
  top: -8%;
  left: 35%;
  color: #ffffff;
  font-family: sans-serif;
  font-size: 35px;
  text-shadow: 0 0 10px #000000, 0 0 30px #000000;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  pointer-events: none;
  white-space: pre-line;
  max-width: 750px;
  outline: none;
  caret-color: #42e2b2;
}

#screen-message::after {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.5;
  animation: blink 0.8s infinite;
  color: #42e2b2;
}

@keyframes blink {
  50% { opacity: 0; }
}

.postit {
    position: fixed;
    top: 56%;
    right: 60%;
    width: 150px;
    min-height: 60px;
    background: 
      repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.03) 0px,
        rgba(0, 0, 0, 0.03) 1px,
        transparent 1px,
        transparent 22px
      ),
      linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
    box-shadow:
      0 8px 25px rgba(0,0,0,0.25),
      0 2px 8px rgba(0,0,0,0.15);
    padding: 16px 18px;
    color: #222;
    font-family: "Playwrite IN", sans-serif;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid rgba(0,0,0,0.06);
    user-select: none;
    pointer-events: none;
    transform: rotate(-2deg) perspective(200px) rotateX(-8deg) rotateY(-1deg);
  transform-origin: top;
}

.pin {
  position: absolute;
  left: 50%;
  top: -5px;
  translate: -50% 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #42e2b2 60%, #0000 100%);
  box-shadow: 
    inset 0 -1px 2px rgba(0,0,0,0.3),
    0 2px 4px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.4);
}

.content {
    position: relative;
    z-index: 2;
  }

.titre-postit {
    text-align: center;
    margin: 0;
    color: rgba(1, 11, 56, 0.712);
    font-weight: 300;
    text-decoration: underline;
  }

.p-postit {
    margin: 2px 0;
    color: rgba(1, 11, 56, 0.712);
    font-weight: 300;
  }

.vert {
    color:#42e2b2 ;
    font-size: 20px;
  }

.blanc {
    color:white ;
    font-size: 20px;
  }


.message-image {
  pointer-events: none;
}

.legal-popup {
  position: fixed;
  bottom: 15px;
  right: 20px;
  z-index: 9999;
  font-family: Poppins, sans-serif;
}

.legal-button {
 background: #141414d5;
  color: #aaa;
  border: 1px solid #42e2b2;
  border-radius: 8px;
  padding: clamp(1px, 0.5vw, 5px) clamp(5px, 1vw, 15px);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.legal-button:hover {
  background: #222;
  color: #42e2b2;
}

.legal-content {
  display: none;
  position: absolute;
  bottom: 40px;
  right: 0;
  width: 280px;
  background: #141414d5;
  border: 1px solid #42e2b2;
  border-radius: 10px;
  padding: 10px;
  color: #fffefe;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.legal-popup:hover .legal-content {
  display: block;
}

@media screen and (min-width: 2560px) {
  .keyboard {
  width: clamp(800px, 40vw, 1600px);
}

.keyboard-wrap {
  transform: translateX(-50%) scale(1.1);
  bottom: 2vh;
}

.postit {
    top: 57.5%;
    right: 60%;
    width: 200px;
    font-size: 20px;
  }
}

@media screen and (min-width: 3840px) {
  .keyboard {
  width: clamp(800px, 26vw, 1600px);
  }

  .keyboard-wrap {
    transform: translateX(-50%) scale(1.5);
    bottom: 5vh;
  }

  .postit {
      top: 54.5%;
      right: 60%;
      width: 250px;
      font-size: 25px;
  }
}