/* ==========================================================================
   AMGLC CONGRÈS MÉDICAL CONSTANTINE 2026 - STYLES ÉVALUATION DU CONGRÈS
   Design: Mobile-First, Tactile, Anti-UI-Slop & High Contrast
   Optimisé pour smartphones (iOS / Android) & Écrans
   ========================================================================== */

:root {
  --fb-bg: #040814;
  --fb-card: rgba(10, 18, 38, 0.92);
  --fb-card-active: rgba(15, 27, 56, 0.98);
  --fb-border: rgba(255, 255, 255, 0.1);
  --fb-border-focus: rgba(56, 189, 248, 0.5);
  
  --fb-cyan: #0284c7;
  --fb-cyan-light: #38bdf8;
  --fb-emerald: #10b981;
  --fb-emerald-light: #34d399;
  --fb-amber: #f59e0b;
  --fb-amber-light: #fbbf24;
  --fb-rose: #f43f5e;
  
  --fb-text: #f8fafc;
  --fb-text-muted: #94a3b8;
  --fb-text-dim: #64748b;
  
  --fb-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fb-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --fb-radius-sm: 8px;
  --fb-radius-md: 14px;
  --fb-radius-lg: 20px;
  --fb-radius-full: 9999px;
  
  --fb-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--fb-border);
}

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

