/* RESET ET BASE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-smooth: always;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

:focus-visible {
  outline: 2px solid #ffa500;
  outline-offset: 3px;
  border-radius: 6px;
}

/* THEMES */
body.dark-theme {
  background: linear-gradient(145deg, #121212, #1f1f1f);
  color: #e5e5e5;
}

body.light-theme {
  background: linear-gradient(145deg, #ffffff, #f2f2f2);
  color: #1a1a1a;
}

.d-flex {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* FORMULAIRE */
.form-label {
  color: white;
  border-color: rgba(255, 255, 255, 0.444);
}

.form-container {
  background: rgba(30, 30, 30, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  padding: 30px 40px;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  transition: all 0.3s ease-in-out;
}

.form-container h2 {
  margin-bottom: 20px;
  font-size: 1.9em;
  color: #ffa500;
  text-align: center;
}

input.form-control,
form select,
form input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #444;
  border-radius: 10px;
  background-color: #2a2a2a;
  color: #fff;
  font-size: 1em;
  transition: border 0.3s ease, background 0.3s ease;
}

input.form-control::placeholder,
form input::placeholder {
  color: #888;
}

input:focus-visible {
  border-color: #ffa500;
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 165, 0, 0.3);
}

form button,
.ext-button,
#play-btn {
  width: 100%;
  padding: 12px 18px;
  margin-top: 10px;
  color: #1a1a1a;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.3s ease;
}

form button:hover {
  transform: translateY(-2px);
}

.btn-selected {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}

/* Custom Bootstrap Button Gradients */
.btn-primary {
  background: linear-gradient(145deg, #0056b3, #007bff);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(145deg, #003f7f, #0056b3);
}

.btn-secondary {
  background: linear-gradient(145deg, #495057, #6c757d);
  color: #fff;
  border: none;
}

.btn-secondary:hover {
  background: linear-gradient(145deg, #343a40, #495057);
}

.btn-success {
  background: linear-gradient(145deg, #1e7e34, #28a745);
  color: #fff;
  border: none;
}

.btn-success:hover {
  background: linear-gradient(145deg, #155d27, #1e7e34);
}

.btn-danger {
  background: linear-gradient(145deg, #a71d2a, #dc3545);
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: linear-gradient(145deg, #7a101e, #a71d2a);
}

.btn-warning {
  background: linear-gradient(145deg, #e0a800, #ffc107);
  color: #212529;
  border: none;
}

.btn-warning:hover {
  background: linear-gradient(145deg, #c69500, #e0a800);
}

.btn-info {
  background: linear-gradient(145deg, #117a8b, #17a2b8);
  color: #fff;
  border: none;
}

.btn-info:hover {
  background: linear-gradient(145deg, #0d5c6b, #117a8b);
}

.btn-light {
  background: linear-gradient(145deg, #e2e6ea, #f8f9fa);
  color: #212529;
  border: none;
}

.btn-light:hover {
  background: linear-gradient(145deg, #d6d8db, #e2e6ea);
}

.btn-dark {
  background: linear-gradient(145deg, #1d2124, #343a40);
  color: #fff;
  border: none;
}

.btn-dark:hover {
  background: linear-gradient(145deg, #121416, #1d2124);
}

/* MESSAGES */
.error-message,
.error,
.success {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  color: #fff;
  margin-bottom: 15px;
  font-size: 0.95em;
  position: relative;
  animation: fadeIn 0.5s ease-in;
}

.error-message,
.error {
  background-color: #ff3d3d;
  border-left: 6px solid #ef4444;
}

.success {
  background-color: #00b709;
  border-left: 6px solid #22c55e;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-footer {
  margin-top: 15px;
  text-align: center;
  font-size: 0.95em;
}

.form-footer a {
  color: #ffa500;
  text-decoration: none;
  transition: text-decoration 0.2s ease;
}

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

/* SIDEBAR */
.sidebar {
  background-color: #181818;
  min-width: 240px;
  max-width: 250px;
  height: 100vh;
  padding: 2rem 1rem;
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar h4 {
  color: #ffa500;
  font-weight: 700;
}

.sidebar .nav-link {
  color: #cbd5e1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  transition: background 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: linear-gradient(to right, #292929 0%, rgba(41, 41, 41, 0) 100%);
  color: #fff;
}

/* MAIN */
main {
  padding: 2rem;
  padding-bottom: 7rem;
  flex-grow: 1;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}

/* CARDS */
.card {
  background: #1f1f1f;
  border: none;
  border-left: 6px solid transparent;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: scale(1.035);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-size: 0.8rem;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

/* BORDURES UTILITAIRES */
.border-secondary { border-left-color: #6c757d; }
.border-success { border-left-color: #22c55e; }
.border-warning { border-left-color: #ffa500; }
.border-info    { border-left-color: #0ea5e9; }

.border-select-success:hover { border-left-color: #22c55e !important; }
.border-select-warning:hover { border-left-color: #ffa500 !important; }
.border-select-info:hover    { border-left-color: #0ea5e9 !important; }
.border-select-danger:hover  { border-left-color: #ef4444 !important; }

.text-danger { color: #ef4444; }

.disconnect-button {
  background: linear-gradient(to right, #ef4444 0%, rgba(239, 68, 68, 0) 100%);
  color: white;
  border: none;
  border-radius: 10px;
}

.disconnect-button:hover {
  background-color: #c12424;
}

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

.radio-icon {
  height: 120px;
}

.sidebar-sep-mobile {
  display: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  html, body {
    overflow: hidden;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1050;
    width: 240px;
    height: var(--vh, 100vh);
    font-size: 0.9rem;
    display: inline-block;
  }

  .sidebar-sep-mobile {
    display: block;
  }

  .sidebar.d-flex {
    display: inline-block !important;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle,
  .close-sidebar {
    background: none;
    border: none;
    color: #fff;
    position: fixed;
    font-size: 1.5rem;
    cursor: pointer;
  }
  .menu-toggle {
    top: 20px;
    left:20px;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 3px;
    padding-bottom: 3px;
    z-index: 1040;
    background-color: #ffffff18;
    backdrop-filter: blur(5px);
    border-radius: 5px;
  }

  .close-sidebar {
    top: 15px;
    left: 25px;
    font-size: 2rem;
  }

  .sidebar-title {
    margin-top: 35px;
  }

  .page {
    margin-top: 35px;
    margin-bottom: 100px;
  }

  .main {
    height: 100dvh;
  }

  .radio-icon {
    height: 90px;
  }
}

.menu-center {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 10px;
}

.menu-center-child {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-title {
  font-size: calc(1.375rem + 1.5vw)
}

.page-subtitle {
  font-size: calc(0.5rem + 1vw)
}

.err-list {
  border-bottom: 1px solid #333;
}

.err-alert {
  animation: vumeterBlinker 1s infinite;
}

@keyframes vumeterBlinker {
  0%, 50% { background-color: inherit; }
  51%, 100% { background-color: rgb(175, 0, 0); }
}

.modal {
  background-color: #12121280;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #12121200 !important;
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}

.modal-header,
.modal-footer {
  border-top-color: #333;
  border-bottom-color: #333;
}

.btn-close-white,
.btn-close {
  filter: invert(1);
}

.modal-footer .btn {
  border: none;
  font-weight: bold;
  color: #ffffff;
  transition: background 0.3s ease;
}

.stream-item {
  height: 40px;
}

.listen-body {
  font-family: sans-serif;
  background-color: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#player-container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  text-align: center;
}

#waveform {
  margin: 1rem 0;
}

#play-btn:hover {
  background-color: #2563eb;
}

.stream-btn {
  background-color: transparent;
  color: #ccc;
  border-color: #444;
  transition: all 0.2s ease-in-out;
  padding: 6px 12px;
  min-width: 180px;
  text-align: left;
}

.stream-btn:hover {
  background-color: #292929;
  color: #fff;
  border-color: #666;
}

.stream-btn.selected {
  background-color: #dc3545 !important;
  color: white !important;
  border-color: #dc3545 !important;
}


#install-banner {
  color: white;
  padding-bottom: 16px;
  z-index: 9999;
  font-family: sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#install-btn {
  background: rgba(128, 0, 128, 0.438);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  margin-top:15px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

#close-banner {
  background: none;
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  position: absolute;
  top: 8px;
  right: 16px;
}
