/* ============================================
   SalesNote AI - Style Premium Tablette
   ============================================ */

:root {
  --primary: #f16314;
  --primary-light: #f5893e;
  --primary-dark: #d4520e;
  --accent: #ff8c42;
  --success: #f16314;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-light: #334155;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: rgba(255,255,255,0.08);
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 160%;
  background: var(--bg-dark);
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

/* Particules */
.particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--primary-light);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s infinite;
}

@keyframes particleFloat {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* Écrans */
.screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- WELCOME ---- */
#screen-splash, #screen-confirmation {
  align-items: center;
  justify-content: center;
}

#screen-loading {
  align-items: flex-start;
  justify-content: center;
}

#screen-welcome {
  align-items: flex-start;
  justify-content: center;
}

.welcome-container {
  text-align: center;
  padding: 2rem 3rem;
  width: 100%;
  max-width: 90vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ---- SPLASH ---- */
.splash-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-pulse-big {
  width: 360px; height: 360px;
  margin: 0 auto;
}

.logo-pulse-big .logo-ring {
  width: 204px; height: 204px;
}

.logo-pulse-big .logo-icon {
  width: 200px; height: 200px;
}

.logo-pulse-loading {
  width: 360px; height: 360px;
  margin: 0 auto;
}

.logo-pulse-loading .logo-ring {
  width: 180px; height: 180px;
}

.logo-pulse-loading .logo-icon {
  width: 160px; height: 160px;
}

.logo-pulse-loading .brain-core {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 18%;
  box-shadow: 0 0 30px rgba(241,99,20,0.6);
  animation: coreGlow 2s infinite;
}

.logo-pulse {
  position: relative;
  width: 240px; height: 240px;
  margin: 0 auto;
}

.logo-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 140px; height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.logo-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 144px; height: 144px;
  border: 2px solid #f16314;
  border-radius: 18%;
  animation: ringPulse 3s ease-out infinite;
}

.logo-ring.delay-1 { animation-delay: 1s; }
.logo-ring.delay-2 { animation-delay: 2s; }

@keyframes ringPulse {
  0% { transform: translate(-50%,-50%) scale(0.7); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1.4); opacity: 0; }
}

.welcome-name {
  font-size: 3.5rem;
  display: block;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  min-height: 3em;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.welcome-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-weight: 300;
}

/* Login bar */
.login-bar-wrapper {
  width: 220px;
  margin: 0 auto;
}

.login-bar {
  width: 100%;
  height: 4px;
  background: var(--glass-border);
  border-radius: 4px;
  overflow: hidden;
}

.login-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 4s linear;
}

.login-bar-fill.animate {
  width: 100%;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 30px rgba(99,102,241,0.4);
  font-family: inherit;
}

.btn-start:active {
  transform: scale(0.96);
  box-shadow: 0 2px 15px rgba(99,102,241,0.3);
}

.btn-start svg { width: 20px; height: 20px; }

.fade-in-delayed { animation: fadeInUp 0.8s 0.5s both; }
.fade-in-delayed-2 { animation: fadeInUp 0.8s 1s both; }

/* Credit devo.to */
.credit {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.5;
  z-index: 100;
  text-decoration: none;
  transition: opacity 0.3s;
}

.credit:hover {
  opacity: 0.8;
}

/* Voice selector - coin bas droit discret */
.voice-selector {
  position: fixed;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  opacity: 0.5;
  transition: opacity 0.3s;
  z-index: 100;
}

.voice-selector:hover {
  opacity: 1;
}

.voice-selector svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.voice-selector select {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 0.75rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  max-width: 200px;
  display: none;
}

.voice-selector.open select {
  display: block;
}

.voice-selector {
  cursor: pointer;
}

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

/* ---- STEP INDICATOR ---- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2rem;
}

.step {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--bg-card);
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all 0.4s;
}

.step.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  color: white;
  box-shadow: 0 0 20px rgba(99,102,241,0.4);
}

.step.done {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-line {
  width: 50px;
  height: 2px;
  background: var(--border);
  transition: background 0.4s;
}

.step-line.filled {
  background: var(--success);
}

/* ---- DICTATION ---- */
.dictation-container {
  width: 100%;
  max-width: 90vw;
  margin: 0 auto;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.section-title svg { color: var(--primary-light); flex-shrink: 0; }

.textarea-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

textarea, .result-textarea {
  width: 100%;
  min-height: 0;
  flex: 1;
  padding: 1.25rem;
  padding-right: 4.5rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.7;
  resize: none;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  user-select: text;
}

textarea:focus, .result-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

textarea::placeholder { color: var(--text-muted); }

.btn-mic {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
}

.btn-mic:active { transform: scale(0.9); }

.btn-mic.recording {
  background: linear-gradient(135deg, #ef4444, #f97316);
  animation: micGlow 1.5s infinite;
}

@keyframes micGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  50% { box-shadow: 0 0 0 15px rgba(239,68,68,0); }
}

.mic-waves {
  position: absolute;
  display: none;
}

.mic-waves span {
  display: block;
  width: 3px;
  height: 12px;
  background: white;
  border-radius: 3px;
  margin: 0 2px;
  animation: wave 0.6s infinite ease-in-out;
}

.mic-waves span:nth-child(2) { animation-delay: 0.15s; height: 18px; }
.mic-waves span:nth-child(3) { animation-delay: 0.3s; }

.btn-mic.recording .mic-waves {
  display: flex;
  align-items: center;
}

.btn-mic.recording svg { display: none; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.5); }
  50% { transform: scaleY(1.2); }
}

