/* Styles améliorés pour les formulaires */
.form-container {
  background: linear-gradient(135deg, rgba(255,255,255,0.95) 0%, rgba(240,248,255,0.95) 100%);
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 3rem;
  margin: 2.5rem auto;
  max-width: 800px;
  transition: all 0.3s ease;
}

.form-container:hover {
  box-shadow: 0 15px 50px rgba(0,0,0,0.2);
  transform: translateY(-5px);
}

.form-title {
  color: var(--primary-color);
  font-size: 2.2rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  font-weight: 700;
}

.form-title:after {
  content: '';
  display: block;
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 1rem auto 0;
  border-radius: 3px;
}

.form-group {
  margin-bottom: 2rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--dark-gray);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background-color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.2);
  outline: none;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #b0b0b0;
}

.form-group .input-icon {
  position: absolute;
  top: 3rem;
  right: 1.2rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.form-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
}

.form-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.form-step:not(:last-child):after {
  content: '';
  position: absolute;
  top: 1.2rem;
  right: -50%;
  width: 100%;
  height: 3px;
  background-color: #e0e0e0;
  z-index: 1;
}

.form-step.active:not(:last-child):after,
.form-step.completed:not(:last-child):after {
  background-color: var(--primary-color);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.form-step.active .step-number,
.form-step.completed .step-number {
  background-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(46, 139, 87, 0.3);
}

.form-step.completed .step-number:before {
  content: '✓';
}

.step-title {
  font-size: 1rem;
  color: var(--dark-gray);
  transition: all 0.3s ease;
  font-weight: 500;
}

.form-step.active .step-title {
  color: var(--primary-color);
  font-weight: 700;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
}

.btn-form {
  padding: 1rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-form-prev {
  background-color: #f0f0f0;
  color: var(--dark-gray);
}

.btn-form-prev:hover {
  background-color: #e0e0e0;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.btn-form-next,
.btn-form-submit {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: white;
}

.btn-form-next:hover,
.btn-form-submit:hover {
  background: linear-gradient(90deg, var(--primary-dark), var(--secondary-dark));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.3);
}

.form-result {
  background: linear-gradient(135deg, rgba(240,255,240,0.95) 0%, rgba(230,248,255,0.95) 100%);
  border-radius: 15px;
  padding: 2.5rem;
  margin-top: 2.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  animation: fadeIn 0.6s ease-out;
}

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

.result-title {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.result-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-weight: 600;
  color: var(--dark-gray);
  font-size: 1.1rem;
}

.result-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 1.1rem;
}

.result-total {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 3px dashed rgba(0,0,0,0.1);
  font-size: 1.4rem;
}

/* Styles pour les messages d'erreur et de validation */
.form-message {
  padding: 1rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  font-weight: 600;
  animation: slideIn 0.4s ease-out;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

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

.form-message.success {
  background-color: rgba(46, 204, 113, 0.15);
  border-left: 5px solid #2ecc71;
  color: #27ae60;
}

.form-message.error {
  background-color: rgba(231, 76, 60, 0.15);
  border-left: 5px solid #e74c3c;
  color: #c0392b;
}

.form-message.info {
  background-color: rgba(52, 152, 219, 0.15);
  border-left: 5px solid #3498db;
  color: #2980b9;
}

/* Styles pour les champs avec validation */
.form-group.valid input {
  border-color: #2ecc71;
  box-shadow: 0 3px 10px rgba(46, 204, 113, 0.1);
}

.form-group.invalid input {
  border-color: #e74c3c;
  box-shadow: 0 3px 10px rgba(231, 76, 60, 0.1);
}

.validation-icon {
  position: absolute;
  top: 3rem;
  right: 1.2rem;
  font-size: 1.2rem;
}

.form-group.valid .validation-icon:before {
  content: '✓';
  color: #2ecc71;
}

.form-group.invalid .validation-icon:before {
  content: '✗';
  color: #e74c3c;
}

.validation-message {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: #e74c3c;
  animation: fadeIn 0.4s ease-out;
  font-weight: 500;
}

/* Styles pour les formulaires responsives */
@media (max-width: 768px) {
  .form-container {
    padding: 2rem;
    margin: 1.5rem;
  }
  
  .form-title {
    font-size: 1.8rem;
  }
  
  .form-steps {
    flex-direction: column;
    margin-bottom: 2rem;
  }
  
  .form-step {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
  }
  
  .form-step:not(:last-child):after {
    display: none;
  }
  
  .step-number {
    margin-bottom: 0;
    margin-right: 1rem;
  }
  
  .form-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .btn-form {
    width: 100%;
  }
}

/* Styles pour l'espace administrateur */
.admin-body {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
  min-height: 100vh;
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
}

.admin-login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: url('../img/admin-bg.jpg') no-repeat center center/cover;
  position: relative;
}

.admin-login-container:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(46, 139, 87, 0.85) 0%, rgba(70, 130, 180, 0.85) 100%);
}

