/**
 * GEDCOM Studio - Styles CSS
 * Interface moderne pour l'analyseur GEDCOM
 */

/* ==================== VARIABLES CSS ==================== */
:root {
  --primary-color: #a76107;
  --secondary-color: #2c3e50;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --error-color: #e74c3c;
  --info-color: #3498db;
  
  --bg-light: #f8f9fa;
  --bg-dark: #2c3e50;
  --text-light: #666;
  --text-dark: #333;
  --border-color: #ddd;
  
  --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
  --shadow-heavy: 0 8px 30px rgba(0,0,0,0.2);
  
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

/* ==================== HERO SECTION (conservée) ==================== */
.hero {
  position: relative;
  background: url('/mediasite/hero.webp') no-repeat center center;
  background-size: cover;
  color: white;
  padding: 4rem 0;
  text-align: center;
  border-bottom: 3px solid var(--primary-color);
  height: 300px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-description {
  font-size: 1.2rem;
  margin: 0;
  line-height: 1.6;
  max-width: 800px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* ==================== GÉNÉRAL ==================== */
.gedcom-content {
  min-height: 80vh;
  padding: 2rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.gedcom-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hidden {
  display: none !important;
}

.active {
  display: block;
}

/* ==================== MESSAGES ==================== */
.error-message {
  background: var(--error-color);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  font-weight: 500;
  box-shadow: var(--shadow-light);
  animation: slideDown 0.3s ease;
}

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

/* ==================== LOADING ==================== */
.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  margin: 2rem 0;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-message {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0;
}

/* ==================== BARRE DE PROGRESSION AVANCÉE ==================== */
.progress-container {
  width: 100%;
  max-width: 800px;
}

.progress-header {
  text-align: center;
  margin-bottom: 2rem;
}

.progress-header h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: var(--text-dark);
}

#progress-message {
  color: var(--text-light);
  font-size: 1rem;
  margin: 0;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 25px;
  left: 25px;
  right: 25px;
  height: 2px;
  background: #e0e0e0;
  z-index: 1;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  transition: var(--transition);
  border: 3px solid #e0e0e0;
}

.step-label {
  font-size: 0.8rem;
  color: var(--text-light);
  text-align: center;
  font-weight: 500;
}

.progress-step.active .step-icon {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  animation: pulse 1.5s infinite;
}

.progress-step.completed .step-icon {
  background: var(--success-color);
  color: white;
  border-color: var(--success-color);
}

.progress-step.completed .step-label {
  color: var(--success-color);
  font-weight: 600;
}

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

.progress-bar-container {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0%;
}

.progress-percentage {
  position: absolute;
  top: -30px;
  right: 0;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.9rem;
}

/* ==================== SECTION UPLOAD ==================== */
.upload-section {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
  margin: 2rem 0;
}

.upload-intro {
  padding: 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), #c87f0a);
  color: white;
}

.upload-intro h2 {
  margin: 0 0 0.5rem 0;
  font-size: 2rem;
  font-weight: 700;
}

.upload-intro p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

.upload-area {
  padding: 3rem 2rem;
  border: 3px dashed var(--border-color);
  margin: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg-light);
}

.upload-area:hover,
.upload-area.drag-over {
  border-color: var(--primary-color);
  background: rgba(167, 97, 7, 0.05);
  transform: translateY(-2px);
}

.upload-content .upload-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.upload-content h3 {
  margin: 0 0 1rem 0;
  color: var(--text-dark);
  font-size: 1.5rem;
}

.upload-content p {
  margin: 0 0 1rem 0;
  color: var(--text-light);
}

.upload-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.upload-btn:hover {
  background: #8b5406;
  transform: translateY(-1px);
}

.upload-content small {
  color: var(--text-light);
  font-size: 0.9rem;
}

.upload-info {
  padding: 2rem;
  background: var(--bg-light);
}

.upload-info h3 {
  margin: 0 0 1rem 0;
  color: var(--text-dark);
}

.upload-info ul {
  margin: 0;
  padding-left: 1.5rem;
}

.upload-info li {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.upload-info strong {
  color: var(--text-dark);
}

/* ==================== SECTION RÉSULTATS ==================== */
.results-section {
  margin: 2rem 0;
}

.file-info {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  padding: 2.5rem;
  margin-bottom: 2rem;
  border: 2px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.file-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--success-color), var(--primary-color), var(--info-color));
}

.file-info h2 {
  margin: 0 0 2rem 0;
  color: var(--success-color);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.info-item {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.info-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border-color: var(--primary-color);
}

.info-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
}

.info-item:nth-child(1)::before { background: #27ae60; }
.info-item:nth-child(2)::before { background: #3498db; }
.info-item:nth-child(3)::before { background: #9b59b6; }
.info-item:nth-child(4)::before { background: #e74c3c; }

.info-label {
  font-weight: 600;
  color: #6c757d;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  display: block;
}

.info-value {
  font-weight: 800;
  color: #2c3e50;
  font-size: 2rem;
  line-height: 1;
  display: block;
}

.file-actions {
  text-align: center;
  padding-top: 1rem;
}

.file-actions .btn {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3);
}

.file-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 117, 125, 0.4);
  background: linear-gradient(135deg, #495057 0%, #343a40 100%);
}

/* ==================== SÉLECTION D'OUTILS ==================== */
.tool-selection {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  padding: 2rem;
  margin-bottom: 2rem;
}

.tool-selection h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text-dark);
  font-size: 1.8rem;
}

.tool-selection p {
  margin: 0 0 2rem 0;
  color: var(--text-light);
  font-size: 1.1rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-select-btn {
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none;
}

.tool-select-btn:not(.disabled):hover {
  border-color: var(--primary-color);
  transform: translateY(-4px);
  box-shadow: var(--shadow-heavy);
}

.tool-select-btn.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8f9fa;
}

.tool-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.tool-select-btn h3 {
  margin: 0 0 1rem 0;
  color: var(--text-dark);
  font-size: 1.3rem;
}

.tool-select-btn p {
  margin: 0 0 1rem 0;
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
}

.tool-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-status.available {
  background: var(--success-color);
  color: white;
}

.tool-status.coming-soon {
  background: var(--warning-color);
  color: white;
}

/* ==================== CONTENU OUTIL ==================== */
.tool-content {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  overflow: hidden;
}

.tool-header {
  background: linear-gradient(135deg, var(--primary-color), #c87f0a);
  color: white;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tool-header h2 {
  margin: 0;
  font-size: 1.8rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .file-info {
    padding: 1.5rem;
    border-radius: 12px;
  }
  
  .file-info h2 {
    font-size: 1.6rem;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .info-item {
    padding: 1rem;
  }
  
  .info-value {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .file-info {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .file-info h2 {
    font-size: 1.4rem;
  }
  
  .info-value {
    font-size: 1.3rem;
  }
  
  .file-actions .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

