@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.admin-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
}

.admin-btn svg {
  width: 18px;
  height: 18px;
}

.admin-btn:hover {
  color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: rotate(30deg);
}

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #e0e7ff;
  --secondary: #0ea5e9;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-light: #64748b;
  --border: #f1f5f9;
  --success: #10b981;
  --danger: #ef4444;
  --radius-lg: 20px;
  --radius-md: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.04), 0 4px 6px -4px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(#e2e8f0 0.5px, transparent 0.5px);
  background-size: 24px 24px;
  color: var(--text);
  line-height: 1.6;
}

/* Header & Logo */
.header {
  padding: 2rem 0;
  text-align: center;
}

.logo {
  display: flex;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.logo img {
  max-height: 80px;
  width: auto;
}

.header-tagline {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.main {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

/* Modern Steps Indicator */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto 3rem;
  gap: 1rem;
  max-width: 700px;
}

.step-dot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  border-radius: 50px;
  background: white;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-light);
}

.step-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  white-space: nowrap;
}

.step-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 8px 16px -4px rgba(79, 70, 229, 0.3);
  transform: translateY(-1px);
}

.step-dot.active .step-num {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.step-dot.active .step-label {
  color: white;
}

.step-dot.completed .step-num {
  background: var(--success);
  color: white;
}

.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
}

/* Form Steps */
.form-step {
  display: none;
}

.form-step.active {
  display: block;
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.step-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.step-header h2 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.step-desc {
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 500;
}

/* Premium Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.35rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.1);
}

.card-note {
  font-size: 1rem;
  color: #475569;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.card-hint {
  font-size: 0.9rem;
  background: #f8fafc;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-light);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #f1f5f9;
  font-weight: 500;
}

/* Grid Items */
.music-list, .voice-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.list-item {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  min-width: 0; /* Empêche le débordement de flex */
}

.list-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.08);
}

.list-item.selected {
  background: #f5f3ff;
  border-color: var(--primary);
  border-width: 2px;
  padding: calc(1rem - 1px);
}

.item-info { 
  flex: 1; 
  min-width: 0; 
  overflow: hidden; 
}

.item-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
  margin-bottom: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.play-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: #f1f5f9;
  border: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--primary);
  font-size: 1rem;
}

.play-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* Tabs */
.music-tabs, .voice-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: none;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.tab-btn.active {
  background: #1e293b;
  color: white;
  border-color: #1e293b;
  box-shadow: 0 8px 12px -2px rgba(15, 23, 42, 0.2);
}

/* Message Cards */
.message-card {
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.message-card:hover { box-shadow: var(--shadow-md); }

.message-card-header {
  padding: 1.25rem 2rem;
  background: #fdfdfd;
  transition: all 0.3s;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
}

.msg-toggle { display: none; }

.toggle-switch {
  width: 48px;
  height: 26px;
  background: #e2e8f0;
  border-radius: 50px;
  position: relative;
  transition: 0.4s;
}

.toggle-switch::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  top: 4px;
  left: 4px;
  transition: 0.4s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.msg-toggle:checked + .toggle-switch { background: var(--primary); }
.msg-toggle:checked + .toggle-switch::after { left: 26px; }

.toggle-text { display: flex; flex-direction: column; }
.toggle-text strong { font-size: 1.05rem; font-weight: 800; color: #1e293b; }
.toggle-text small { color: var(--text-light); font-size: 0.85rem; font-weight: 600; }

.message-card-body {
  padding: 2rem 2.5rem;
  background: white;
  border-top: 1px solid var(--border);
}

.examples-block {
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  margin-bottom: 2.5rem;
  border: 1px solid #f1f5f9;
}

.examples-title {
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 1.25rem;
}

.examples-list li {
  margin-bottom: 0.75rem;
  padding-left: 2rem;
  position: relative;
  cursor: pointer;
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.2s;
}

.examples-list li:hover { transform: translateX(8px); }
.examples-list li::before { content: "→"; position: absolute; left: 0; font-weight: 900; }

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 1rem;
}

textarea, .form-group input {
  width: 100%;
  padding: 1.5rem;
  border: 2px solid #f1f5f9;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.05rem;
  transition: all 0.3s;
  background: #fcfdfe;
}

textarea:focus, .form-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.1);
}

/* Success Screen */
.success-screen {
  text-align: center;
  padding: 5rem 3rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 700px;
  margin: 5rem auto;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-icon {
  font-size: 3.5rem;
  color: var(--success);
  margin-bottom: 2.5rem;
  display: inline-flex;
  width: 100px;
  height: 100px;
  background: #ecfdf5;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}

.success-screen h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  color: #0f172a;
  letter-spacing: -0.04em;
}

/* Footer */
.footer {
  text-align: center;
  padding: 4rem 0;
  border-top: 1px solid #f1f5f9;
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
}

.btn {
  padding: 1.25rem 2.5rem;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary {
  background: #1e293b;
  color: white;
  box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  background: #0f172a;
  box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.4);
}

.alert {
  padding: 1.75rem;
  border-radius: 20px;
  background: #fff1f2;
  border: 1px solid #ffe4e6;
  color: #9f1239;
  display: flex;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.alert-content strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.hidden { display: none !important; }

@media (max-width: 768px) {
  .music-list, .voice-list { grid-template-columns: 1fr; }
  .steps-indicator { gap: 0.5rem; }
  .step-dot { padding: 0.75rem; }
  .step-dot .step-label { display: none; }
}

.summary-list {
  list-style: none;
  padding: 0;
}

.summary-list li {
  padding: 1rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 1.05rem;
  color: #334155;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list strong {
  color: #0f172a;
  display: inline-block;
  min-width: 220px;
}

/* Footer */
.footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}
.footer p {
  color: #64748b;
  font-size: 0.9rem;
}
