/* ===== PAGE ANCÊTRE - STYLES IMMERSIFS ===== */

/* Variables CSS */
:root {
    --primary-gold: #D4AF37;
    --secondary-gold: #B8860B;
    --dark-brown: #3C2415;
    --medium-brown: #5D4037;
    --light-brown: #8D6E63;
    --cream: #F5F5DC;
    --parchment: #F4F1E8;
    --shadow-dark: rgba(60, 36, 21, 0.3);
    --shadow-light: rgba(212, 175, 55, 0.2);
}

/* Hero Section avec Portrait */
.ancestor-hero {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(
        rgba(60, 36, 21, 0.75), 
        rgba(93, 64, 55, 0.75)
    );
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/michel_corbin_grandchamp_fond_etendu.png') center/cover;
    opacity: 0.4;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}



/* Informations Ancêtre */
.ancestor-info {
    color: white;
}

.ancestor-header {
    margin-bottom: 3rem;
}

.ancestor-name {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-gold), #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ancestor-dates {
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ancestor-title {
    font-size: 1.2rem;
    color: var(--cream);
    font-style: italic;
}

.ancestor-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section Productions */
.ancestor-productions {
    padding: 6rem 0;
    background: var(--parchment);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--dark-brown);
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-title i {
    color: var(--primary-gold);
}

.productions-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.production-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px var(--shadow-light);
    transition: all 0.3s ease;
}

.production-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px var(--shadow-light);
}

.production-card.featured {
    grid-row: span 2;
}

.production-video {
    position: relative;
    width: 100%;
    height: 300px;
}

.production-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.production-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.production-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.production-card:hover .production-image img {
    transform: scale(1.1);
}

.production-info {
    padding: 1.5rem;
}

.production-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
}

.production-info p {
    color: var(--medium-brown);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.production-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.production-meta span {
    background: var(--primary-gold);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Section Arbre Généalogique */
.genealogy-tree {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--cream) 0%, var(--parchment) 100%);
}

.tree-header {
    text-align: center;
    margin-bottom: 4rem;
}

.tree-subtitle {
    font-size: 1.2rem;
    color: var(--medium-brown);
    margin-top: 1rem;
    font-style: italic;
}

.tree-container {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px var(--shadow-light);
    min-height: 500px;
}

.tree-visualization {
    width: 100%;
    height: 500px;
    background: url('../images/arbre_genealogique_musee.png') center/contain no-repeat;
    border-radius: 15px;
    position: relative;
    background-color: #2c2c2c;
}

.tree-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.tree-btn {
    background: var(--primary-gold);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tree-btn:hover {
    background: var(--secondary-gold);
    transform: translateY(-2px);
}

/* Section Souverains */
.sovereigns-timeline {
    padding: 6rem 0;
    background: var(--dark-brown);
    color: white;
}

.timeline-header {
    text-align: center;
    margin-bottom: 4rem;
}

.timeline-header .section-title {
    color: white;
}

.timeline-subtitle {
    font-size: 1.2rem;
    color: var(--primary-gold);
    margin-top: 1rem;
    font-style: italic;
}

.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
    scroll-behavior: smooth;
}

.timeline-item {
    flex: 0 0 250px;
    position: relative;
}

.sovereign-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    height: 100%;
}

.sovereign-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
}

.sovereign-portrait {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid var(--primary-gold);
}

.sovereign-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sovereign-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary-gold);
    text-align: center;
    margin-bottom: 0.5rem;
}

.reign-period {
    text-align: center;
    color: var(--cream);
    font-weight: 600;
    margin-bottom: 1rem;
}

.reign-events {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reign-events span {
    background: rgba(212, 175, 55, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 10px;
    font-size: 0.8rem;
    text-align: center;
}

.life-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.life-span {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-gold), #FFD700);
    border-radius: 2px;
    left: 0%;
    width: 100%;
}

.life-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-gold);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Section Documentation */
.ancestor-documentation {
    padding: 6rem 0;
    background: var(--parchment);
}