body {
  font-family: var(--fb-font-body);
  background-color: var(--fb-bg);
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(245, 158, 11, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, #040814 0%, #081126 100%);
  background-attachment: fixed;
  color: var(--fb-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 90px; /* Espace pour la barre fixe du bas */
}

/* Header */
.feedback-header {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(4, 8, 20, 0.92);
  border-bottom: 1px solid var(--fb-border);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--fb-cyan-light);
  background: #ffffff;
  padding: 2px;
  object-fit: contain;
}

.header-titles h1 {
  font-family: var(--fb-font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.header-titles .sub {
  font-size: 0.76rem;
  color: var(--fb-cyan-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-back-quiz {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--fb-border);
  color: #ffffff;
  padding: 7px 14px;
  border-radius: var(--fb-radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-back-quiz:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Sticky Progress Bar */
.sticky-progress-wrap {
  position: sticky;
  top: 73px;
  z-index: 35;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 15, 32, 0.94);
  border-bottom: 1px solid var(--fb-border);
  padding: 8px 20px;
}

.sticky-progress-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.progress-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fb-text-muted);
}

.progress-label strong {
  color: var(--fb-amber-light);
}

.progress-track {
  flex: 1;
  max-width: 320px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
  border-radius: 9999px;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Main Container */
.feedback-main {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Intro Hero */
.feedback-hero-card {
  background: var(--fb-card);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-lg);
  padding: 24px;
  box-shadow: var(--fb-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.feedback-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #10b981);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--fb-amber-light);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--fb-radius-full);
  align-self: flex-start;
}

.hero-title {
  font-family: var(--fb-font-heading);
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.hero-sub {
  font-size: 0.94rem;
  color: var(--fb-text-muted);
  line-height: 1.5;
}

/* Doctor Identity Section */
.doctor-info-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doctor-info-box label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fb-cyan-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doctor-input-row {
  display: flex;
  gap: 10px;
}

.doctor-input {
  flex: 1;
  background: rgba(4, 8, 20, 0.8);
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-family: var(--fb-font-body);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s;
}

.doctor-input:focus {
  border-color: var(--fb-cyan-light);
}

/* Legend Pill */
.scale-legend-card {
  background: rgba(14, 25, 52, 0.7);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--fb-text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-item strong {
  color: #ffffff;
}

/* Criteria Cards */
.criteria-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.criterion-card {
  background: var(--fb-card);
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-md);
  padding: 18px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.criterion-card.answered {
  border-color: rgba(56, 189, 248, 0.45);
  background: var(--fb-card-active);
}

.criterion-card.answered.rate-5 {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.criterion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.criterion-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.criterion-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--fb-border);
  color: var(--fb-cyan-light);
  font-family: var(--fb-font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.criterion-card.answered .criterion-number {
  background: var(--fb-emerald);
  color: #040814;
  border-color: var(--fb-emerald);
}

.criterion-text-box h3 {
  font-family: var(--fb-font-heading);
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.3;
}

.criterion-text-box p {
  font-size: 0.84rem;
  color: var(--fb-text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.criterion-state-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fb-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.criterion-card.answered .criterion-state-badge {
  background: rgba(16, 185, 129, 0.18);
  color: var(--fb-emerald-light);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Rating 1 to 5 Buttons (Touch-Friendly) */
.star-rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 2px;
}

.star-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-sm);
  padding: 12px 6px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  color: var(--fb-text-muted);
}

.star-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.star-btn:active {
  transform: scale(0.94);
}

.star-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: all 0.2s;
}

.star-val {
  font-family: var(--fb-font-heading);
  font-size: 0.85rem;
  font-weight: 800;
}

/* Highlighted and Selected Stars */
.star-btn.highlighted,
.star-btn.selected {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--fb-amber-light);
}

.star-btn.highlighted .star-icon,
.star-btn.selected .star-icon {
  fill: var(--fb-amber-light);
  stroke: var(--fb-amber);
}

.star-btn.selected {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.3) 0%, rgba(217, 119, 6, 0.2) 100%);
  border-color: var(--fb-amber);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35);
  transform: scale(1.04);
}

/* Dynamic Verbal Feedback */
.verbal-rating-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--fb-amber-light);
  text-align: center;
  min-height: 18px;
  transition: all 0.2s;
}

/* Remarks Section */
.remarks-card {
  background: var(--fb-card);
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.remarks-card label {
  font-family: var(--fb-font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.remarks-textarea {
  width: 100%;
  min-height: 95px;
  background: rgba(4, 8, 20, 0.8);
  border: 1.5px solid var(--fb-border);
  border-radius: var(--fb-radius-sm);
  padding: 12px 14px;
  color: #ffffff;
  font-family: var(--fb-font-body);
  font-size: 0.92rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.remarks-textarea:focus {
  border-color: var(--fb-cyan-light);
}

/* Fixed Bottom Submit Bar */
.fixed-submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  background: rgba(4, 8, 20, 0.95);
  border-top: 1px solid var(--fb-border);
  padding: 12px 20px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
}

.submit-bar-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.submit-hint {
  flex: 1;
  font-size: 0.82rem;
  color: var(--fb-text-muted);
  line-height: 1.35;
}

.btn-submit-feedback {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: #ffffff;
  font-family: var(--fb-font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 14px 28px;
  border-radius: var(--fb-radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-submit-feedback:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  filter: grayscale(0.6);
}

.btn-submit-feedback.ready {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.45);
  animation: pulseSubmit 2s infinite;
}

@keyframes pulseSubmit {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Success View */
.success-card {
  background: var(--fb-card);
  border: 1.5px solid var(--fb-emerald);
  border-radius: var(--fb-radius-lg);
  padding: 40px 24px;
  box-shadow: 0 0 50px rgba(16, 185, 129, 0.25);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeInUp 0.4s ease-out;
}

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

.success-icon-giant {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.16);
  border: 2px solid var(--fb-emerald);
  color: var(--fb-emerald-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-title {
  font-family: var(--fb-font-heading);
  font-size: 1.85rem;
  font-weight: 900;
  color: #ffffff;
}

.success-desc {
  font-size: 1.05rem;
  color: var(--fb-text-muted);
  max-width: 520px;
  line-height: 1.5;
}

.score-recap-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  padding: 10px 24px;
  border-radius: var(--fb-radius-full);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fb-font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--fb-amber-light);
}

.success-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--fb-border);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--fb-radius-full);
  font-family: var(--fb-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