.admin-login-box {
  background: rgba(255, 255, 255, 0.97);
  border-radius: 15px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 3.5rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  animation: fadeIn 0.6s ease-out;
}

.admin-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-logo img {
  height: 70px;
  margin-bottom: 1.2rem;
}

.admin-logo h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin: 0;
  font-weight: 700;
}

.admin-login-form {
  margin-bottom: 2.5rem;
}

.admin-login-form .form-group {
  margin-bottom: 2rem;
}

.admin-login-form label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--dark-gray);
  font-size: 1.1rem;
}

.admin-login-form input {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background-color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.admin-login-form input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(46, 139, 87, 0.2);
  outline: none;
}

.form-submit {
  margin-top: 2.5rem;
}

.form-submit button {
  width: 100%;
  padding: 1.2rem;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 20px rgba(46, 139, 87, 0.3);
}

.form-submit button:hover {
  background: linear-gradient(90deg, var(--primary-dark), var(--secondary-dark));
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(46, 139, 87, 0.4);
}

.admin-login-footer {
  text-align: center;
  font-size: 1rem;
  color: var(--dark-gray);
  margin-top: 2rem;
}

.admin-login-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
}

.admin-login-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.login-error {
  background-color: rgba(231, 76, 60, 0.15);
  border-left: 5px solid #e74c3c;
  color: #c0392b;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  margin-top: 1.5rem;
  font-weight: 600;
  animation: slideIn 0.4s ease-out;
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.1);
}

