/*!
 * WAY Bracelet Manager - Formulaire CSS
 * Design System WAY appliqué
 */

:root {
  --way-orange: #F0883F;
  --way-blue: #040750;
  --way-beige: #FCF1D6;
  --way-white: #FFFFFF;
  --way-line: #EDEDED;
  --way-orange-soft: #FFF4E8;
  --way-orange-hover: #E57B33;
  --way-gradient: linear-gradient(180deg, #F0883F 0%, #F6A14D 100%);
  --way-radius-xl: 24px;
  --way-radius-lg: 20px;
  --way-radius-md: 16px;
  --way-radius-sm: 12px;
  --way-radius-xs: 10px;
  --way-shadow-soft: 0 10px 25px rgba(0,0,0,0.08);
  --way-shadow-hover: 0 12px 28px rgba(0,0,0,0.10);
  --way-space-3: 16px;
  --way-space-4: 24px;
  --way-space-5: 32px;
}

/* Container principal */
.way-encoder-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  background: var(--way-beige);
}

/* Header du formulaire */
.way-encoder-header {
  background: var(--way-white);
  padding: var(--way-space-5);
  border-radius: var(--way-radius-lg);
  box-shadow: var(--way-shadow-soft);
  text-align: center;
  margin-bottom: var(--way-space-4);
}

.way-encoder-header h1 {
  color: var(--way-blue);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.way-subtitle {
  color: rgba(4, 7, 80, 0.75);
  margin: 0 0 12px 0;
}

.way-type-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.way-type-premium {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: var(--way-white);
}

.way-type-freemium {
  background: var(--way-orange-soft);
  color: var(--way-orange);
}

/* Sections du formulaire */
.way-form-section {
  background: var(--way-white);
  padding: var(--way-space-5);
  border-radius: var(--way-radius-lg);
  box-shadow: var(--way-shadow-soft);
  margin-bottom: var(--way-space-4);
}

.way-form-section h2 {
  color: var(--way-blue);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 var(--way-space-4) 0;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--way-orange);
}

/* Groupes de champs */
.way-form-group {
  margin-bottom: var(--way-space-4);
}

.way-form-group label {
  display: block;
  color: var(--way-blue);
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 15px;
}

.way-form-group label .required {
  color: var(--way-orange);
}

/* Inputs, selects, textarea */
.way-form input[type="text"],
.way-form input[type="email"],
.way-form input[type="tel"],
.way-form input[type="date"],
.way-form input[type="file"],
.way-form select,
.way-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--way-line);
  border-radius: var(--way-radius-xs);
  font-family: inherit;
  font-size: 15px;
  color: var(--way-blue);
  background: var(--way-white);
  transition: all 0.2s ease;
}

.way-form input:focus,
.way-form select:focus,
.way-form textarea:focus {
  outline: none;
  border-color: var(--way-orange);
  box-shadow: 0 0 0 3px rgba(240, 136, 63, 0.1);
}

.way-form textarea {
  min-height: 100px;
  resize: vertical;
}

/* Photo preview */
.way-current-photo {
  margin-top: 12px;
  text-align: center;
}

.way-current-photo img {
  max-width: 200px;
  border-radius: var(--way-radius-md);
  box-shadow: var(--way-shadow-soft);
}

.way-current-photo small {
  display: block;
  margin-top: 8px;
  color: rgba(4, 7, 80, 0.65);
}

/* Section premium */
.way-premium-section {
  background: linear-gradient(135deg, #FFF4E8 0%, #FFE8D1 100%);
  padding: var(--way-space-4);
  border-radius: var(--way-radius-md);
  border: 2px solid var(--way-orange);
  position: relative;
  margin-top: var(--way-space-4);
}

.way-premium-section::before {
  content: '⭐ PREMIUM';
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--way-orange);
  color: var(--way-white);
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.way-premium-section h3 {
  color: var(--way-blue);
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 16px 0;
}

/* Section géolocalisation */
.way-geoloc-section {
  background: linear-gradient(135deg, #E8F4FF 0%, #D1E9FF 100%);
  padding: var(--way-space-4);
  border-radius: var(--way-radius-md);
  border: 2px solid #2196F3;
  margin-top: var(--way-space-4);
}

.way-geoloc-section h3 {
  color: var(--way-blue);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px 0;
}

.way-radio-group {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.way-radio-label {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--way-white);
  border: 2px solid var(--way-line);
  border-radius: var(--way-radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.way-radio-label:hover {
  border-color: var(--way-orange);
  background: var(--way-orange-soft);
}

.way-radio-label input[type="radio"] {
  width: auto;
  margin-right: 10px;
  accent-color: var(--way-orange);
}

.way-radio-label input[type="radio"]:checked + span {
  font-weight: 700;
  color: var(--way-orange);
}

.way-info-box {
  background: #E3F2FD;
  padding: 16px;
  border-radius: var(--way-radius-xs);
  border-left: 4px solid #2196F3;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(4, 7, 80, 0.85);
}

#geoloc_numero_group {
  display: none;
  animation: slideDown 0.3s ease;
}

#geoloc_numero_group.show {
  display: block;
}

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

/* Consentements */
.way-consent-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--way-radius-xs);
  margin-bottom: 16px;
  transition: background-color 0.2s ease;
}

.way-consent-group:hover {
  background: #e9ecef;
}

.way-consent-group input[type="checkbox"] {
  width: auto;
  margin-top: 4px;
  accent-color: var(--way-orange);
}

.way-consent-group label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
  flex: 1;
}

/* Bouton de soumission */
.way-submit-btn {
  background: var(--way-gradient);
  color: var(--way-white);
  padding: 16px 48px;
  border: none;
  border-radius: var(--way-radius-md);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: var(--way-shadow-soft);
}

.way-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--way-shadow-hover);
}

.way-submit-btn:active {
  transform: translateY(0);
}

.way-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Messages d'erreur */
.way-error-message {
  background: #ffebee;
  color: #c62828;
  padding: 16px;
  border-radius: var(--way-radius-xs);
  border-left: 4px solid #c62828;
  margin-bottom: var(--way-space-4);
}

/* Responsive */
@media (max-width: 768px) {
  .way-encoder-container {
    padding: 12px;
    margin: 20px auto;
  }
  
  .way-encoder-header {
    padding: var(--way-space-4);
  }
  
  .way-encoder-header h1 {
    font-size: 24px;
  }
  
  .way-form-section {
    padding: var(--way-space-4);
  }
  
  .way-form-section h2 {
    font-size: 20px;
  }
  
  .way-radio-group {
    flex-direction: column;
  }
  
  .way-submit-btn {
    padding: 14px 32px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .way-encoder-header h1 {
    font-size: 20px;
  }
  
  .way-form-section h2 {
    font-size: 18px;
  }
  
  .way-form input,
  .way-form select,
  .way-form textarea {
    font-size: 14px;
    padding: 12px;
  }
}

