/* ==== LIBRE FRANKLIN (titres, menu) ==== */

/* Libre Franklin - Regular 400 */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/libre-franklin-v20-latin-regular.woff2') format('woff2');
}

/* Libre Franklin - Medium 500 */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/libre-franklin-v20-latin-500.woff2') format('woff2');
}

/* Libre Franklin - SemiBold 600 */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/libre-franklin-v20-latin-600.woff2') format('woff2');
}

/* Libre Franklin - SemiBold 600 Italic */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: italic;
  font-weight: 600;
  src: url('/fonts/libre-franklin-v20-latin-600italic.woff2') format('woff2');
}

/* Libre Franklin - Bold 700 */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/libre-franklin-v20-latin-700.woff2') format('woff2');
}

/* Libre Franklin - Bold 700 Italic */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: italic;
  font-weight: 700;
  src: url('/fonts/libre-franklin-v20-latin-700italic.woff2') format('woff2');
}

/* Libre Franklin - ExtraBold 800 */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 800;
  src: url('/fonts/libre-franklin-v20-latin-800.woff2') format('woff2');
}

/* Libre Franklin - ExtraBold 800 Italic */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: italic;
  font-weight: 800;
  src: url('/fonts/libre-franklin-v20-latin-800italic.woff2') format('woff2');
}

/* Libre Franklin - Black 900 */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: normal;
  font-weight: 900;
  src: url('/fonts/libre-franklin-v20-latin-900.woff2') format('woff2');
}

/* Libre Franklin - Black 900 Italic */
@font-face {
  font-display: swap;
  font-family: 'Libre Franklin';
  font-style: italic;
  font-weight: 900;
  src: url('/fonts/libre-franklin-v20-latin-900italic.woff2') format('woff2');
}

/* ==== LIBRE BASKERVILLE (corps de texte) ==== */

/* Libre Baskerville - Regular 400 */
@font-face {
  font-display: swap;
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/libre-baskerville-v24-latin-regular.woff2') format('woff2');
}

/* Libre Baskerville - Italic 400 */
@font-face {
  font-display: swap;
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  src: url('/fonts/libre-baskerville-v24-latin-italic.woff2') format('woff2');
}

/* Libre Baskerville - Bold 700 */
@font-face {
  font-display: swap;
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/libre-baskerville-v24-latin-700.woff2') format('woff2');
}


/* ==== DÉCLARATIONS DES POLICES ==== */

/* Libre Franklin - Titres et menu */
h1, h2, h3, h4, h5, h6,
.nav-title,
.nav a,
.catalogue-title,
.catalogue-title a,
.post-title,
.section-title {
    font-family: 'Libre Franklin', -apple-system, sans-serif !important;
}

/* ==== HIÉRARCHIE TYPOGRAPHIQUE ==== */

/* Titre du site - Black 900 */
.nav-title {
    font-weight: 900 !important;
    letter-spacing: -0.02em !important;
    color: var(--text) !important;
}

/* Menu - Bold 700 */
.nav a,
.menu a {
    font-weight: 700 !important;
}

/* H1 - Black 900 (dans les posts uniquement) */
.post h1,
.post-title,
article h1 {
    font-weight: 900 !important;
    font-family: 'Libre Franklin', -apple-system, sans-serif !important;
    letter-spacing: -0.03em !important;
}

/* H2 - ExtraBold 800 */
h2,
.post h2,
article h2 {
    font-weight: 800 !important;
    font-family: 'Libre Franklin', -apple-system, sans-serif !important;
    letter-spacing: -0.025em !important;
}

/* H3 - Bold 700 */
h3,
.post h3,
article h3 {
    font-weight: 700 !important;
    font-family: 'Libre Franklin', -apple-system, sans-serif !important;
    letter-spacing: -0.02em !important;
}

/* ==== VARIABLES DE COULEUR ==== */
:root {
    --bg: #fff;
    --bg-secondary: #f8f9fa;
    --text: #333;
    --text-secondary: #666;
    --link: #0066cc;
    --link-orange: #ff6b35;
    --border: #e1e4e8;
    --code-bg: #f6f8fa;
}

