/* =========================================
   MÉDICIS - CHARTE GRAPHIQUE
   Questionnaire de Proust de l'Épargne
   ========================================= */

:root {
  /* Couleurs primaires */
  --medicis-blue: #005BA9;
  --medicis-orange: #E94E1B;
  --medicis-dark-blue: #003D6E;
  
  /* Couleurs secondaires */
  --medicis-light-blue: #E6F2F9;
  --medicis-grey: #F5F5F5;
  --medicis-text: #333333;
  
  /* États interactifs */
  --medicis-success: #28A745;
  --medicis-warning: #FFC107;
  --medicis-error: #DC3545;
}

/* ========================================= 
   RESET & BASE
   ========================================= */

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--medicis-text);
  background: var(--medicis-light-blue);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================= 
   TYPOGRAPHIE
   ========================================= */

h1, h2, h3 {
  font-family: 'Segoe UI Semibold', Arial, sans-serif;
  color: var(--medicis-dark-blue);
  font-weight: 600;
  margin-bottom: 16px;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p {
  margin-bottom: 12px;
}

.subtitle {
  font-size: 18px;
  color: var(--medicis-blue);
  font-weight: 500;
  margin-bottom: 24px;
}

.hint {
  font-size: 14px;
  color: #666;
  font-style: italic;
  margin-top: 12px;
}

/* ========================================= 
   LAYOUT
   ========================================= */

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* ========================================= 
   LOGO
   ========================================= */

.logo {
  text-align: center;
  font-size: 48px;
  font-weight: 700;
  color: var(--medicis-blue);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* ========================================= 
   CARDS
   ========================================= */

.card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 20px;
}

/* ========================================= 
   INPUTS
   ========================================= */

label {
  display: block;
  font-weight: 600;
  color: var(--medicis-dark-blue);
  margin-bottom: 8px;
  font-size: 16px;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #DDD;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--medicis-blue);
  box-shadow: 0 0 0 3px rgba(0, 91, 169, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="text"]:disabled {
  background: var(--medicis-grey);
  cursor: not-allowed;
}

/* ========================================= 
   BUTTONS
   ========================================= */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
}

.btn-primary {
  background: var(--medicis-blue);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 91, 169, 0.3);
}

.btn-primary:hover {
  background: var(--medicis-dark-blue);
  box-shadow: 0 4px 12px rgba(0, 91, 169, 0.5);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 91, 169, 0.3);
}

.btn-primary:disabled {
  background: #CCC;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-secondary {
  background: var(--medicis-orange);
  color: white;
  box-shadow: 0 2px 8px rgba(233, 78, 27, 0.3);
}

.btn-secondary:hover {
  background: #D13C0F;
  box-shadow: 0 4px 12px rgba(233, 78, 27, 0.5);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(233, 78, 27, 0.3);
}

.btn-back {
  background: transparent;
  color: var(--medicis-blue);
  padding: 8px 16px;
  font-size: 14px;
  border: 2px solid var(--medicis-blue);
  margin-bottom: 16px;
}

.btn-back:hover {
  background: var(--medicis-light-blue);
}

.btn-full-width {
  width: 100%;
  margin-top: 16px;
}

/* ========================================= 
   PROGRESS BAR
   ========================================= */

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--medicis-light-blue);
  border-radius: 4px;
  overflow: hidden;
  margin: 20px 0 12px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--medicis-blue), var(--medicis-orange));
  transition: width 0.4s ease;
  border-radius: 4px;
}

.progress-text {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--medicis-blue);
  margin-bottom: 20px;
}

/* ========================================= 
   NAVIGATION
   ========================================= */

.navigation {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.navigation .btn {
  flex: 1;
}

/* ========================================= 
   SAVE STATUS
   ========================================= */

.save-status {
  font-size: 14px;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  text-align: center;
  transition: all 0.3s ease;
}

.save-status.saving {
  background: var(--medicis-light-blue);
  color: var(--medicis-blue);
}

.save-status.saved {
  background: #E8F5E9;
  color: var(--medicis-success);
}

.save-status.error {
  background: #FFEBEE;
  color: var(--medicis-error);
}

/* ========================================= 
   HIGHLIGHT BOX
   ========================================= */

.highlight {
  background: var(--medicis-light-blue);
  border-left: 4px solid var(--medicis-orange);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-size: 16px;
}

.highlight strong {
  color: var(--medicis-dark-blue);
}

/* ========================================= 
   RESPONSIVE
   ========================================= */

@media (max-width: 640px) {
  .container {
    padding: 16px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  .logo {
    font-size: 36px;
  }
  
  .card {
    padding: 20px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 15px;
  }
  
  .navigation {
    flex-direction: column;
  }
}

/* =========================================
   UTILITIES
   ========================================= */

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mt-2 {
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

/* =========================================
   MODAL
   ========================================= */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 12px;
  padding: 32px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

#responses-list {
  margin: 24px 0;
}

.response-item {
  background: var(--medicis-light-blue);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  border-left: 4px solid var(--medicis-blue);
}

.response-item h4 {
  color: var(--medicis-dark-blue);
  font-size: 16px;
  margin-bottom: 8px;
}

.response-item p {
  color: var(--medicis-text);
  margin-bottom: 0;
}
