/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c2416;
    background: linear-gradient(135deg, #8b7355 0%, #6b5442 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #faf8f3;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

/* Header */
header {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 2.5rem;
    color: #8b6f47;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #5d4e37;
    margin-bottom: 10px;
}

.info {
    font-size: 0.95rem;
    color: #6b5d4f;
    max-width: 800px;
    margin: 0 auto;
}

.info-banner {
    background: #f5efe5;
    border-left: 4px solid #8b6f47;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 1rem;
}

.info-banner strong {
    color: #6b5442;
    font-weight: 600;
}

/* Statistiques du domaine public */
.public-domain-stats {
    background: linear-gradient(135deg, #f5efe5 0%, #faf8f3 100%);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 700px;
    margin: 0 auto;
}

.stat-chart {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-chart h3 {
    font-size: 1rem;
    color: #6b5442;
    margin-bottom: 15px;
    font-weight: 600;
}

.stat-chart canvas {
    max-width: 200px;
    max-height: 200px;
    margin: 0 auto 10px;
    display: block;
}

.chart-legend {
    font-size: 0.9rem;
    color: #5d4e37;
    line-height: 1.4;
    margin-top: 10px;
}

.chart-legend strong {
    color: #2c2416;
    font-size: 1.1rem;
}

/* Navigation des siècles */
.century-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.century-btn {
    background: #fffef9;
    border: 2px solid #d4c4b0;
    border-radius: 12px;
    padding: 15px 20px;
    text-decoration: none;
    color: #2c2416;
    transition: all 0.3s ease;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.century-btn:hover {
    border-color: #8b6f47;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 111, 71, 0.3);
}

.century-btn.active {
    background: linear-gradient(135deg, #8b6f47 0%, #6b5442 100%);
    color: white;
    border-color: #8b6f47;
    font-weight: 600;
}

.century-label {
    font-size: 0.95rem;
    font-weight: 500;
}

.century-stats {
    font-size: 0.9rem;
    display: flex;
    gap: 15px;
}

.century-btn.active .stat-icon {
    filter: brightness(0) invert(1);
}

/* Légende */
.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #5d4e37;
}

.stat-icon {
    font-size: 1.2rem;
}

/* Grille du calendrier */
.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
}

.calendar-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
}

.year-cell {
    background: #fffef9;
    border: 2px solid #e8dfd1;
    border-radius: 10px;
    padding: 15px 10px;
    text-decoration: none;
    color: #2c2416;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.year-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #8b6f47;
}

.year-cell.has-data {
    background: linear-gradient(135deg, #f5efe5 0%, #ede4d3 100%);
    border-color: #8b6f47;
}

.year-cell.current-year {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #ff9800;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
    position: relative;
}

.year-cell.current-year::before {
    content: '⭐';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2rem;
}

.year-cell.current-year .year-number {
    color: #d84315;
    font-weight: 900;
}

.year-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8b6f47;
    margin-bottom: 8px;
}

.year-stats {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.stat-value {
    font-weight: 600;
    color: #2c2416;
}

.stat-empty {
    color: #999;
    font-size: 0.8rem;
}

/* Navigation retour */
.back-nav {
    margin-bottom: 30px;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background: #8b6f47;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-back:hover {
    background: #5568d3;
    transform: translateX(-3px);
}

.btn-search {
    display: inline-block;
    padding: 10px 20px;
    background: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-search:hover {
    background: #357abd;
    transform: translateY(-2px);
}

/* Sections auteurs et livres */
.authors-section,
.books-section {
    margin-bottom: 40px;
}

.authors-section h2,
.books-section h2 {
    font-size: 1.8rem;
    color: #8b6f47;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #8b6f47;
}

/* Grille des auteurs */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.author-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.author-card.clickable {
    cursor: pointer;
}

.author-card:hover {
    border-color: #8b6f47;
    box-shadow: 0 5px 15px rgba(139, 111, 71, 0.2);
    transform: translateY(-3px);
}

.author-card.clickable:hover {
    background: #fff7ed;
    border-color: #8b6f47;
    box-shadow: 0 8px 20px rgba(139, 111, 71, 0.3);
    transform: translateY(-5px);
}

.author-card h3 {
    color: #2c2416;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.dates {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #5d4e37;
}

.book-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #8b6f47;
}

.wikidata-link {
    display: inline-block;
    color: #8b6f47;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.wikidata-link:hover {
    color: #5568d3;
}

.wikisource-link {
    display: inline-block;
    color: #2e7d32;
    background: #e8f5e9;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.wikisource-link:hover {
    background: #c8e6c9;
    color: #1b5e20;
    transform: translateY(-2px);
}

/* Liste des livres */
.books-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.book-item {
    background: #f8f9fa;
    border-left: 4px solid #8b6f47;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.book-item:hover {
    background: #e3f2fd;
    box-shadow: 0 3px 10px rgba(139, 111, 71, 0.15);
}

.book-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 10px;
    gap: 15px;
}

.book-header h3 {
    color: #2c2416;
    font-size: 1.1rem;
    margin: 0;
    flex: 1;
}

.book-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.wikidata-link-small {
    color: #8b6f47;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.wikidata-link-small:hover {
    color: #5568d3;
}

.wikisource-link-small {
    display: inline-block;
    color: #2e7d32;
    background: #e8f5e9;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.wikisource-link-small:hover {
    background: #c8e6c9;
    color: #1b5e20;
    transform: translateY(-1px);
}

.book-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
    color: #5d4e37;
}

.author-name {
    font-weight: 600;
    color: #8b6f47;
}

.publication-date,
.genre {
    color: #6b5d4f;
}

.translation-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.translator {
    color: #5d4e37;
    font-style: italic;
    font-size: 0.9rem;
}

.no-data {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
    color: #6b5d4f;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .calendar-row {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    /* Menu mobile : sort totalement du flux pour ne pas déplacer le contenu */
    .main-nav {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0;
        width: 0;
        overflow: visible;
    }

    .hamburger {
        display: flex;
        position: absolute;
        top: 8px;
        right: 8px;
        margin: 0;
    }

    /* Espace pour que le titre ne chevauche pas le bouton hamburger */
    header {
        padding-top: 50px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
        width: 85%;
        max-width: 350px;
        background: white;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        overflow: visible;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > li {
        border-bottom: 1px solid #e9ecef;
    }
    
    .nav-menu > li:last-child {
        border-bottom: none;
    }
    
    .nav-menu > li > a,
    .nav-menu > li > button {
        color: #2c2416;
        padding: 12px 16px;
        text-align: left;
        width: 100%;
        font-size: 0.95rem;
    }
    
    .nav-menu > li > a:hover,
    .nav-menu > li > button:hover {
        background: #f5efe5;
    }
    
    /* Dropdown en accordéon sur mobile */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: #f8f9fa;
        border-radius: 0;
        padding: 0;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu a {
        padding: 10px 16px 10px 32px;
        font-size: 0.85rem;
    }
    
    .dropdown-toggle::after {
        content: ' ▸';
        float: right;
        transition: transform 0.3s ease;
    }
    
    .nav-dropdown.active .dropdown-toggle::after {
        transform: rotate(90deg);
    }
    
    .calendar-row {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .century-btn {
        min-width: 150px;
    }
    
    .legend {
        flex-direction: column;
        gap: 10px;
    }
    
    .authors-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calendar-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .year-cell {
        min-height: 80px;
        padding: 10px 5px;
    }
    
    .year-number {
        font-size: 0.95rem;
    }
}

/* Styles pour les périodes anciennes */
.ancient-period {
    margin-bottom: 40px;
}

.period-summary {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 12px;
}

.period-summary h2 {
    font-size: 2rem;
    color: #8b6f47;
    margin-bottom: 15px;
}

.period-info {
    font-size: 1.2rem;
    color: #5d4e37;
    font-weight: 600;
}

.year-block {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.year-block:hover {
    border-color: #8b6f47;
    box-shadow: 0 5px 20px rgba(139, 111, 71, 0.15);
}

.year-title {
    font-size: 1.8rem;
    color: #8b6f47;
    margin-bottom: 10px;
    padding-bottom: 15px;
    border-bottom: 3px solid #8b6f47;
}

.death-year-info {
    font-size: 1rem;
    color: #6b5d4f;
    font-weight: normal;
}

.year-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #8b6f47;
}

.authors-books-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.author-block {
    background: white;
    border-left: 4px solid #8b6f47;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.author-block:hover {
    box-shadow: 0 3px 12px rgba(139, 111, 71, 0.2);
}

.author-block .author-name {
    font-size: 1.3rem;
    color: #2c2416;
    margin-bottom: 10px;
}

.author-block .author-name a {
    color: #8b6f47;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-block .author-name a:hover {
    color: #5568d3;
}

.author-dates {
    font-size: 0.95rem;
    color: #5d4e37;
    margin-bottom: 15px;
    font-style: italic;
}

.author-block .books-list {
    margin-top: 15px;
}

.author-block .books-list strong {
    color: #8b6f47;
    font-size: 1rem;
    display: block;
    margin-bottom: 10px;
}

.author-block .books-list ul {
    list-style: none;
    padding-left: 0;
}

.author-block .books-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.author-block .books-list li:last-child {
    border-bottom: none;
}

.author-block .books-list a {
    color: #2c2416;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.author-block .books-list a:hover {
    color: #8b6f47;
}

.author-block .books-list em {
    color: #6b5d4f;
    font-size: 0.9rem;
}

/* Header actions */
.header-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 15px 0;
    flex-wrap: wrap;
}

.search-link {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    display: inline-block;
}

.search-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.search-link:active {
    transform: translateY(0);
}

/* Bouton du graphique */
.chart-btn {
    background: linear-gradient(135deg, #8b6f47 0%, #6b5442 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 111, 71, 0.3);
}

.chart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 111, 71, 0.4);
}

.chart-btn:active {
    transform: translateY(0);
}

.btn-about-chart {
    display: inline-block;
    background: linear-gradient(135deg, #6b5442 0%, #8b6f47 100%);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(107, 84, 66, 0.3);
}

.btn-about-chart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 84, 66, 0.4);
    background: linear-gradient(135deg, #8b6f47 0%, #6b5442 100%);
}

/* Menu de navigation principal */
.main-nav {
    position: relative;
    margin: 20px 0;
}

/* Bouton hamburger (mobile uniquement) */
.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #8b6f47;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    z-index: 1001;
    margin: 0;
    transition: background 0.2s ease;
}