.dark-theme,
html.dark-theme {
    --bg: #1a1a1a;
    --bg-secondary: #242424;
    --text: #e4e4e4;
    --text-secondary: #a8a8a8;
    --link: #66b3ff;
    --link-orange: #ff8c5a;
    --border: #3a3a3a;
    --code-bg: #2d2d2d;
}

/* ==== APPLICATION DES VARIABLES ==== */
html, body {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    min-height: 100vh;
}

main, .wrapper, .container, header, footer {
    background-color: var(--bg) !important;
}

a {
    color: var(--link) !important;
}

.post h1, .post h2, .post h3, .post h4, .post h5, .post h6,
.catalogue-title {
    color: var(--text) !important;
}

code, pre {
    background-color: var(--code-bg) !important;
    color: var(--text) !important;
}

hr, .post-line {
    border-color: var(--border) !important;
}

footer {
    color: var(--text-secondary) !important;
}

.pagination a {
    color: var(--link) !important;
}

.catalogue-item p,
.catalogue-item p * {
    color: var(--text) !important;
}

/* ==== CORPS DE TEXTE (justification et césure) ==== */

body, 
p, 
.post p,
article p,
.catalogue-item p,
.content p {
    font-family: 'Libre Baskerville', Georgia, serif !important;
    font-size: 1.125rem !important;
    line-height: 1.6 !important;
    text-align: left !important;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    word-spacing: -0.05em;
}

/* Règles de césure spécifiques par langue */
html[lang="fr"] .post p,
html[lang="fr"] article p,
html[lang="fr"] .content p,
html[lang="fr-FR"] .post p,
html[lang="fr-FR"] article p,
html[lang="fr-FR"] .content p {
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 3;
    hyphenate-limit-chars: 6 3 3; /* min 6 caractères, min 3 avant/après */
}

html[lang="en"] .post p,
html[lang="en"] article p,
html[lang="en"] .content p,
html[lang="en-US"] .post p,
html[lang="en-US"] article p,
html[lang="en-US"] .content p {
    -webkit-hyphenate-limit-before: 2;
    -webkit-hyphenate-limit-after: 3;
    hyphenate-limit-chars: 5 2 3; /* Anglais : règles moins strictes */
}

/* Pas de césure dans les liens */
.post a,
article a,
.content a {
    hyphens: none;
    -webkit-hyphens: none;
}

/* ==== EXPOSANTS (superscript) ==== */
sup {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
    top: -0.5em;
}

/* ==== LIENS ==== */

/* Liens dans le contenu des posts/pages - orange */
.post a,
article a,
.content a {
    color: var(--text) !important;
    text-decoration: underline;
    text-decoration-color: var(--link-orange) !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
    display: inline; /* ← Assure que c'est bien inline */
    white-space: normal; /* ← Pas de nowrap finalement */
    word-spacing: inherit; /* ← Hérite de l'espacement parent */
    letter-spacing: inherit; /* ← Idem */
}

.post a:hover,
article a:hover,
.content a:hover {
    color: var(--link-orange) !important;
    text-decoration-thickness: 2px;
}

/* Liens dans les listes de posts - style par défaut */
.catalogue-title a {
    color: var(--text) !important;
    text-decoration: none !important;
}

.catalogue-title a:hover {
    color: var(--text) !important;
}

/* Résumés : texte simple, pas de formatage */
.catalogue-item p {
    font-family: 'Libre Baskerville', Georgia, serif !important;
    font-size: 1.125rem !important;
    line-height: 1.4 !important;  /* ← Interligne réduit */
    font-weight: 400 !important;
    font-style: normal !important;
    display: block !important;
    white-space: normal !important;
    text-align: justify !important;  /* ← Justification ajoutée */
}


/* ==== CITATIONS ==== */
blockquote,
.post blockquote {
    border-left-color: #999 !important;
    color: var(--text-secondary) !important;
}

/* ==== NOTES DE BAS DE PAGE ==== */
.footnotes {
    font-size: 0.98rem !important;
    line-height: 1.5 !important;
}

.footnotes p {
    font-size: 0.98rem !important;
    line-height: 1.5 !important;
}

.footnotes ol {
    font-size: 0.98rem !important;
}

.footnotes li {
    font-size: 0.85rem !important;
    margin-bottom: 0.5rem;
}

