/* calculator-biorhythm/css/biorhythm.css */

:root {
    --primary: #FF8000;
    --primary-dark: #FB4C06;
    --surface: #ffffff;
    --text: #333333;
    --success: #28a745;
    /* Paramètres des graphiques */
    --bg-chart: #1e293b;
    --text-chart: #e2e8f0;
    --phys-color: #22c55e; /* Vert */
    --emo-color: #ef4444;  /* Rouge */
    --intel-color: #3b82f6; /* Bleu */
    --user1-stroke: #ffffff;
    --user2-stroke: #94a3b8; /* Gris pour le 2eme user */
  }
  
  /* Container général */
  .calc-wrapper {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--primary);
    font-family: 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text);
  }
  
  .calc-wrapper h1, 
  .calc-wrapper h2, 
  .calc-wrapper h3 {
    color: var(--primary);
  }

    /* Formulaire */
  .form-group { margin-bottom: 1.5rem; }
  
  .toggle-container {
    display: flex;
    gap: 10px;
  }
  
  .mode-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
  }
  
  .mode-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
  }
  
  .input-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ddd;
  }
  
  .hidden { display: none; }
  
  /* Résultats */
  .results-area {
    margin-top: 2rem;
    animation: fadeIn 0.8s ease;
  }
  
  /* --- JAUGES (CSS Conic Gradient) --- */
  .gauges-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
  }
  
  .gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 100px;
  }
  
  .gauge-label {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
  }
  
  .gauge-canvas {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: relative;
    /* Le fond sera rempli par JS via conic-gradient */
    background: conic-gradient(#eee 0%, #eee 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }
  
  .gauge-canvas::after {
    content: '';
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    position: absolute;
  }
  
  .gauge-value {
    position: relative; /* Au dessus du cercle blanc */
    z-index: 2;
    font-size: 1.2rem;
    font-weight: 800;
    color: #333;
    margin-top: -50px; /* Correction position */
    margin-bottom: 20px;
  }
  
  /* --- INFO PANEL & ALERTS --- */
  .info-panel {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #FF8000;
  }
  
  .info-panel h3 {
    margin-top: 0;
    color: #FB4C06;
  }
  
  .alert-box {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  /* --- CHARTS --- */
  .charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
  }
  
  .chart-box {
    background: var(--bg-chart);
    padding: 1rem;
    border-radius: 8px;
    color: var(--text-chart);
  }
  
  .chart-box h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: white;
    text-align: center;
    font-size: 1.1rem;
  }
  
  .chart-container {
    position: relative;
    height: 250px;
    width: 100%;
  }
  
  /* Bouton Export */
  .actions-row {
    text-align: center;
    margin-top: 2rem;
  }
  
  .btn-secondary-outline {
    background: transparent;
    border: 2px solid #FB4C06;
    color: #FB4C06;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
  }
  
  .btn-secondary-outline:hover {
    background: #FB4C06;
    color: white;
  }
  
/* --- 1. CONTENEUR DES INPUTS (GRID CÔTE À CÔTE) --- */
.users-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 2 Colonnes pour User 1 et User 2 */
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Si mode SOLO, on masque la 2ème colonne */
#user2-section.hidden {
  display: none;
}

/* Responsive : retour à la pile sur mobile */
@media (max-width: 600px) {
  .users-grid {
      grid-template-columns: 1fr;
  }
}

/* --- 2. STYLE DES BOUTONS (CHART ORANGE) --- */

/* BOUTONS TOGGLE (SOLO / COUPLE) */
.toggle-container {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.mode-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  color: #555;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mode-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.mode-btn.active {
  background: linear-gradient(135deg, #FF8000 0%, #FB4C06 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 6px rgba(255, 128, 0, 0.2);
}

/* BOUTON PRINCIPAL (CALCULER) */
.btn-primary {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  
  /* --- THEME SITE --- */
  background: linear-gradient(135deg, #FF8000 0%, #FB4C06 100%);
  color: white;
  box-shadow: 0 4px 10px rgba(255, 128, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 128, 0, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

/* BOUTON SECONDAIRE (RÉINITIALISER) */
.btn-secondary {
  flex: 1;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1rem;
  background: white;
  color: #555;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff8f0;
}

/* BOUTON TÉLÉCHARGER */
.btn-secondary-outline {
  background: transparent;
  border: 2px solid #FB4C06;
  color: #FB4C06;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-secondary-outline:hover {
  background: #FB4C06;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(251, 76, 6, 0.2);
}

/* --- 3. GRAPHIQUES (VERTICAUX) --- */
.charts-row {
  display: flex;
  flex-direction: column; /* ✅ CHANGE : Verticalement l'un sous l'autre */
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Pour que les graphiques prennent toute la largeur */
.chart-box {
  width: 100%;
  background: var(--bg-chart);
  padding: 1.5rem;
  border-radius: 12px;
  color: var(--text-chart);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.chart-box h4 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: white;
  text-align: center;
  font-size: 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
}

.chart-container {
  position: relative;
  height: 300px; /* Un peu plus haut car ils sont seuls maintenant */
  width: 100%;
}

/* --- LÉGENDE RADAR --- */
.radar-legend {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #94a3b8;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
}

.radar-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.radar-label-good { color: #22c55e; }
.radar-label-bad { color: #ef4444; }

/* --- ANALYSE DU COUPLE (NOUVEAU) --- */
.couple-analysis-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.couple-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.couple-header h4 {
  margin: 0;
  color: #333;
}

.compat-badge {
  padding: 4px 12px;
  border-radius: 20px;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
}

.analysis-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.analysis-list li {
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
  display: flex;
  flex-direction: column;
}

.analysis-list li:last-child {
  border-bottom: none;
}

/* Indicateurs de statut */
.status {
  font-weight: bold;
  margin-bottom: 2px;
}

.sync-high { color: #22c55e; } /* Vert */
.sync-mid { color: #3b82f6; }  /* Bleu */
.sync-complementary { color: #f59e0b; } /* Orange */
.sync-low { color: #64748b; } /* Gris */

.cycle-phys { color: #22c55e; font-weight: bold; font-size: 0.9rem; }
.cycle-emo { color: #ef4444; font-weight: bold; font-size: 0.9rem; }
.cycle-intel { color: #3b82f6; font-weight: bold; font-size: 0.9rem; }

.analysis-list small {
  color: #666;
  font-style: italic;
  margin-left: 0;
}

.couple-tip {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: 10px;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #166534;
  font-weight: 500;
}

/* Petit ajustement pour l'article si besoin */
.article-banner-text i {
  margin-right: 8px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }