/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Montserrat:wght@300;400;600&display=swap');

:root {
  --bg-primary: #1A1A2E;
  --text-primary: #FFFFFF;
  --accent-blue: #00D4FF;
  --accent-purple: #D500F9;
  --accent-pink: #FF007A;
  --gradient: linear-gradient(135deg, #00D4FF, #D500F9);
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
}

.container {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  max-width: 32rem;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

input, select, button {
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  width: 100%;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

button {
  background: var(--gradient);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.3s;
}

button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
}

button:disabled {
  background: #4b5563;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: #4b5563;
}

.btn-secondary:hover {
  background: #6b7280;
  box-shadow: 0 0 10px rgba(107, 114, 128, 0.5);
}

.btn-success {
  background: var(--accent-blue);
}

.btn-success:hover {
  background: #00b8d4;
  box-shadow: 0 0 15px rgba(0, 184, 212, 0.7);
}

.btn-warning {
  background: var(--accent-pink);
}

.btn-warning:hover {
  background: #d4005f;
  box-shadow: 0 0 15px rgba(212, 0, 95, 0.7);
}

.btn-danger {
  background: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.7);
}

.error {
  color: #ff4d4d;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.success {
  color: var(--accent-blue);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.css-test {
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.flex {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.section {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}


.modal-content {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  padding: 2rem;
  border-radius: 1rem;
  max-width: 32rem;
  width: 100%;
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideIn 0.3s ease;
}

.modal-content h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent-blue);
}

/* Autocomplétion */
.autocomplete-container {
  position: relative;
}

.autocomplete-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1001;
}

.autocomplete-suggestion {
  padding: 0.75rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.2s;
}

.autocomplete-suggestion:hover {
  background: rgba(0, 212, 255, 0.2);
}

/* Lien d'ajout de centre */
.add-center-link {
  font-size: 0.875rem;
  color: var(--accent-blue);
  cursor: pointer;
}

.add-center-link:hover {
  color: var(--accent-purple);
  text-decoration: underline;
}

/* Sablier futuriste */
.loader {
  width: 48px;
  height: 48px;
  border: 4px solid transparent;
  border-top: 4px solid var(--accent-blue);
  border-right: 4px solid var(--accent-purple);
  border-radius: 50%;
  animation: spin 1.5s linear infinite, pulse 2s ease-in-out infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.5); }
  50% { box-shadow: 0 0 30px rgba(213, 0, 249, 0.7); }
}

.loading-container {
  text-align: center;
  padding: 2rem 0;
}

.loading-container p.main {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-blue);
}

.loading-container p.note {
  font-size: 0.875rem;
  color: #A0AEC0;
}

/* Animations pour modales */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 640px) {
  .container, .modal-content {
    max-width: 90%;
    padding: 1.5rem;
  }
  h2, h3 {
    font-size: 1.25rem;
  }
  button {
    padding: 0.5rem;
  }
}