/* Boutons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
  font-family: inherit;
  width: 100%;
  justify-content: center;
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn-secondary:active { transform: scale(0.97); }

/* ---- LOADING ---- */
.loading-container {
  text-align: center;
  padding: 2rem 3rem;
  width: 100%;
  max-width: 90vw;
}

.ai-brain {
  position: relative;
  width: 120px; height: 120px;
  margin: 0 auto 2.5rem;
}

.brain-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(99,102,241,0.6);
  animation: coreGlow 2s infinite;
}

@keyframes coreGlow {
  0%, 100% { box-shadow: 0 0 30px rgba(99,102,241,0.6); }
  50% { box-shadow: 0 0 50px rgba(99,102,241,0.9); }
}

.brain-orbit {
  position: absolute;
  top: 50%; left: 50%;
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 50%;
  animation: orbitSpin 4s linear infinite;
}

.orbit-1 {
  width: 60px; height: 60px;
  margin: -30px 0 0 -30px;
}

.orbit-2 {
  width: 90px; height: 90px;
  margin: -45px 0 0 -45px;
  animation-duration: 6s;
  animation-direction: reverse;
}

.orbit-3 {
  width: 120px; height: 120px;
  margin: -60px 0 0 -60px;
  animation-duration: 8s;
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

.brain-dot {
  position: absolute;
  top: -4px;
  left: 50%;
  margin-left: -4px;
  width: 8px; height: 8px;
  background: var(--primary-light);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(99,102,241,0.8);
}

.loading-text {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0;
}

.loading-dots span {
  font-size: 2rem;
  color: var(--primary-light);
  animation: dotBlink 1.4s infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

.loading-steps {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.loading-step {
  font-size: 1.3rem;
  color: var(--text-muted);
  opacity: 0.4;
  transition: all 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.loading-step.active {
  opacity: 1;
  color: var(--primary-light);
}

.loading-step.active::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: stepPulse 1s infinite;
}

.loading-step.done {
  opacity: 0.7;
  color: var(--success);
}

.loading-step.done::before {
  content: '\2713';
  font-size: 0.85rem;
}

@keyframes stepPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Loading bar */
.loading-bar-wrapper {
  margin-top: 0.5rem;
  width: 250px;
  margin-left: auto;
  margin-right: auto;
}

.loading-bar {
  width: 100%;
  height: 4px;
  background: var(--glass-border);
  border-radius: 4px;
  overflow: hidden;
}

.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
}

/* ---- RESULT ---- */
#screen-dictation, #screen-result {
  align-items: stretch;
}

.result-main {
  flex: 1;
  padding: 2rem 3rem;
  max-width: 90vw;
  max-height: 90vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card {
  position: relative;
  margin-bottom: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.result-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  padding: 4px 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  z-index: 2;
}

.result-textarea {
  min-height: 0;
  max-height: 100%;
  flex: 1;
  overflow-y: auto;
  padding-right: 1.25rem;
  user-select: text;
}

.result-textarea h1, .result-textarea h2, .result-textarea h3 {
  color: var(--primary);
  margin: 0.5rem 0 0.3rem;
  font-weight: 700;
}
.result-textarea h1 { font-size: 1.3rem; }
.result-textarea h2 { font-size: 1.15rem; }
.result-textarea h3 { font-size: 1.05rem; }
.result-textarea strong { color: var(--text); }

.result-actions {
  display: flex;
  gap: 1rem;
}

.result-actions .btn-secondary { flex: 1; justify-content: center; }
.result-actions .btn-primary { flex: 2; }

/* ---- CONTACTS PANEL ---- */
.contacts-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

.contacts-panel.open {
  width: 450px;
}

.contacts-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 0.5s;
  z-index: 49;
}

.contacts-overlay.active {
  background: rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.contacts-panel {
  font-size: 100%;
}

.contacts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  min-width: 380px;
}

.contacts-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card-light);
  border: none;
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contacts-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  min-width: 380px;
}

.contacts-search input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}

.contacts-search svg { color: var(--text-muted); flex-shrink: 0; }

.contacts-list {
  flex: 1;
  overflow-y: auto;
  min-width: 380px;
}

.contacts-group {
  padding: 0.5rem 0;
}

.group-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-item:active { background: var(--glass); }

