/**
 * Les Caractères - Styles de l'en-tête
 * Design ultra-minimaliste épuré
 */

:root {
    --header-height: 120px;
}

/* ========================================
   EN-TÊTE PRINCIPAL
   ======================================== */

.header-top {
    background: #fff;
    color: #2c3e50;
    padding: 2rem 2rem 1.5rem;
    border-bottom: 2px solid #2c3e50;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.header-top h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 3px;
    margin: 0;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding-left: 0.5rem;
    border-left: 1px solid #d0d0d0;
}

.header-link {
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
    cursor: pointer;
    position: relative;
    font-weight: 300;
}

.header-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: #3498db;
    transition: width 0.3s;
}

.header-link:hover {
    color: #3498db;
}

.header-link:hover::after {
    width: 100%;
}

/* Publications Dropdown */
.publications-dropdown {
    position: relative;
}

.publications-menu {
    display: none;
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    background: #fff;
    border: 1px solid #d0d0d0;
    min-width: 300px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    z-index: 1000;
}

.publications-menu a {
    display: block;
    padding: 1rem 1.25rem;
    color: #555;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
    font-weight: 300;
}

.publications-menu a:last-child {
    border-bottom: none;
}

.publications-menu a:hover {
    color: #3498db;
    padding-left: 1.5rem;
    background: #fafafa;
}

.publications-dropdown:hover .publications-menu {
    display: block;
}

/* ========================================
   MENU STICKY - VERSION ULTRA-MINIMALISTE
   ======================================== */

.header-menu {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 2rem;
}

.menu-years {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 36px;
}

.current-edition-display {
    font-size: 0.8rem;
    color: #666;
    font-weight: 300;
    white-space: nowrap;
}

.years-list {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-logos {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-logos a {
    line-height: 0;
}

.header-logos img {
    height: 24px;
    width: auto;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.header-logos img:hover {
    opacity: 0.8;
}

/* ========================================
   OPTIONS - ALIGNÉES AVEC LA GRILLE
   ======================================== */

.menu-options {
    max-width: 1400px;
    margin: 0.5rem auto 0;
    padding: 0.5rem 1rem;
    border-top: 1px solid #f0f0f0;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    align-items: start;
}

/* Première colonne : POI (aligné avec left-panel) */
.menu-options > label:first-child {
    grid-column: 1;
    justify-self: start;
}

/* Deuxième colonne : reste des options sur une ligne */
.options-group {
    grid-column: 2;
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.menu-options label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #888;
    font-size: 0.75rem;
    font-weight: 300;
}

.menu-options input[type="checkbox"] {
    cursor: pointer;
    appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid #ccc;
    position: relative;
}

.menu-options input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    font-size: 10px;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    left: 0;
    right: 0;
    top: -2px;
}

.menu-options select {
    padding: 0.2rem 0.5rem;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 300;
    color: #666;
}

.menu-options select:focus {
    outline: none;
    border-bottom-color: #999;
}

/* ========================================
   JUMP TO REMARK
   ======================================== */

.jump-to-remark {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.jump-to-remark select {
    padding: 0.2rem 0.5rem;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: 300;
    color: #666;
    max-width: 200px;
}

.jump-to-remark input {
    width: 40px;
    padding: 0.2rem 0.4rem;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    background: transparent;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    text-align: center;
    color: #666;
}

.jump-to-remark input:focus,
.jump-to-remark select:focus {
    outline: none;
    border-bottom-color: #999;
}

.jump-to-remark button {
    width: 24px;
    height: 24px;
    border: 1px solid #ccc;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jump-to-remark button:hover {
    border-color: #999;
    color: #333;
}

/* ========================================
   DROPDOWNS (ANNÉES)
   ======================================== */

.year-dropdown {
    position: relative;
}

.year-link {
    font-size: 0.85rem;
    font-weight: 300;
    color: #666;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

.year-link:hover {
    color: #333;
}

.year-number {
    padding: 0;
}

.dropdown-activator {
    margin-left: 0.2rem;
    font-size: 0.6rem;
    opacity: 0.4;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border: 1px solid #e0e0e0;
    min-width: 240px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    z-index: 200;
}

.dropdown-content.show {
    display: block;
}

/* ========================================
   ITEMS D'ÉDITION
   ======================================== */

.edition-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.8rem;
    font-weight: 300;
    color: #666;
    transition: all 0.2s;
}

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

.edition-item:hover {
    color: #333;
    background: #fafafa;
}

.edition-item.selected {
    color: #333;
    font-weight: 400;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        border-left: none;
        border-top: 1px solid #d0d0d0;
        padding-left: 0;
        padding-top: 0.75rem;
        flex-wrap: wrap;
    }
    
    .menu-years {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .current-edition-display,
    .years-list,
    .header-logos {
        position: static;
        transform: none;
    }
    
    .menu-options {
        grid-template-columns: 1fr;
    }
    
    .menu-options > label:first-child {
        grid-column: 1;
        justify-self: center;
    }
    
    .options-group {
        grid-column: 1;
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .header-left {
        align-items: center;
    }
    
    .header-top h1 {
        font-size: 1.5rem;
    }
    
    .years-list {
        flex-wrap: wrap;
        justify-content: center;
    }
}