/* wwwroot/css/site.css */
:root {
  /* Palette principale plus harmonieuse */
  --primary-color: #ff6b35;      /* Orange clair chaleureux */
  --primary-dark: #e85d2e;       /* Version plus foncée */
  --primary-light: #ffad90;      /* Version plus claire */

  /* Couleurs secondaires */
  --secondary-color: #ffd166;    /* Jaune œuf */
  --accent-color: #27ae60;       /* Vert printanier */

  /* Couleurs neutres */
  --background-color: #fff8f0;   /* Fond crème très clair */
  --card-bg: #ffffff;            /* Blanc pour les cartes */
  --text-color: #2d3142;         /* Texte principal bleu foncé */
  --text-light: #5c5f73;         /* Texte secondaire */

  /* Éléments d'interface */
  --success-color: #4caf50;      /* Vert pour les confirmations */
  --info-color: #0086c3;         /* Bleu info cohérent avec le thème */
  --warning-color: #ffb74d;      /* Orange pour les avertissements */
  --danger-color: #e74c3c;       /* Rouge pour les erreurs */

  /* Styles communs */
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  --hover-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --transition: all 0.3s ease;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 100px; /* Espace pour le footer */
  font-family: 'Nunito', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='egg-pattern' x='0' y='0' width='100' height='100' patternUnits='userSpaceOnUse'%3E%3Cg fill='%23ff6b35' fill-opacity='0.04'%3E%3Cpath d='M25 15c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M55 15c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M85 15c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M10 40c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M40 40c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M70 40c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M25 65c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M55 65c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M85 65c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M10 90c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M40 90c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3Cpath d='M70 90c0 2.5-2 4.5-4.5 4.5s-4.5-2-4.5-4.5c0-3.5 2-8 4.5-8s4.5 4.5 4.5 8z'/%3E%3C/g%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23egg-pattern)' /%3E%3C/svg%3E");
  background-attachment: fixed;
  background-size: 100px 100px; /* Taille exacte du motif */
  background-repeat: repeat; /* Répétition dans toutes les directions */
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--text-color); /* Changé pour meilleur contraste */
}

.display-4, h1, h2 {
  color: var(--primary-dark); /* Distinction visuelle pour titres principaux */
}

/* Styles de l'en-tête et de la navigation */
.navbar {
  padding: 0.8rem 1rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: white !important;
  letter-spacing: 0.5px;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.navbar-dark .navbar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* Styles des formulaires */
.form-group {
  margin-bottom: 1.8rem;
}

/* Couleurs spécifiques pour les en-têtes de cartes de statut d'inscription */
.card-header.bg-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
}

.form-label {
  font-weight: 600;
  color: var(--text-color); /* Changé pour meilleur contraste */
  margin-bottom: 0.5rem;
}

.form-control, .input-group {
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
}

.form-control {
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  font-size: 1rem;
  background-color: #fff;
}

.input-group-text {
  background-color: #f5f5f5; /* Neutre pour éviter les conflits */
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: var(--text-color);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-text {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Styles des boutons */
.btn {
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
}

.btn-primary:hover, .btn-primary:focus {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-dark));
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.btn-success {
  background: linear-gradient(135deg, var(--success-color), #2e7d32);
  color: white;
}

.btn-success:hover, .btn-success:focus {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

/* Style modifié pour les boutons outline */
.btn-outline-primary {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid white;
  backdrop-filter: blur(4px);
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
  border-color: white;
}

/* Styles des cartes */
.card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
  overflow: hidden;
  background-color: var(--card-bg);
  transition: var(--transition);
}

/* Suppression de l'effet d'ombre au survol */
.card:hover {
  box-shadow: var(--card-shadow);
}

.card-header {
  background-color: #f8f8f8; /* Fond neutre */
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.card-header .step-number + h3 {
  color: var(--text-color); /* Assure un bon contraste */
}

.card-body {
  padding: 1.8rem;
}

/* Styles de badge */
.badge {
  padding: 0.5rem 0.8rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-primary.p-2 {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.bg-success {
  background-color: var(--success-color) !important;
}

/* Styles spécifiques pour les icônes de succès dans les cercles */
.rounded-circle.bg-success.bg-opacity-10 {
  background-color: rgba(76, 175, 80, 0.15) !important;
}

.text-success.fs-1 {
  color: var(--success-color) !important;
}

.bg-info {
  background-color: var(--info-color) !important;
}

/* Styles pour les tranches d'âge */
.form-check.card {
  padding: 1.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.form-check.card:hover {
  background-color: rgba(255, 107, 53, 0.03);
}

.form-check.card.border-primary {
  border-color: var(--primary-color);
  background-color: rgba(255, 107, 53, 0.05);
}

/* Styles des icônes */
.text-danger {
  color: #ff5a5f !important; /* Rouge plus vif et harmonieux */
}

.text-success {
  color: var(--accent-color) !important; /* Vert cohérent */
}

.text-warning {
  color: var(--secondary-color) !important; /* Jaune cohérent */
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--text-color) !important;
}

/* Indicateur d'étapes */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  font-weight: 700;
  margin-right: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Styles d'alerte */
.alert {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 1.2rem;
}

.alert-info {
  background-color: rgba(0, 134, 195, 0.1);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

.alert-success {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-danger {
  background-color: rgba(231, 76, 60, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

/* Styles pour le badge d'attente */
.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #212529;
}

/* Page de confirmation */
.confirmation-page {
  padding: 2rem 0;
}

.confirmation-icon {
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Styles du pied de page */
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  line-height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer .container {
  color: rgba(255, 255, 255, 0.9);
}

/* Animations et transitions */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.3s; }
.delay-3 { transition-delay: 0.5s; }

/* Style des messages de validation */
.validation-message {
  display: block;
  color: var(--danger-color);
  font-size: 0.85rem;
  margin-top: 0.4rem;
  font-weight: 600;
}

/* Ajustements mobiles */
@media (max-width: 767.98px) {
  .card-body {
    padding: 1.2rem;
  }

  .d-md-flex {
    margin-top: 1rem;
  }

  h1.display-4 {
    font-size: 2.5rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Accessibilité */
:focus {
  outline: 3px solid rgba(255, 107, 53, 0.5);
  outline-offset: 2px;
}

/* Styles d'images */
img.rounded {
  border-radius: var(--border-radius);
  transition: transform 0.3s ease;
}

img.rounded:hover {
  transform: scale(1.02);
}

/* Corrections spécifiques pour l'harmonisation */
.bg-light {
  background-color: #f9f9f9 !important;
}

/* Uniformisation des boutons d'information */
.bi-info-circle, .bi-info-circle-fill {
  color: var(--info-color);
}

/* Éléments PMR */
.bg-primary.bg-opacity-10 {
  background-color: rgba(255, 107, 53, 0.1) !important;
}

/* Améliorations des cartes de sélection */
.card .form-check-input {
  border-color: var(--primary-color);
  width: 1.2rem;
  height: 1.2rem;
}

.card .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Correction pour le récapitulatif */
.card.bg-light .bi {
  color: var(--primary-color);
}

.card.bg-light h5 {
  color: var(--text-color);
}