/* ============================================
   CONTACT RAPIDE & URGENCE - Joseph Pirrera
   ============================================ */

/* === BOUTON D'URGENCE FLOTTANT === */
.emergency-button {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: white;
  border-radius: 50px;
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.4);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: pulse-emergency 2s ease-in-out infinite;
}

.emergency-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 15px 50px rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, #991b1b, #7f1d1d);
}

.emergency-button:active {
  transform: translateY(-2px) scale(1.02);
}

.emergency-button .icon {
  width: 24px;
  height: 24px;
  animation: ring 1.5s ease-in-out infinite;
}

.emergency-button .text {
  display: none;
}

@keyframes pulse-emergency {
  0%, 100% {
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.4);
  }
  50% {
    box-shadow: 0 10px 40px rgba(220, 38, 38, 0.7), 0 0 0 10px rgba(220, 38, 38, 0.1);
  }
}

@keyframes ring {
  0%, 100% {
    transform: rotate(0deg);
  }
  10%, 30% {
    transform: rotate(-15deg);
  }
  20%, 40% {
    transform: rotate(15deg);
  }
  50% {
    transform: rotate(0deg);
  }
}

/* Version desktop avec texte */
@media (min-width: 640px) {
  .emergency-button .text {
    display: block;
  }
}

/* Version mobile - bouton plus compact */
@media (max-width: 639px) {
  .emergency-button {
    bottom: 16px;
    right: 16px;
    padding: 14px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    justify-content: center;
  }
  
  .emergency-button .icon {
    width: 28px;
    height: 28px;
  }
}

/* === FORMULAIRE DE CONTACT RAPIDE === */
.contact-form-section {
  background: linear-gradient(135deg, #003366 0%, #001F4D 100%);
  position: relative;
  overflow: hidden;
}

.contact-form-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #f8fafc;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #003366;
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 51, 102, 0.1);
}

.form-input:focus + .form-label,
.form-textarea:focus + .form-label,
.form-select:focus + .form-label {
  color: #003366;
}

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

.form-input.valid {
  border-color: #10b981;
  background: #f0fdf4;
}

.form-input.invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

/* Checkbox personnalisé */
.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.form-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-checkbox:checked {
  background: #003366;
  border-color: #003366;
}

.form-checkbox-label {
  font-size: 14px;
  color: #64748b;
  cursor: pointer;
  line-height: 1.5;
}

.form-checkbox-label a {
  color: #003366;
  text-decoration: underline;
}

/* Bouton de soumission */
.form-submit {
  width: 100%;
  padding: 16px 32px;
  background: linear-gradient(135deg, #F5A623, #CF8418);
  color: #001F4D;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.ripple:active::after {
  width: 200%;
  height: 200%;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(245, 166, 35, 0.4);
}

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

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Loader dans le bouton */
.form-submit .loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.form-submit.loading .loader {
  display: block;
}

.form-submit.loading .text {
  display: none;
}

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

/* Messages de succès/erreur */
.form-message {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
  display: block;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
  display: block;
}

/* Icônes dans les inputs */
.form-input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-group.valid .form-input-icon.success {
  opacity: 1;
  color: #10b981;
}

.form-group.invalid .form-input-icon.error {
  opacity: 1;
  color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-form-container {
    padding: 32px 24px;
    border-radius: 16px;
  }
  
  .form-submit {
    padding: 14px 24px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .contact-form-container {
    padding: 24px 16px;
  }
  
  .form-input,
  .form-textarea,
  .form-select {
    padding: 12px 14px;
    font-size: 15px;
  }
}

/* === BADGES D'INFORMATION === */
.contact-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #f1f5f9;
  border-radius: 50px;
  font-size: 14px;
  color: #334155;
  font-weight: 500;
}

.contact-badge svg {
  width: 18px;
  height: 18px;
  color: #F5A623;
}

/* Animation d'entrée du formulaire */
@keyframes slideUpForm {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-form-container.animated {
  animation: slideUpForm 0.6s ease-out;
}

/* Effet de focus sur le formulaire */
.form-group.focused .form-label {
  color: #003366;
  transform: translateY(-2px);
}

/* Indicateur de champ requis */
.form-label .required {
  color: #ef4444;
  margin-left: 4px;
}

/* Compteur de caractères pour textarea */
.char-counter {
  text-align: right;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.char-counter.warning {
  color: #f59e0b;
}

.char-counter.error {
  color: #ef4444;
}