/* ==== HEADER ==== */
nav.nav {
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 0.1rem !important;
    margin-bottom: 3rem !important;
}

/* ==== MENU LAYOUT ==== */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
}

.nav-title {
    flex-shrink: 0;
    margin-right: auto;
}

.nav a {
    color: var(--text) !important;
}

.nav-container ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    align-items: center;
}

.nav-container ul li {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
}

/* Séparateur avant langue et dark mode */
.nav-container ul li:nth-last-child(2)::before {
    content: "|";
    margin-right: 1rem;
    margin-left: 1rem;
    color: var(--border);
}

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

@media (max-width: 768px) {
    /* Padding pour le header en mobile */
    nav.nav {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-container ul {
        margin-top: 1rem;
    }
    
    /* Retire le séparateur en mobile */
    .nav-container ul li:nth-last-child(2)::before {
        display: none !important;
    }
    
    .book-covers {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Désactiver la justification en mobile (mais garder la césure) */
    body, 
    p, 
    .post p,
    article p,
    .catalogue-item p,
    .content p {
        text-align: left !important;
    }
    
    /* Réduire la taille des H1 en mobile */
    .post h1,
    article h1,
    .post-title {
        font-size: 2.8rem !important;
    }
    
    /* Titres des listes restent à gauche */
    .catalogue-title,
    .catalogue-title a {
        text-align: left !important;
    }
    
    /* Titre principal des posts/pages reste centré */
    .post-title,
    .post > h1:first-of-type,
    article > h1:first-of-type {
        text-align: center !important;
    }
    
    /* Intertitres restent à gauche */
    .post h2,
    .post h3,
    article h2,
    article h3 {
        text-align: left !important;
    }
}

/* ==== DARK MODE TOGGLE ==== */
#dark-mode-toggle {
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center;
    padding: 0.25rem;
    text-decoration: none !important;
    position: relative;
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

.dark-theme .sun-icon {
    display: block;
}

.dark-theme .moon-icon {
    display: none;
}

#dark-mode-toggle svg {
    transition: transform 0.3s ease;
    stroke: var(--text);
    fill: none;
}

#dark-mode-toggle:hover svg {
    transform: rotate(20deg);
}


/* ==== INTRO HOME ==== */

.book-covers {
    display: flex;
    flex-direction: row; /* ← Ajoutez cette ligne */
    gap: 2rem;
    width: 100%;
    align-items: flex-end;
}

.book-covers a {
    flex: 1;
    display: flex;
    align-items: flex-start;
}

.book-cover {
    width: 100%;
    height: auto;
    max-height: 550px; /* ← Augmentez la hauteur max */
    object-fit: contain;
    display: block;
    border: none;
    transition: transform 0.3s ease;
}

.book-cover:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
}

.dark-theme .book-cover:hover {
    filter: drop-shadow(0 8px 16px rgba(255, 255, 255, 0.1));
}

/* Liseret noir pour Contre-histoire d'Internet */
img[src="/images/contre-histoire-cover.jpeg"],
img[src*="contre-histoire"] {
    border: 1px solid #000 !important;
}

/* ==== IMAGES ==== */