.contact-avatar {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.contact-info { flex: 1; min-width: 0; }

.contact-name {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Custom checkbox */
.checkbox-wrapper {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-wrapper input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.checkmark {
  display: block;
  width: 24px; height: 24px;
  border: 2px solid var(--bg-card-light);
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
}

.checkbox-wrapper input:checked + .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkbox-wrapper input:checked + .checkmark::after {
  content: '';
  position: absolute;
  top: 3px; left: 7px;
  width: 5px; height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.contacts-actions {
  margin-top: auto;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 380px;
}

.btn-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem;
  background: var(--bg-card-light);
  color: var(--text);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s;
}

.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 20px rgba(99,102,241,0.3);
  transition: all 0.3s;
}

.btn-send:active, .btn-save:active { transform: scale(0.97); }

/* ---- CONFIRMATION ---- */
.confirmation-container {
  text-align: center;
  padding: 2rem 3rem;
  width: 100%;
  max-width: 90vw;
}

.success-animation {
  position: relative;
  width: 100px; height: 100px;
  margin: 0 auto 2rem;
}

.success-circle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 80px; height: 80px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-check {
  width: 36px; height: 36px;
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: drawCheck 0.5s 0.3s forwards;
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.success-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 80px; height: 80px;
  border: 3px solid var(--success);
  border-radius: 50%;
  animation: successRing 0.8s 0.2s forwards;
  opacity: 0;
}

@keyframes successRing {
  0% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.8); }
}

@keyframes popIn {
  0% { transform: translate(-50%,-50%) scale(0); }
  100% { transform: translate(-50%,-50%) scale(1); }
}

.confirmation-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.5s 0.4s both;
}

.confirmation-detail {
  font-size: 1rem;
  color: var(--text-muted);
  animation: fadeInUp 0.5s 0.5s both;
  margin-bottom: 2.5rem;
}

.btn-next-rdv {
  width: auto;
  padding: 1rem 2.5rem;
}

.confirmation-divider {
  width: 60px;
  height: 2px;
  background: var(--glass-border);
  margin: 2.5rem auto;
  animation: fadeInUp 0.5s 0.6s both;
}

.next-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.5s 0.7s both;
}

.btn-restart {
  animation: fadeInUp 0.5s 0.8s both;
  width: auto;
  padding: 1rem 2.5rem;
}

/* ---- NEXT RDV ---- */
.next-container {
  text-align: center;
  padding: 2rem 3rem;
  max-width: 90vw;
  width: 100%;
}

.next-title {
  font-size: 1.8rem;
  font-weight: 700;
  min-height: 2.5em;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--text), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  font-size: 1.8rem;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 6px 40px rgba(99,102,241,0.5);
  transition: all 0.3s;
  opacity: 0;
  transform: scale(0);
  letter-spacing: 0.05em;
}

.btn-go.visible {
  opacity: 1;
  transform: scale(1);
  animation: goPopIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-go:active {
  transform: scale(0.9);
}

.btn-go.pulse {
  animation: goPulse 2s infinite;
}

@keyframes goPopIn {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

@keyframes goPulse {
  0%, 100% { box-shadow: 0 6px 40px rgba(99,102,241,0.5); }
  50% { box-shadow: 0 6px 60px rgba(99,102,241,0.8), 0 0 0 15px rgba(99,102,241,0.1); }
}

.next-rdv-card {
  margin-top: 0;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.next-rdv-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.rdv-icon {
  color: var(--accent);
  margin-bottom: 1rem;
}

.rdv-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 2rem;
  min-height: 3em;
}

.rdv-address {
  font-weight: 700;
}

.rdv-contact {
  margin-bottom: 1.5rem;
  opacity: 0;
  transition: opacity 0.5s;
}

.rdv-contact.visible {
  opacity: 1;
}

.rdv-contact-name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}

.rdv-contact-role {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.rdv-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.rdv-actions .btn-primary {
  width: auto;
  padding: 0.9rem 2rem;
}

.rdv-actions .btn-secondary {
  padding: 0.9rem 2rem;
}

.btn-navigate {
  animation: fadeInUp 0.5s 0.3s both;
}

.btn-later {
  animation: fadeInUp 0.5s 0.5s both;
}

/* Responsive tablette paysage */
@media (min-width: 1024px) {
  .welcome-title { font-size: 2.6rem; }
  .section-title { font-size: 1.6rem; }
  textarea, .result-textarea { font-size: 1.15rem; }
  .loading-text { font-size: 1.5rem; }
  .confirmation-title { font-size: 2.2rem; }
  .rdv-text { font-size: 1.3rem; }
}

/* Responsive mobile */
@media (max-width: 600px) {
  .contacts-panel.open { width: 100%; }
  .contacts-header, .contacts-search, .contacts-group, .contacts-actions {
    min-width: unset;
  }
  .welcome-title { font-size: 1.6rem; }
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-card-light); border-radius: 4px; }

/* Contact item click on checkbox */
.contact-item { cursor: pointer; }
.contact-item.hidden { display: none; }