.shake {
  animation: shake 0.6s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(4px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Dashboard styles */
.admin-dashboard {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 1.2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header-logo {
  display: flex;
  align-items: center;
}

.admin-header-logo img {
  height: 45px;
  margin-right: 1.2rem;
}

.admin-header-logo h1 {
  font-size: 1.6rem;
  color: var(--primary-color);
  margin: 0;
  font-weight: 700;
}

.admin-header-user {
  display: flex;
  align-items: center;
}

.admin-user-name {
  margin-right: 1.2rem;
  font-weight: 700;
  color: var(--dark-gray);
  font-size: 1.1rem;
}

.btn-outline-small {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: transparent;
  color: var(--primary-color);
  font-weight: 700;
  border: 2px solid var(--primary-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline-small:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 139, 87, 0.2);
}

.admin-content {
  display: flex;
  flex: 1;
}

.admin-sidebar {
  width: 280px;
  background: white;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 0;
}

.admin-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-nav-item {
  padding: 1.2rem 2.5rem;
  display: flex;
  align-items: center;
  color: var(--dark-gray);
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 5px solid transparent;
  font-size: 1.1rem;
}

.admin-nav-item i {
  margin-right: 1.2rem;
  font-size: 1.3rem;
}

.admin-nav-item:hover {
  background: rgba(46, 139, 87, 0.08);
  color: var(--primary-color);
}

.admin-nav-item.active {
  background: rgba(46, 139, 87, 0.12);
  color: var(--primary-color);
  font-weight: 700;
  border-left-color: var(--primary-color);
}

.admin-main {
  flex: 1;
  padding: 2.5rem;
  background: #f9f9f9;
  overflow-y: auto;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.admin-section-header {
  margin-bottom: 2.5rem;
}

.admin-section-header h2 {
  font-size: 2rem;
  color: var(--dark-gray);
  margin-bottom: 0.8rem;
  font-weight: 700;
}

.admin-section-header p {
  color: #777;
  margin: 0;
  font-size: 1.1rem;
}

.admin-section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-search {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.admin-search input {
  padding: 1rem 1.2rem;
  border: none;
  outline: none;
  width: 320px;
  font-size: 1.1rem;
}

.btn-icon {
  background: transparent;
  border: none;
  padding: 1rem;
  cursor: pointer;
  color: var(--dark-gray);
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.btn-icon:hover {
  color: var(--primary-color);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.admin-stat-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.admin-stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  background: rgba(46, 139, 87, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
}

.stat-icon i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.stat-content h3 {
  font-size: 1rem;
  color: #777;
  margin: 0 0 0.8rem 0;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--dark-gray);
  margin: 0;
}

.stat-period {
  font-size: 0.9rem;
  color: #999;
  margin: 0.5rem 0 0 0;
}

.admin-recent-activity {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.admin-recent-activity h3 {
  font-size: 1.4rem;
  color: var(--dark-gray);
  margin: 0 0 2rem 0;
  font-weight: 700;
}

.admin-activity-item {
  display: flex;
  align-items: flex-start;
  padding: 1.2rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.admin-activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: rgba(46, 139, 87, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.2rem;
  flex-shrink: 0;
}

.activity-icon i {
  font-size: 1.4rem;
  color: var(--primary-color);
}

.activity-content {
  flex: 1;
}

.activity-text {
  margin: 0 0 0.5rem 0;
  color: var(--dark-gray);
  font-size: 1.05rem;
}

.activity-time {
  font-size: 0.9rem;
  color: #999;
  margin: 0;
}

.admin-table-container {
  background: white;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  overflow-x: auto;
  margin-bottom: 2rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 1.2rem;
  font-weight: 700;
  color: var(--dark-gray);
  border-bottom: 2px solid #f0f0f0;
  font-size: 1.05rem;
}

.admin-table td {
  padding: 1.2rem;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  font-size: 1.05rem;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(46, 139, 87, 0.05);
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.status-badge.new {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.status-badge.in-progress {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

.status-badge.converted {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.actions-cell {
  white-space: nowrap;
}

.admin-pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.pagination-btn {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.4rem;
  background: white;
  border: 1px solid #e0e0e0;
  color: var(--dark-gray);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  font-weight: 600;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(46, 139, 87, 0.1);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 139, 87, 0.15);
}

.pagination-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(46, 139, 87, 0.25);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

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

/* Responsive admin dashboard */
@media (max-width: 992px) {
  .admin-content {
    flex-direction: column;
  }
  
  .admin-sidebar {
    width: 100%;
    padding: 1.2rem 0;
  }
  
  .admin-nav-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 1.2rem;
  }
  
  .admin-nav-item {
    padding: 1rem 1.5rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 4px solid transparent;
  }
  
  .admin-nav-item.active {
    border-left-color: transparent;
    border-bottom-color: var(--primary-color);
  }
  
  .admin-main {
    padding: 2rem;
  }
  
  .admin-stats-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
  }
  
  .admin-header-logo {
    margin-bottom: 1.2rem;
  }
  
  .admin-section-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .admin-search {
    width: 100%;
    margin-bottom: 1.2rem;
  }
  
  .admin-search input {
    width: 100%;
  }
  
  .admin-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-login-box {
    padding: 2.5rem;
    margin: 1.2rem;
  }
}
