/**
 * GEDCOM Calendar - Design moderne et simple
 * CSS enti�rement refait avec des couleurs coh�rentes
 */

:root {
    /* Palette de couleurs moderne et coh�rente */
    --primary: #3b82f6;       /* Bleu principal */
    --primary-dark: #2563eb;  /* Bleu fonc� */
    --secondary: #64748b;     /* Gris bleu */
    --accent: #a76107;        /* Vert accent */
    
    /* Couleurs neutres */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Textes */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-white: #ffffff;
    
    /* Autres */
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* Reset et base */
* {
    box-sizing: border-box;
}

/* Container principal */
.gedcom-calendar-container {
    max-width: 1200px;
    margin: 30px auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* En-t�te */
.calendar-header {
    background: var(--primary);
    color: var(--text-white);
    padding: 40px;
    text-align: center;
}

.calendar-date {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.date-icon {
    font-size: 3rem;
}

.date-content {
    text-align: left;
}

.current-date {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-white);
}

.date-subtitle {
    margin: 8px 0 0 0;
    font-size: 1rem;
    color: var(--text-white);
    opacity: 0.9;
}

.current-time {
    margin: 5px 0 0 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-white);
    opacity: 0.95;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Boutons d'action */
.action-buttons {
    margin-top: 30px;
    text-align: center;
}

.back-btn, .export-btn {
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 0 10px;
}

.back-btn {
    background: var(--secondary);
    color: var(--text-white);
}

.export-btn {
    background: var(--accent);
    color: var(--text-white);
}

.action-buttons small {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-white);
    opacity: 0.8;
}

/* Contenu principal */
.calendar-content {
    padding: 40px;
    background: var(--gray-50);
}

/* Liste des �v�nements */
.events-list {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.events-header h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

/* �v�nements individuels */
.event-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.event-item:last-child {
    border-bottom: none;
}

.event-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: var(--text-white);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-content {
    flex: 1;
}

.event-description {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.event-details {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.event-year {
    background: var(--secondary);
    color: var(--text-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Boutons de personnes */
.person-link {
    background: var(--accent);
    color: var(--text-white);
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: inherit;
}

/* Pas d'�v�nements */
.no-events {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-events-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-events h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.no-events p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Modales */
.gedcom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.gedcom-modal {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--primary);
    color: var(--text-white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
}

.modal-content {
    padding: 20px;
}

/* D�tails des personnes */
.person-details {
    color: var(--text-primary);
}

.person-header {
    background: var(--primary);
    color: var(--text-white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.person-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-white);
}

.person-gender {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-section {
    margin-bottom: 25px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 20px;
}

.detail-section h4 {
    color: var(--text-primary);
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.family-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.family-list li {
    padding: 10px 15px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 8px;
    color: var(--text-primary);
    border-left: 3px solid var(--accent);
}

.family-list li:last-child {
    margin-bottom: 0;
}

.events-summary {
    display: grid;
    gap: 10px;
}

.event-summary {
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.event-type {
    font-weight: 600;
    color: var(--text-primary);
}

.event-info {
    color: var(--text-secondary);
    margin-left: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .gedcom-calendar-container {
        margin: 15px;
    }
    
    .calendar-header {
        padding: 30px 20px;
    }
    
    .calendar-date {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .date-content {
        text-align: center;
    }
    
    .calendar-content {
        padding: 20px;
    }
    
    .event-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }
    
    .gedcom-modal {
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-content {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .current-date {
        font-size: 1.8rem;
    }
    
    .calendar-content {
        padding: 15px;
    }
    
    .event-item {
        padding: 15px;
    }
    
    .person-header {
        padding: 15px;
    }
    
    .detail-section {
        padding: 15px;
    }
}