.hamburger:hover {
    background: #6b5442;
}

.hamburger.active {
    background: #6b5442;
}

/* Menu de navigation */
.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #8b6f47 0%, #6b5442 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(107, 84, 66, 0.3);
}

.nav-menu > li {
    position: relative;
}

/* Arrondir les coins du premier et dernier élément pour un rendu propre */
.nav-menu > li:first-child > a,
.nav-menu > li:first-child > button {
    border-radius: 12px 0 0 12px;
}

.nav-menu > li:last-child > a,
.nav-menu > li:last-child > button {
    border-radius: 0 12px 12px 0;
}

.nav-menu > li > a,
.nav-menu > li > button {
    display: block;
    padding: 14px 24px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > button:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Bouton graphique dans le menu */
.nav-chart-btn {
    font-family: inherit;
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #2c2416;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-menu a:hover {
    background: #f5efe5;
}

/* Indicateur de dropdown */
.dropdown-toggle::after {
    content: ' ▾';
    font-size: 0.8em;
    margin-left: 4px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #faf8f3;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px 30px;
    background: linear-gradient(135deg, #8b6f47 0%, #6b5442 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #d4af37;
}

.modal-body {
    padding: 30px;
}

#cumulativeChart {
    max-height: 500px;
}

.chart-stats {
    margin-top: 20px;
    padding: 20px;
    background: #f5efe5;
    border-radius: 10px;
    text-align: center;
}

.chart-stats p {
    margin: 10px 0;
    font-size: 1.1rem;
    color: #2c2416;
}

.chart-stats strong {
    color: #8b6f47;
}

.error {
    color: #d32f2f;
    text-align: center;
    padding: 20px;
    font-size: 1.1rem;
}

/* Styles pour la page Curiosités */
.curiosities-container {
    margin: 30px 0;
}

.curiosity-section {
    margin-bottom: 40px;
}

.curiosity-section > h2 {
    font-size: 1.8rem;
    color: #8b6f47;
    margin-bottom: 20px;
    border-bottom: 3px solid #d4b896;
    padding-bottom: 10px;
}

.curiosity-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.curiosity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.curiosity-card.highlight {
    background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
    border: 2px solid #d4b896;
}

.curiosity-card h2 {
    font-size: 1.6rem;
    color: #8b6f47;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.curiosity-card h3 {
    font-size: 1.3rem;
    color: #6b5442;
    margin-bottom: 15px;
}

.stat-big {
    text-align: center;
    padding: 20px;
    margin: 15px 0;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: bold;
    color: #8b6f47;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 1.1rem;
    color: #6b5d4f;
    margin-top: 10px;
}

.stat-explanation {
    background: #f5efe5;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #5d4e37;
    line-height: 1.6;
    margin-top: 15px;
}

.author-highlight {
    text-align: center;
    padding: 20px;
}

.author-name-big {
    font-size: 2rem;
    font-weight: bold;
    color: #2c5f7f;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.author-name-big:hover {
    color: #1a3f5f;
    text-decoration: underline;
}

.author-dates {
    font-size: 1.1rem;
    color: #6b5d4f;
    margin-top: 10px;
}

.book-count {
    margin-top: 15px;
    font-size: 1rem;
    color: #8b6f47;
    font-weight: 600;
}

.work-highlight {
    padding: 20px;
    text-align: center;
}

.work-title-big {
    font-size: 1.6rem;
    font-weight: bold;
    color: #2c5f7f;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    line-height: 1.3;
}

.work-title-big:hover {
    color: #1a3f5f;
    text-decoration: underline;
}

.work-author {
    font-size: 1.1rem;
    color: #6b5d4f;
    margin-top: 10px;
}

.work-author a {
    color: #2c5f7f;
    text-decoration: none;
}

.work-author a:hover {
    text-decoration: underline;
}

.work-date {
    font-size: 1rem;
    color: #8b6f47;
    margin-top: 8px;
}

.work-genre {
    font-size: 0.95rem;
    color: #6b5d4f;
    margin-top: 5px;
    font-style: italic;
}

.wikidata-link {
    text-align: center;
    margin-top: 15px;
}

.wikidata-link a {
    color: #2c5f7f;
    text-decoration: none;
    font-size: 0.95rem;
}

.wikidata-link a:hover {
    text-decoration: underline;
}

.btn-see-year {
    display: inline-block;
    background: #2c5f7f;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: background 0.2s ease;
}

.btn-see-year:hover {
    background: #1a3f5f;
}

.centuries-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.century-stat {
    background: #f5efe5;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.century-label {
    font-weight: 600;
    color: #6b5442;
    font-size: 1rem;
    margin-bottom: 8px;
}

.century-count {
    color: #8b6f47;
    font-size: 1.4rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    #cumulativeChart {
        max-height: 300px;
    }
    
    .chart-btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    .curiosity-card h2 {
        font-size: 1.4rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .author-name-big {
        font-size: 1.5rem;
    }

    .work-title-big {
        font-size: 1.3rem;
    }

    .centuries-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Override du menu nav : ces règles doivent être déclarées APRÈS
       les styles de base pour prendre effet sur mobile */

    /* Sort le nav du flux pour qu'il ne pousse pas le contenu */
    .main-nav {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        width: 0 !important;
        overflow: visible !important;
    }

    /* Espace sous le nav pour que le titre ne soit pas caché */
    header {
        padding-top: 50px !important;
    }

    /* Bouton hamburger : visible, ancré en haut à droite du header */
    .hamburger {
        display: flex !important;
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        margin: 0 !important;
    }

    .nav-menu {
        display: none !important;
    }

    .nav-menu.active {
        display: flex !important;
    }
}
