
body {
  font-family: 'Poppins', sans-serif;
}
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}
.maxwidth {
  max-width: 500px;
}
.img-fluid {
  max-width: 250px;
}
.slot-card {
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 16px;
  margin-bottom: 16px;
  background-color: #fff;
  z-index: 0;
}
.btn-custom {
  background-color: #212529;
  color: white;
  border: none;
}

.btn-custom:hover {
  background-color: #494f55;
  color: white;
}
.weather-icon {
  position: absolute;
  bottom: 17px;
  right: 20px;
  width: 50px;
  height: 50px;
  opacity: 0.85;
  object-fit: contain;
  pointer-events: none;
}
.slot-card {
  position: relative; /* important pour que position:absolute fonctionne */
}
.alert-custom {
  background-color: #f8d7da;
  border-left: 5px solid #dc3545;
  color: #842029;
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  text-align: center;
  font-weight: 500;
}
#error-message {
  width: 100%;
  margin-top: 1rem;
}
.ts-control,
.ts-control input,
.ts-dropdown,
.ts-dropdown .option {
  font-size: 16px !important;
  -webkit-text-size-adjust: 100%; /* iOS */
}
.geo-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.geo-modal {
  background: #2c2c2c;
  color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  font-family: system-ui, sans-serif;
}

.geo-modal strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.geo-modal button {
  margin-top: 1.2rem;
  background: #444;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.geo-modal button:hover {
  background: #666;
}

.d-none {
  display: none !important;
}
@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-6px); }
  80%  { transform: translateX(6px); }
  100% { transform: translateX(0); }
}

.geo-modal.shake {
  animation: shake 0.4s ease;
}
.d-none {
  display: none !important;
}
.alert-custom {
  width: 100%;
  box-sizing: border-box;
}
#manual-location {
  font-size: 16px !important;
}
.ts-control {
  font-size: 16px !important;
}

.form-card-container {
  perspective: 1000px;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.form-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.form-card.flip {
  transform: rotateY(180deg);
}

.form-face {
  width: 100%;
  backface-visibility: hidden;
  top: 0;
  left: 0;
}

.form-card .form-face {
  display: none;
}

.form-card:not(.flip) .form-front {
  display: block;
}

.form-card.flip .form-back {
  display: block;
}

.form-front {
  z-index: 2;
  transform: rotateY(0deg);
}

.form-back {
  transform: rotateY(180deg);
}

.ts-wrapper.single.input-active .ts-control {
  border-radius: 6px;
  border: 1px solid #ccc;
  padding-right: 2.5rem;
}

.ts-wrapper.single .ts-control::after {
  display: none !important;
}

.ts-wrapper .ts-control input {
  padding-left: 1rem;
  font-size: 16px;
}

.ts-wrapper.single.input-active {
  border-radius: 0.375rem 0 0 0.375rem !important;
}

.ts-wrapper .ts-control {
  height: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
}

.input-group .ts-wrapper {
  flex: 1 1 auto;
}

#tournament-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

#tournament-results .slot-card {
  padding: 1rem;
  border-radius: 8px;
  background: white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.slot-card .btn-outline-secondary {
  font-weight: 600;
  border-radius: 6px;
}

#detect-location:hover {
  background-color: #eee;
}

.btn-localised {
  background-color: #F76C6C;
  color: white;
  border: none;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 0.375rem; /* équivalent Bootstrap rounded */
  font-weight: 500;
  text-align: center;
}

.btn-check:checked + .btn {
  background-color: #212529;
  color: #fff;
  border-color: #212529;
}

@keyframes dotsAnim {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: ""; }
}

.dots::after {
  content: "";
  animation: dotsAnim 1.5s steps(4, end) infinite;
}

@media (min-width: 768px) {
  #results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .result-card {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.05);
    padding: 1rem;
    transition: transform 0.2s;
  }

  .result-card:hover {
    transform: translateY(-4px);
  }

  .result-card h5 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
  }

  .result-card p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
    color: #555;
  }
}