.documentation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.doc-category {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px var(--shadow-light);
}

.doc-category h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--dark-brown);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-gold);
}

.doc-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.doc-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.doc-item:hover {
    background: var(--primary-gold);
    color: white;
    transform: translateX(10px);
}

.doc-item i {
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-top: 0.2rem;
}

.doc-item:hover i {
    color: white;
}

.doc-info h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-brown);
}

.doc-item:hover .doc-info h4 {
    color: white;
}

.doc-info p {
    color: var(--medium-brown);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.doc-item:hover .doc-info p {
    color: rgba(255, 255, 255, 0.9);
}

.doc-link {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
}

.doc-item:hover .doc-link {
    color: white;
}

/* Section Connexions Familiales */
.family-connections {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--medium-brown) 0%, var(--dark-brown) 100%);
    color: white;
}

.family-connections .section-title {
    color: white;
}

.connections-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.connection-category h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary-gold);
    margin-bottom: 2rem;
}

.users-list, .ancestors-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-info {
    flex: 1;
}

.user-info h4 {
    color: white;
    margin-bottom: 0.3rem;
}

.user-info p {
    color: var(--cream);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.relation {
    background: rgba(212, 175, 55, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--primary-gold);
}

.connect-btn {
    background: var(--primary-gold);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.connect-btn:hover {
    background: var(--secondary-gold);
    transform: translateY(-2px);
}

.ancestor-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.ancestor-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.ancestor-link img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-gold);
}

.ancestor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 0.8rem;
}

.ancestor-link-info h4 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.ancestor-link-info p {
    color: var(--cream);
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .ancestor-name {
        font-size: 2.5rem;
    }
    
    .ancestor-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .productions-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-track {
        flex-direction: column;
        align-items: center;
    }
    
    .timeline-item {
        flex: none;
        width: 100%;
        max-width: 300px;
    }
    
    .connections-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .documentation-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.ancestor-hero .portrait-section {
    animation: slideInLeft 1s ease-out;
}

.ancestor-hero .ancestor-info {
    animation: slideInRight 1s ease-out 0.3s both;
}

.production-card {
    animation: fadeInUp 0.8s ease-out;
}

.production-card:nth-child(2) {
    animation-delay: 0.2s;
}

.production-card:nth-child(3) {
    animation-delay: 0.4s;
}

.sovereign-card {
    animation: fadeInUp 0.8s ease-out;
}

.timeline-item:nth-child(1) .sovereign-card { animation-delay: 0.1s; }
.timeline-item:nth-child(2) .sovereign-card { animation-delay: 0.2s; }
.timeline-item:nth-child(3) .sovereign-card { animation-delay: 0.3s; }
.timeline-item:nth-child(4) .sovereign-card { animation-delay: 0.4s; }
.timeline-item:nth-child(5) .sovereign-card { animation-delay: 0.5s; }



/* ===== SECTION HÉRALDIQUE ===== */
.heraldic-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.heraldic-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.heraldic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.heraldic-header h3 {
    font-family: var(--font-primary);
    color: var(--accent-color);
    margin: 0;
    font-size: 1.25rem;
}

.btn-generate {
    background: linear-gradient(135deg, var(--accent-color), #f4d03f);
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.heraldic-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.blason-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.blason-image:hover {
    transform: scale(1.1);
}

.monogramme-image {
    width: 150px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.monogramme-image:hover {
    transform: scale(1.05);
}

.video-player {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.video-player:hover {
    transform: scale(1.05);
}

.heraldic-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    line-height: 1.5;
}

.heraldic-description p {
    margin: 0.25rem 0;
}

.heraldic-description strong {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .heraldic-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .heraldic-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .blason-image {
        width: 100px;
        height: 100px;
    }
    
    .video-player {
        max-width: 250px;
    }
    
    .monogramme-image {
        width: 120px;
        height: 80px;
    }
}

