/* Variables CSS pour une gestion facile des couleurs */
        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --accent-color: #e74c3c;
            --success-color: #2ecc71;
            --light-color: #ecf0f1;
            --dark-color: #2c3e50;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }

        /* Reset et styles de base */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.6;
            padding-bottom: 40px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 20px;
        }

        header {
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            padding: 30px 0;
            text-align: center;
            margin-bottom: 30px;
            box-shadow: var(--shadow);
        }

        header h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
        }

        header p {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 800px;
            margin: 0 auto;
        }

        /* Barre de recherche */
        .search-container {
            background-color: white;
            border-radius: 10px;
            padding: 25px;
            margin: 0 auto 30px;
            max-width: 1000px;
            box-shadow: var(--shadow);
        }

        .search-box {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
        }

        .search-input {
            flex: 1;
            min-width: 300px;
            padding: 15px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 1.1rem;
            transition: var(--transition);
        }

        .search-input:focus {
            outline: none;
            border-color: var(--secondary-color);
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }

        .search-btn {
            background-color: var(--secondary-color);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 1.1rem;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .search-btn:hover {
            background-color: #2980b9;
            transform: translateY(-2px);
        }

        .search-filters {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            align-items: center;
        }

        .filter-select {
            padding: 10px 15px;
            border: 2px solid #ddd;
            border-radius: 8px;
            background-color: white;
            font-size: 1rem;
            cursor: pointer;
        }

        .filter-select:focus {
            outline: none;
            border-color: var(--secondary-color);
        }

        .search-results-info {
            margin-top: 15px;
            padding: 10px;
            background-color: #f8f9fa;
            border-radius: 8px;
            font-size: 0.95rem;
            color: #666;
        }

        .search-results-info.highlight {
            background-color: #e8f4fc;
            color: var(--secondary-color);
            font-weight: 600;
        }

        /* Styles pour la navigation */
        .nav-container {
            background-color: white;
            border-radius: 10px;
            padding: 15px;
            margin: 0 auto 30px;
            max-width: 1000px;
            box-shadow: var(--shadow);
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
        }

        .nav-btn {
            background-color: var(--light-color);
            border: none;
            padding: 10px 20px;
            border-radius: 30px;
            cursor: pointer;
            font-weight: 600;
            transition: var(--transition);
        }

        .nav-btn:hover {
            background-color: var(--secondary-color);
            color: white;
        }

        .nav-btn.active {
            background-color: var(--secondary-color);
            color: white;
        }

        /* Styles pour l'arbre généalogique */
        .tree-container {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            margin-bottom: 30px;
            overflow-x: auto;
            box-shadow: var(--shadow);
            min-height: 600px;
            position: relative;
        }

        .tree {
            display: flex;
            flex-direction: column;
            align-items: center;
            min-width: 1200px;
            padding: 20px 0;
        }

        .generation {
            display: flex;
            justify-content: center;
            margin-bottom: 40px;
            width: 100%;
            flex-wrap: wrap;
        }

        .member {
            background-color: white;
            border: 2px solid var(--secondary-color);
            border-radius: 8px;
            padding: 12px 15px;
            margin: 5px;
            cursor: pointer;
            transition: var(--transition);
            text-align: center;
            min-width: 180px;
            box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
            position: relative;
            z-index: 1;
        }

        .member:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            background-color: #f0f7ff;
        }

        .member.active {
            border-color: var(--accent-color);
            background-color: #fff5f5;
        }

        .member.highlighted {
            border-color: var(--success-color);
            background-color: #f0fff4;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
            70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
            100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
        }

        .member-name {
            font-weight: bold;
            font-size: 1.1rem;
            margin-bottom: 5px;
            color: var(--primary-color);
        }

        .member-dates {
            font-size: 0.9rem;
            color: #666;
            margin-bottom: 5px;
        }

        .member-relation {
            font-size: 0.8rem;
            color: var(--secondary-color);
            font-style: italic;
        }

        .member-search-match {
            position: absolute;
            top: -8px;
            right: -8px;
            background-color: var(--success-color);
            color: white;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: bold;
        }

        /* Styles pour le panneau d'information */
        .info-panel {
            background-color: white;
            border-radius: 10px;
            padding: 25px;
            box-shadow: var(--shadow);
            margin-bottom: 30px;
            display: none;
        }

        .info-panel.active {
            display: block;
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .info-header {
            display: flex;
            align-items: center;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 1px solid #eee;
        }

        .info-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 3rem;
            margin-right: 25px;
            flex-shrink: 0;
            overflow: hidden;
        }

        .info-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .info-title h2 {
            color: var(--primary-color);
            font-size: 2rem;
            margin-bottom: 5px;
        }

        .info-title p {
            color: #666;
            font-size: 1.1rem;
        }

        .info-content {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 25px;
        }

        .info-section {
            background-color: #f9f9f9;
            padding: 20px;
            border-radius: 8px;
        }

        .info-section h3 {
            color: var(--secondary-color);
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #eee;
        }

        .info-item {
            margin-bottom: 12px;
            display: flex;
        }

        .info-label {
            font-weight: bold;
            min-width: 120px;
            color: var(--primary-color);
        }

        /* Styles pour la légende */
        .legend {
            background-color: white;
            border-radius: 10px;
            padding: 20px;
            box-shadow: var(--shadow);
            margin-top: 20px;
        }

        .legend h3 {
            margin-bottom: 15px;
            color: var(--primary-color);
        }

        .legend-items {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            margin-right: 20px;
        }

        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 4px;
            margin-right: 10px;
        }

        .gen-1 { background-color: #8e44ad; }
        .gen-2 { background-color: #3498db; }
        .gen-3 { background-color: #2ecc71; }
        .gen-4 { background-color: #f39c12; }

        /* Styles responsives */
        @media (max-width: 1200px) {
            .tree-container {
                overflow-x: scroll;
            }
            
            .info-content {
                grid-template-columns: 1fr;
            }
            
            .search-box {
                flex-direction: column;
            }
            
            .search-input {
                min-width: 100%;
            }
        }

        @media (max-width: 768px) {
            header h1 {
                font-size: 2.2rem;
            }
            
            .member {
                min-width: 150px;
                padding: 10px;
                margin: 0 5px;
            }
            
            .info-header {
                flex-direction: column;
                text-align: center;
            }
            
            .info-avatar {
                margin-right: 0;
                margin-bottom: 20px;
            }
            
            .nav-container, .search-container {
                padding: 15px;
            }
            
            .nav-btn, .search-btn {
                padding: 10px 15px;
                font-size: 0.9rem;
            }
            
            .search-filters {
                flex-direction: column;
                align-items: stretch;
            }
            
            .filter-select {
                width: 100%;
            }
        }

        @media (max-width: 480px) {
            .member {
                min-width: 130px;
                padding: 8px;
            }
            
            .member-name {
                font-size: 1rem;
            }
            
            .info-title h2 {
                font-size: 1.6rem;
            }
            
            .search-btn span {
                display: none;
            }
            
            .search-btn i {
                margin-right: 0;
            }
        }

        /* Bouton de retour en haut */
        .back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: var(--secondary-color);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: var(--transition);
            z-index: 100;
            opacity: 0;
            visibility: hidden;
        }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top:hover {
            background-color: var(--primary-color);
            transform: translateY(-5px);
        }

        /* Footer */
        footer {
            text-align: center;
            margin-top: 40px;
            color: #666;
            font-size: 0.9rem;
        }

        /* Styles pour les suggestions de recherche */
        .search-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            display: none;
        }

        .search-suggestions.active {
            display: block;
        }

        .suggestion-item {
            padding: 12px 15px;
            cursor: pointer;
            border-bottom: 1px solid #f0f0f0;
            transition: var(--transition);
            display: flex;
            align-items: center;
        }

        .suggestion-item:hover {
            background-color: #f5f9ff;
        }

        .suggestion-item:last-child {
            border-bottom: none;
        }

        .suggestion-name {
            font-weight: 600;
            color: var(--primary-color);
        }

        .suggestion-details {
            font-size: 0.9rem;
            color: #666;
            margin-left: 10px;
        }

        /* Overlay pour le chargement */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.8);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
            display: none;
        }

        .loading-overlay.active {
            display: flex;
        }

        .spinner {
            width: 50px;
            height: 50px;
            border: 5px solid #f3f3f3;
            border-top: 5px solid var(--secondary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Notification */
        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 25px;
            background-color: var(--success-color);
            color: white;
            border-radius: 8px;
            box-shadow: var(--shadow);
            z-index: 1000;
            transform: translateX(120%);
            transition: transform 0.3s ease;
        }

        .notification.show {
            transform: translateX(0);
        }

        .notification.error {
            background-color: var(--accent-color);
  

        
            }

      /* Styles pour le footer amélioré */


        .footer-content {
            display: flex;
            flex-direction: column;
            gap: 20px;
            padding: 30px 0;
        }

        .footer-main {
            text-align: center;
            margin-bottom: 15px;
        }

        .footer-main p {
            margin: 5px 0;
            color: #666;
        }

        .footer-signature {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        .signature-text {
            text-align: center;
        }

        .signature-text p {
            font-size: 1.1rem;
            color: #333;
            margin: 0;
        }

        .signature-text strong {
            color: var(--secondary-color);
            font-weight: 700;
        }

        .social-links {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .social-link {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background-color: var(--secondary-color);
            color: white;
            border-radius: 50%;
            text-decoration: none;
            transition: all 0.3s ease;
            font-size: 1.2rem;
        }

        .social-link:hover {
            background-color: var(--primary-color);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .social-link:nth-child(1):hover { background-color: #1877f2; } /* Facebook */
        .social-link:nth-child(2):hover { background-color: #1da1f2; } /* Twitter */
        .social-link:nth-child(3):hover { background-color: #0077b5; } /* LinkedIn */
        .social-link:nth-child(4):hover { background-color: #e4405f; } /* Instagram */
        .social-link:nth-child(5):hover { background-color: #ea4335; } /* Email */

        /* Version 2 - Élaborée */
        .footer-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            padding: 40px 0;
        }

        .footer-info h3 {
            color: var(--primary-color);
            margin-bottom: 15px;
            font-size: 1.5rem;
        }

        .footer-info p {
            color: #666;
            line-height: 1.6;
            margin-bottom: 10px;
        }

        .copyright {
            color: #888;
            font-size: 0.9rem;
            margin-top: 20px;
        }

        .footer-creator {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }

        .creator-card {
            display: flex;
            align-items: center;
            gap: 20px;
            background: linear-gradient(135deg, #f8f9fa, #e9ecef);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        }

        .creator-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 3rem;
            flex-shrink: 0;
        }

        .creator-info h4 {
            color: #666;
            font-size: 0.9rem;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .creator-info h3 {
            color: var(--primary-color);
            margin: 0 0 5px 0;
            font-size: 1.4rem;
        }

        .creator-info a {
            color: #666;
            margin: 0;
            font-size: 0.95rem;
            text-decoration: none;
            color:#0077b5;
            font-weight: bold;
        }

        .creator-social h4 {
            color: var(--primary-color);
            margin-bottom: 15px;
            text-align: center;
            font-size: 1.2rem;
        }

        .social-icons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .social-icon {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 15px 10px;
            background-color: white;
            border-radius: 8px;
            text-decoration: none;
            color: #333;
            transition: all 0.3s ease;
            border: 1px solid #eee;
        }

        .social-icon:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }

        .social-icon i {
            font-size: 1.5rem;
            margin-bottom: 8px;
        }

        .social-icon span {
            font-size: 0.8rem;
            text-align: center;
        }

        .social-icon.facebook { color: #1877f2; }
        .social-icon.whatsapp { color: #1df239; }
        .social-icon.linkedin { color: #0077b5; }
        .social-icon.tiktok { color: #1f080d; }
        .social-icon.github { color: #333; }
        .social-icon.email { color: #ea4335; }

        .social-icon:hover.facebook { background-color: rgba(24, 119, 242, 0.1); }
        .social-icon:hover.whatsapp { background-color: rgba(21, 236, 121, 0.1); }
        .social-icon:hover.linkedin { background-color: rgba(0, 119, 181, 0.1); }
        .social-icon:hover.tiktok { background-color: rgba(228, 64, 95, 0.1); }
        .social-icon:hover.github { background-color: rgba(51, 51, 51, 0.1); }
        .social-icon:hover.email { background-color: rgba(234, 67, 53, 0.1); }

        .footer-bottom {
            text-align: center;
            padding: 20px 0;
            border-top: 1px solid #eee;
            margin-top: 30px;
            color: #888;
            font-size: 0.9rem;
            font-style: italic;
        }

        /* Responsive design */
        @media (max-width: 768px) {
            .footer-wrapper {
                grid-template-columns: 1fr;
                gap: 30px;
            }
            
            .social-icons {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .creator-card {
                flex-direction: column;
                text-align: center;
            }
            
            .footer-info {
                text-align: center;
            }
        }

        @media (max-width: 480px) {
            .social-icons {
                grid-template-columns: 1fr;
            }
            
            .footer-content {
                padding: 20px 0;
            }
            
            .footer-signature {
                padding-top: 15px;
            }
        }