/* Configuration globale des variables de couleur */
:root {
    --primary-color: #2c3e50;
    --accent-color: #d4ac0d;
    --bg-color: #f8f9fa;
    --text-color: #333;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Barre de navigation fixe */
.navbar {
    background-color: var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Alignement des boutons de navigation */
.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: none;
    border: none;
    color: #b2bec3;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-btn:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.nav-btn.active {
    color: white;
    background-color: var(--accent-color);
    font-weight: bold;
}

/* Sélecteur de langues (Drapeaux) */
.lang-selector {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.flag-btn {
    background: none;
    border: 2px solid transparent;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: transform 0.2s, border-color 0.2s;
    line-height: 1;
}

.flag-btn:hover {
    transform: scale(1.2);
}

.flag-btn.active {
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Conteneur principal */
.main-content {
    max-width: 1000px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Gestion de l'affichage dynamique des pages */
.tab-content {
    display: none;
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.tab-content.active {
    display: block;
}

/* Éléments de mise en page de l'Accueil */
.hero {
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

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

.card-intro {
    background: #f1f2f6;
    padding: 1.5rem;
    border-radius: 6px;
    border-top: 4px solid var(--primary-color);
}

/* Layout pour l'arbre simplifié */
.subtitle { 
    color: #7f8c8d; 
    font-style: italic; 
    margin-bottom: 2rem;
}

.mini-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    background: #eef2f3;
    padding: 2rem;
    border-radius: 8px;
    border-left: 5px solid #3498db;
}

.mini-tree.branch-alt { 
    border-left-color: #2ecc71; 
}

.generation {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    width: 80%;
    text-align: center;
}

.arrow { 
    font-size: 1.2rem; 
    color: #7f8c8d; 
}

/* Section Informations */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    background: #fafbfc;
    padding: 1.2rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
}

/* Formulaire de contact */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group input, .form-group textarea {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.submit-btn:hover { 
    background-color: #1a252f; 
}

/* Conteneur principal du menu déroulant */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Conteneur du sous-menu (caché par défaut) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.15);
    border-radius: 4px;
    z-index: 1000;
    margin-top: 5px;
}

/* Style des liens à l'intérieur du sous-menu */
.dropdown-content .sub-nav-link {
    color: #333333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    text-align: left;
    transition: background-color 0.2s;
}

/* Changement de couleur au survol des liens */
.dropdown-content .sub-nav-link:hover {
    background-color: #f5f5f5;
    color: #000000;
}

/* Affiche le sous-menu lorsque l'on survole le bouton "Ascendances" */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Optionnel : Ajoute un défilement fluide lors du clic sur le sous-menu */
html {
    scroll-behavior: smooth;
}