.post img, article img, .content img, main img {
    width: 100%;
    max-width: 700px;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

figure {
    margin: 1.5rem auto;
    max-width: 700px;
}

figure img {
    width: 100% !important;
    height: auto;
    margin: 0;
}

/* full = pleine largeur viewport */
figure.full {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* medium = largeur du texte (défaut) */
figure.medium {
    max-width: 700px;
    width: 100%;
}

/* small = largeur fixe 350px, centré */
figure.small {
    max-width: 350px;
    width: 100%;
}

/* xs = très petit, pour icônes/logos */
figure.xs {
    max-width: 200px;
    width: 100%;
}

/* Légendes d'images (figcaption) */
figcaption,
.post figcaption,
article figcaption {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}


/* Exception pour les couvertures de livres sur la page d'accueil */
.book-cover {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}


/* ==== PAGINATION ET NAVIGATION ==== */

/* Flèches de pagination (← →) */
.pagination a {
    color: var(--link-orange) !important;
    text-decoration: none;
}

.pagination a:hover {
    color: var(--link-orange) !important;
    opacity: 0.7;
}

/* Lien "Top" en bas des pages */
.pagination .top {
    color: var(--link-orange) !important;
    text-decoration: none;
}

.pagination .top:hover {
    color: var(--link-orange) !important;
    opacity: 0.7;
}

/* Numéro de page */
.pagination span {
    color: var(--text) !important;
}


/* ==== PAGES PROTÉGÉES PAR MOT DE PASSE ==== */
.protected-page {
    text-align: center;
    padding: 3rem 0;
}

.password-form {
    margin: 2rem auto;
    max-width: 300px;
}

.password-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Libre Franklin', sans-serif;
    border: 1px solid var(--border);
    background-color: var(--bg);
    color: var(--text);
    margin-bottom: 1rem;
    border-radius: 4px;
}

.password-form input:focus {
    outline: none;
    border-color: var(--link-orange);
}

.password-form button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: 'Libre Franklin', sans-serif;
    font-weight: 700;
    background-color: var(--link-orange);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.password-form button:hover {
    opacity: 0.8;
}

#error-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===========================
   TABLE DES MATIÈRES
   =========================== */

.toc {
  background: transparent;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: 3px;
}

.toc h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-family: 'Libre Franklin', sans-serif;
  font-weight: 700;
}

/* Premier niveau de la ToC (##) */
.toc nav > ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc nav > ul > li {
  margin: 0.8rem 0;
}

.toc nav > ul > li > a {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Libre Franklin', sans-serif;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--link-orange) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.toc nav > ul > li > a:hover {
  color: var(--link-orange) !important;
  text-decoration-thickness: 2px;
}

/* Deuxième niveau (###) avec indentation */
.toc nav > ul > li > ul {
  padding-left: 1.5rem;
  margin-top: 0.5rem;
  margin-left: 1.5rem;  /* ← Ajouter cette ligne */
}

.toc nav > ul > li > ul > li {
  margin: 0.5rem 0;
}

.toc nav > ul > li > ul > li > a {
  font-size: 1rem;
  font-weight: 400;
  font-family: 'Libre Baskerville', serif;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--link-orange) !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.toc nav > ul > li > ul > li > a:hover {
  color: var(--link-orange) !important;
  text-decoration-thickness: 2px;
}

/* Retirer tous les bullets de la ToC */
.toc ul {
  list-style-type: none !important;
  padding-left: 0;
}

.toc nav ul li::before {
  content: none !important;
}

/* ==== NOTICE DE TRADUCTION ==== */
.translation-notice {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.9em;
    display: inline-block;
    margin-left: 0.5rem;
}

/* ==== LARGEUR DU CONTENU ==== */
main {
    max-width: 700px;
    margin: 0 auto;
}

.catalogue {
    max-width: 700px;
    margin: 0 auto;
}

/* ==== TITRES EN DARK MODE ==== */
.dark-theme h1,
.dark-theme h2,
.dark-theme .section-title {
    color: var(--text) !important;
}

