/* =====================================================
   Feuille de style : Généalogie Savoie-Argentine
   Auteur : Didier Dutruel (2025)
   ===================================================== */

body {
  font-family: "Segoe UI", "Open Sans", sans-serif;
  background-color: #FFF8F0;
  color: #222;
  margin: 0;
  padding: 0;
}

header {
  text-align: center;
  padding: 20px 10px 10px 10px;
}

h1 {
  color: #FF6000;
  font-size: 2em;
  margin-bottom: 5px;
}

h2 {
  color: #333;
  margin-top: 1em;
  font-size: 1.3em;
  border-bottom: 1px solid #FF6000;
  display: inline-block;
  padding-bottom: 3px;
}

.instructions {
  font-size: 0.9em;
  color: #444;
  margin-top: 5px;
  font-style: italic;
}

/* ====== Arbre généalogique ====== */

#tree-container {
  width: 100%;
  height: 90vh;
  overflow: hidden;
  background-color: #FFF8F0;
  border-top: 2px solid #FF6000;
}

.node rect {
  fill: #fff;
  stroke: #FF6000;
  stroke-width: 1.5;
  rx: 10;
  ry: 10;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.node text {
  font-size: 13px;
  text-anchor: middle;
  pointer-events: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node .spouse {
  font-size: 11px;
  fill: #666;
}

/* Lignes reliant les générations */
.link {
  fill: none;
  stroke: #888;
  stroke-width: 1.2px;
}

/* ====== Fiche individuelle ====== */

.fiche-container {
  max-width: 800px;
  margin: 40px auto;
  background: #fffaf5;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  padding: 20px 30px;
  border: 1px solid #FF6000;
}

.fiche-container h1 {
  font-size: 1.8em;
  color: #FF6000;
  text-align: center;
  margin-top: 0;
}

.section {
  margin-bottom: 20px;
}

.section h2 {
  color: #333;
  font-size: 1.1em;
  border-bottom: 1px solid #FF6000;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.personne {
  margin-left: 15px;
}

a {
  color: #FF6000;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.retour {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-weight: bold;
  color: #FF6000;
}

.retour:hover {
  text-decoration: underline;
}

/* ====== Couleurs par genre ====== */

.node.male rect {
  fill: #d6ecff; /* bleu clair */
  stroke: #0096ff;
}

.node.female rect {
  fill: #ffe5ec; /* rose clair */
  stroke: #ff6b8a;
}

.node.unknown rect {
  fill: #f0f0f0; /* gris clair */
  stroke: #999;
}

.node:hover rect {
  stroke-width: 2.5;
  stroke: #FF6000;
  cursor: pointer;
}

/* ====== Responsive ====== */
@media (max-width: 600px) {
  .fiche-container {
    margin: 10px;
    padding: 15px;
  }
}
