* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: rgb(63, 125, 225);
  margin: 0;
  line-height: 1.5;
  font-family: system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  word-wrap: break-word;
  overflow-x: hidden;
}

svg {
  max-width: 100%;
  height: auto;
}

#text1 {
  position: fixed;
  color: white;
  z-index: 10002;
}

.bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

svg path:hover {
  fill: red;
  transition: 0.6s;
  cursor: crosshair;
}

svg path {
  fill: rgba(0, 255, 0, 0.695);
  stroke: black;
  stroke-width: 0.035rem;
  position: relative;
  z-index: 1000;
}

.pays :hover {
  background-color: red !important;
  transition: 0.6s;
}

a {
  text-decoration: none;
  display: block;
  margin: auto;
}

.back-btn {
  position: fixed;
  top: 2vh;
  left: 2vw;
  z-index: 1100;
  background-color: #e11d48;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  box-shadow: 0 0.2rem 0.6rem rgba(0,0,0,0.3);
  transition: background-color 0.3s ease;
}

.back-btn:hover {
  background-color: #be123c;
}

.back-btn:active {
  background-color: #9b1c31;
}

.ac {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

h1 {
  text-align: center;
  margin-top: 5vh;
  color: red;
  font-size: 2rem;
}

.acc {
  color: red;
  text-decoration: none;
  display: block;
  margin: 3vh auto;
  font-size: 1.2rem;
  text-align: center;
}

.tooltip {
  position: absolute;
  background: white;
  border: 0.1rem solid black;
  padding: 0.4rem;
  display: none;
  pointer-events: none;
}

#score {
  color: rgb(63, 125, 225);
  font-size: 0.1rem;
}

.text {
  position: absolute;
  text-align: center;
  top: 0;
  left: 50%;
  color: rgba(230, 16, 16, 0.856);
  font-size: 5vw;
  background: transparent;
  padding: 2vh 2vw;
  border-color: transparent;
  transform: translateX(-50%);
  z-index: 10001;
  pointer-events: none;
}

button {
  display: inline-block;
  background: transparent;
  border-radius: 1rem;
  border: 0.3rem double #cccccc;
  text-align: center;
  font-size: 1.5rem;
  padding: 1.5rem;
  width: 60vw;
  max-width: 20rem;
  transition: all 0.5s;
  cursor: pointer;
  margin: 1vh auto;
}

button:hover {
  background-color: #7b38d8;
  color: #ffffff;
  transform: scale(1.1);
}

button:active {
  background-color: #7b38d8;
  color: #ffffff;
  transform: scale(0.9);
}

#app {
  position: sticky;
  top: 0;
  z-index: 900;
  text-align: center;
  color: #fffefe;
  padding: 2vh 0;
  margin: 0;
  box-shadow: 0 0.2rem 0.5rem rgba(69, 68, 68, 0.2);
}

.base-timer {
  position: sticky;
  width: 20vw;
  max-width: 120px;
  height: 20vw;
  max-height: 120px;
  z-index: 10002;
}

.base-timer__svg {
  width: 100%;
  height: 100%;
  transform: rotate(90deg);
}

.base-timer__circle {
  fill: none;
  stroke: none;
}

.base-timer__path-elapsed {
  stroke-width: 0.5vw;
  stroke: black;
}

.base-timer__path-remaining {
  stroke-width: 0.5vw;
  stroke-linecap: round;
  transition: 1s linear all;
  fill: none;
  stroke: green;
}

.base-timer__path-remaining.orange {
  stroke: orange;
}

.base-timer__path-remaining.red {
  stroke: red;
}

.base-timer__label {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #222;
  font-family: Arial, sans-serif;
  font-weight: bold;
  user-select: none;
  pointer-events: none;
}

.game-over {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 6vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
  text-align: center;
}

.game-over button {
  border: 0;
  line-height: 2.5;
  padding: 0 5vw;
  font-size: 1.5rem;
  text-align: center;
  color: #fff;
  text-shadow: 1px 1px 1px #000;
  border-radius: 1rem;
  background-color: rgba(220, 0, 0, 1);
  background-image: linear-gradient(to top left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0));
  width: 80%;
  max-width: 300px;
  margin-top: 1rem;
}

.game-over button:hover {
  background-color: rgba(220, 0, 0, 1);
  background-image: linear-gradient(to top left, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 30%, rgba(0, 0, 0, 0));
  color: #fff;
  text-shadow: 1px 1px 1px #000;
}

.container {
  max-width: 100%;
  padding: 1rem;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideIn {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Optimisation responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 1.4rem;
    margin-top: 3vh;
  }

  .text {
    font-size: 6vw;
    padding: 1.5vh 2vw;
  }

  button {
    font-size: 1.2rem;
    padding: 1rem;
    width: 80vw;
  }

  .back-btn {
    font-size: 1.2rem;
    padding: 0.6rem 1rem;
  }

  .base-timer {
    width: 30vw;
    height: 30vw;
    max-width: 100px;
    max-height: 100px;
  }

  .base-timer__label {
    font-size: 1.8rem;
  }

  .game-over {
    font-size: 5vw;
  }

  .game-over button {
    font-size: 1.2rem;
    padding: 1rem;
  }

  .ac {
    top: auto;
    bottom: 10vh;
    transform: translateX(-50%);
    width: 90vw;
    text-align: center;
  }

  .acc {
    font-size: 1rem;
    margin: 2vh auto;
  }
}

@media (max-width: 400px) {
  .text {
    font-size: 7vw;
  }

  .back-btn {
    padding: 0.4rem 0.8rem;
    font-size: 1rem;
  }

  .base-timer__label {
    font-size: 1.5rem;
  }

  button {
    font-size: 1rem;
    padding: 0.8rem;
    width: 90vw;
  }
}
.footer {
  background-color: #222;
  color: #f1f1f1;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  position: relative;
  bottom: 0;
  width: 100%;
  margin-top: 2rem;
}

.footer a {
  color: #77c0ff;
  text-decoration: none;
  margin: 0 5px;
}

.footer a:hover {
  text-decoration: underline;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
}