/* Titre "Parutions récentes" - même style que titres de liste */
.home-intro .section-title {
    font-family: 'Libre Franklin', -apple-system, sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

/* ==== TITRES DANS LES LISTES ==== */
/* Cette règle doit être après toutes les autres pour avoir la priorité */
.catalogue-item h1,
.catalogue-item .catalogue-title,
.catalogue-item .catalogue-title a {
    font-weight: 800 !important;
    font-family: 'Libre Franklin', -apple-system, sans-serif !important;
    letter-spacing: -0.02em !important;
    
    
}

/* ==== TITRES DANS LES PAGES SINGLE ==== */
/* Uniquement le titre principal centré */
.post-title,
.post > h1:first-of-type,
article > h1:first-of-type {
    text-align: center !important;
}

/* Les intertitres (H2, H3) restent alignés à gauche */
.post h2,
.post h3,
article h2,
article h3 {
    text-align: left !important;
}

/* ==== TITRES DANS LES LISTES (alignés à gauche) ==== */
.catalogue-title,
.catalogue-title a {
    text-align: left !important;
}

/* ==== RESPONSIVE MOBILE ==== */
@media (max-width: 768px) {
    /* Navigation */
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav-container ul {
        margin-top: 1rem;
    }
    
    /* Couvertures de livres */
    .book-covers {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* Désactiver la justification en mobile (mais garder la césure) */
    /* ⬇️ POUR RÉTABLIR LA JUSTIFICATION EN MOBILE : remplacer "left" par "justify" */
    body, 
    p, 
    .post p,
    article p,
    .catalogue-item p,
    .content p {
        text-align: left !important;
    }
    
    /* Réduire la taille des H1 en mobile */
    .post h1,
    article h1,
    .post-title {
        font-size: 2.8rem !important;
    }
    
    /* Titres des listes restent à gauche */
    .catalogue-title,
    .catalogue-title a {
        text-align: left !important;
    }
    
    /* Titre principal des posts/pages reste centré */
    .post-title,
    .post > h1:first-of-type,
    article > h1:first-of-type {
        text-align: center !important;
    }
    
    /* Intertitres restent à gauche */
    .post h2,
    .post h3,
    article h2,
    article h3 {
        text-align: left !important;
    }
}

/* ==== IMAGES CLIQUABLES ==== */
.post a img,
article a img,
.content a img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post a:hover img,
article a:hover img,
.content a:hover img {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.20);
}

.dark-theme .post a:hover img,
.dark-theme article a:hover img,
.dark-theme .content a:hover img {
    box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
}


/* ==== PORTRAIT FLOTTANT (àpropos/about) ==== */

.portrait-float {
    width: 200px !important;
    height: 200px !important;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    float: right;
    margin: 0 -220px 1.5rem 2rem !important;
    shape-outside: circle();
}

@media (max-width: 1100px) {
    .portrait-float {
        margin: 0 0 1.5rem 2rem !important;
    }
}

/* ==== BARRE UNIFIÉE RECHERCHE + ANNÉE ==== */
.search-filter-bar {
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid var(--border) !important;
    margin: 0 0 1.5rem 0 !important;
    background: transparent !important;
    transition: border-color 0.3s ease;
}

.search-filter-bar:focus-within {
    border-bottom-color: var(--link-orange) !important;
}

.search-filter-bar input[type="text"] {
    flex: 1 !important;
    width: auto !important;
    padding: 0.75rem 0 !important;
    font-size: 1rem !important;
    font-family: 'Libre Baskerville', Georgia, serif !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: var(--text) !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}

.search-filter-bar input[type="text"]::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.5 !important;
}

.bar-divider {
    width: 1px !important;
    height: 1.2rem !important;
    background: var(--border) !important;
    flex-shrink: 0 !important;
    margin: 0 0.75rem !important;
    display: block !important;
}

/* ==== FILTRE PAR ANNÉE ==== */
.year-filter {
    position: relative !important;
    flex-shrink: 0 !important;
}

.year-select-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 0 !important;
    font-size: 1rem !important;
    font-family: 'Libre Baskerville', Georgia, serif !important;
    background: none !important;
    border: none !important;
    color: var(--text-secondary) !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.year-select-trigger:hover,
.year-select-trigger.open {
    opacity: 1 !important;
}

.year-select-trigger.has-selection {
    color: var(--text) !important;
    opacity: 1 !important;
}

.year-select-trigger .trigger-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.year-select-trigger.open .trigger-arrow {
    transform: rotate(180deg);
}

/* ==== DROPDOWN ANNÉES ==== */
.year-select-dropdown {
    display: none;
    position: absolute !important;
    top: calc(100% + 1px) !important;
    right: 0 !important;
    min-width: 160px !important;
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    z-index: 200 !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important;
}

.year-select-dropdown.open {
    display: block !important;
}

.year-option-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.5rem 1rem !important;
    font-family: 'Libre Baskerville', Georgia, serif !important;
    font-size: 1rem !important;
    background: none !important;
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: left !important;
    cursor: pointer !important;
    color: var(--text) !important;
    transition: color 0.2s ease;
}

.year-option-btn:last-child {
    border-bottom: none !important;
}

.year-option-btn:hover {
    color: var(--link-orange) !important;
    background: var(--bg-secondary) !important;
}

.year-option-btn.active {
    color: var(--link-orange) !important;
    font-weight: 700 !important;
}
