/* =========================
   POLICES
========================= */
.poppins-light {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: normal;
}
.google-sans {
  font-family: "Google Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings: "GRAD" 0;
}
@font-face {
    font-family: "Koblenz-Bold";
    src: local("Koblenz-Bold"),
    url("Koblenz-Bold.woff2") format("woff2"),
    url("Koblenz-Bold.woff") format("woff"),
    url("Koblenz-Bold.ttf") format("truetype");
    font-display: swap;
}

/* =========================
   RESET & BODY
========================= */
body {
    font-family: "Poppins",'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:#111;
    margin:0;
    color:#222;
}
a {
    color:#c69749;
    text-decoration:none;
}
.fenetre-globale a {
    font-weight: bold;
}
a:hover {
    text-decoration:underline;
}

/* =========================
   HEADER / FOOTER
========================= */
header, footer {
    background:#111;
    color:#555;
    padding:1rem 2rem;
    max-width: 1200px;
    margin: auto;
}
footer {
    font-size: small;
    text-align: center;
}

/* =========================
   TITRE
========================= */
.titre {
    border: #555 1px solid;
    border-radius: 30px;
    background-color: #222;
    max-width: 1200px;
    text-align: center;
    margin:20px auto 5px auto;
    padding: 15px 0 30px 0 ;
}
.titre h1 {
    font-family: "Koblenz-Bold", sans-serif;
    font-weight: 400;
    font-size: 2.8rem;
    color:#c69749;
    margin: 0;
}
.titre h2 {
    font-family: "Koblenz-Bold", sans-serif;
    font-weight: 300;
    font-size:2.1rem;
    color:#7c5c27;
    margin: 0 0 -10px 0;
}
.titre p {
    font-size:0.85rem;
    color:#ccc;
    margin: 10px 0 0 0;
    line-height: 75%;
}
.titre img.couv, .titre img.auteur_new {
    mask-image: url(../Images/Masques/masque_index_couv.webp);
    -webkit-mask-image: url(../Images/Masques/masque_index_couv.webp);
    mask-size: contain;
    width:70%;
    border-radius:15px;
    margin-bottom:0;
    margin-top: 1rem;
    display: none;
}
@media (max-width: 767px) {
    .titre {
        border-radius: 0;
        border-left: none;
        border-right: none;
        text-align: center;
        margin:20px auto 0 auto;
        padding: 15px 0 30px 0 ;
    }
    .titre h1 {
        font-size: 2rem;
        line-height: 95%;
    }
    .titre h2 {
        font-size: 2rem;
        margin: 0;
    }
    .titre p.livre-tags {
        display: none;
    }
    .titre img.couv, .titre img.auteur_new {
        display:inline-block ;
        padding-top: 1rem;
    }
}

/* =========================
   GRID PRINCIPAL INDEX
========================= */
.index { 
    display:grid; 
    grid-template-columns:1fr; 
    gap:2rem; 
    padding:2rem; 
    max-width:1200px; 
    margin:0 auto; 
}
@media(min-width:768px) {
    .index {
        grid-template-columns:repeat(2,1fr);
    }
}
@media(min-width:1200px) {
    .index {
        grid-template-columns:repeat(3,1fr);
    }
}
@media (max-width: 767px) {
    .index {
        padding: 0;
        font-size: 85%;
        gap: 0;
    }
}

/* =========================
   CARTE CHRONIQUE
========================= */
.index-chro { 
    text-align: justify;
    background:#f9f9f9; 
    padding:2rem; 
    display:flex; 
    flex-direction:column; 
    gap:1rem; 
    border-radius:20px; 
    opacity:0; 
    transform:translateY(30px); 
    transition: opacity 0.6s ease, transform 0.6s ease; 
}
@media (max-width: 767px) {
    .index-chro {
        border-radius: 0;
    }
}
.index-chro.visible {
    opacity:1;
    transform:translateY(0);
}
.index-chro img.livre { 
    mask-image: url(../Images/Masques/masque_index_couv.webp);
    -webkit-mask-image: url(../Images/Masques/masque_index_couv.webp);
    mask-size: contain;
    width:100%;
    height:auto;
    border-radius:15px;
    object-fit:unset;
}
.index-chro img.auteur_new {
    mask-image: url(../Images/Masques/masque_index_couv.webp);
    -webkit-mask-image: url(../Images/Masques/masque_index_couv.webp);
    mask-size: contain;
    width:120px;
    height: 120px;
    border-radius:5px;
    object-fit:cover;
    margin-right:1rem;
}
.index-chro p.demi {
    text-align: center;
    margin-top: -15px;
}
.index-chro p.extrait {
    display: flex;
    align-items: flex-start;
}

/* =========================
   DATE BADGE
========================= */
.date-badge {
    width:100px; height:100px;
    background-color:#c69749;
    border:10px solid #111;
    border-radius:50%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    font-family: "Google Sans", sans-serif;
    color:#000;
    position:absolute;
    left:-12px;
    top:-12px;
    z-index:999;
}
@media (max-width: 767px) {
    .date-badge {
        left:-1px;
        top:-1px;
    }
}
.date-badge .day { font-size:35px; font-weight:bold; line-height:0.5; }
.date-badge .month { font-size:28px; font-weight:bold; line-height:0.5; }
.date-badge .year { font-size:18px; line-height:0.5; }
.date-badge .separator { width:50%; height:1px; background:#111; margin:6px 0; opacity:0.4; }

/* =========================
   TITRES & TEXTE
========================= */
h2 { font-size:1.2rem; margin-bottom:0.3rem; }
.demi { font-size:0.9rem; color:#555; }
.note { width:60px; float: left; margin-right: 10px; margin-top: 5px; }

/* =========================
   LOADING
========================= */
#loading { text-align:center; margin:2rem 0; font-size:1rem; color:#555; }

/* =========================
   MENU
========================= */
.main-nav {
    display: flex;
    background:#111;
    color:#fff;
    position:sticky;
    top:0;
    z-index:1000;
    justify-content: space-between;
    align-items:center;
    margin: 0 50px 0 50px;
}
.nav-container {
    max-width:900px;
    display:flex;
}
.social-links {
    margin-top: 7px;
}
.social-links img {
    padding: auto 2px;
    width: 25px;
    height:25px;
}
.logo {
    text-align:center;
}
.logo p {
    font-size: 0.9rem;
    color: #c69749;
    text-decoration:none;
    margin-top: -10px;
    line-height: 90%;
}
@media (max-width: 767px) {
    .main-nav {
        margin: 0 10px 0 10px;
    }
    .logo img {
        max-width: 300px;
    }
    .logo p {
        display: none;
    }
    .social-links img {
        width: 20px;
        height:20px;
    }
}
.nav-links {
    list-style:none;
    display:flex;
    gap:1.5rem;
}
.nav-links li a {
    display:flex;
    align-items:center;
    gap:0.5rem;
    background-color: #aaa;
    color: #111;
    font-size:0.95rem;
    padding:0.1rem 0.7rem 0.1rem 0.5rem;
    border-radius:6px;
    transition:background 0.2s ease;
}
.nav-links li a:hover { background:#222; }
.nav-links img { width:15px; height:15px; }
.nav-toggle { display:none; font-size:1.8rem; background:none; border:none; color:#fff; cursor:pointer; }
@media (max-width:768px) {
    .nav-toggle { display:block; }
    .nav-links {
        position:absolute; top:100%; left:0; right:0;
        flex-direction:column; gap:0;
        max-height:0; overflow:hidden; transition:max-height 0.3s ease;
    }
    .nav-links.open { width: 100%; max-height:300px; padding: 0; }
    .nav-links li a { padding:0.5rem; border-bottom:1px solid #222; }
}

/* =========================
   RETOUR EN HAUT
========================= */
a#cRetour { position:fixed; right:25px; opacity:1; z-index:999; transition:all ease-in 0.2s; backface-visibility:hidden; }
a#cRetour:before { content: url("../Images/Boutons/Top_40x40.webp"); }
a#cRetour:hover { transition:all ease-in 0.3s; }
a#cRetour.cInvisible { bottom:-35px; opacity:0; transition:all ease-in 1s; }
a#cRetour.cVisible { bottom:30px; opacity:1; }

/* =========================
   PAGE LIVRE
========================= */
.fenetre-globale {
    display:flex;
    flex-direction:column;
    gap:2rem;
    padding:1rem 2rem;
    max-width:1200px;
    margin:0 auto;
}
.fenetre-gauche, .fenetre-droite {
    text-align: justify;
    background:#eee;
    padding:1rem 40px 50px 40px;
    border-radius:30px;
}
.fenetre-gauche img.couv{
    mask-image: url(../Images/Masques/masque_index_couv.webp);
    -webkit-mask-image: url(../Images/Masques/masque_index_couv.webp);
    mask-size: contain;
    width:80%;
    border-radius:15px;
    margin-bottom:1rem;
    margin-top: 1rem;
}
@media (max-width: 767px) {
    .fenetre-gauche img.couv, .fenetre-gauche img.auteur_new {
        display: none;
    }
}
.fenetre-gauche img.auteur_new {
    mask-image: url(../Images/Masques/masque_index_couv.webp);
    -webkit-mask-image: url(../Images/Masques/masque_index_couv.webp);
    mask-size: contain;
    width:80%;
    border-radius:15px;
    margin-bottom:1rem;
    margin-top: 1rem;
}
.fenetre-droite img.auteur_new { 
    mask-image: url(../Images/Masques/masque_index_couv.webp);
    -webkit-mask-image: url(../Images/Masques/masque_index_couv.webp);
    mask-size: contain;
    float: left;
    width:100%;
    border-radius:5px;
    object-fit:cover;
}
.fenetre-gauche h2, .fenetre-droite h2 {
    font-family: "Google Sans", sans-serif;
    background-image : linear-gradient(to left, #eee, #aaa, #aaa, #aaa, #eee);
    border-radius: 10px;
    font-size:1.4rem;
    text-align: center;
    margin-bottom:0.3rem;
    padding: 0.4rem 0;
    box-shadow: 3px 3px 3px #555;
}
.fenetre-gauche blockquote {
    font-size: 90%;
    background-color: #ccc;
    border-left: 4px solid #c69749;
    border-right: 4px solid #c69749;
    margin: 1rem 0;
    padding: 0.5rem 1.5rem;
    color: #222;
    font-style: italic;
    box-shadow: 3px 3px 3px #555;
}
.fenetre-droite img.edition {
    width:100%;
    margin-right: 1rem;
    border-radius:7px;
}
.vousavez img {
    margin: 5px 10px 0 0;
    border-radius: 5px;
    box-shadow: 3px 3px 3px #555;
}

/* Flex pour desktop */
@media(min-width:992px){
    .fenetre-globale { flex-direction:row; }
    .fenetre-gauche { flex:1; }
    .fenetre-droite { flex:1; display:flex; flex-direction:column; gap:1rem; }
}
@media (max-width: 767px) {
    .fenetre-globale {
        padding: 0;
        gap: 0;
    }
    .fenetre-gauche, .fenetre-droite {
        padding: 1.5rem;
        border-radius: 0;
        font-size: 85%;
    }
}

/* Bibliographie */
.livre-biblio {
    text-align: center;
    max-width:1200px;
    margin: 20px auto;
}
.livre-biblio h2 {
    font-family: "Google Sans", sans-serif;
    color: #c69749;
    font-size: 1.8rem;
    text-align: center;
    margin:0;
    padding: 15px 0;
}
.livre-biblio p.demi {
    font-size:0.9rem;
    color:#ccc;
    margin: -15px 0 10px 0;
}
.livre-biblio img {
    width:120px;
    height: 188px;
    margin:0.5rem;
    border-radius:7px;
    box-shadow: 3px 3px 3px #555;
}
.livre-biblio img:hover {
    box-shadow: 0 0 15px #ccc;
}

/* Tags */
.livre-tags a { color:#c69749; padding: 0.1rem;}

/* ===============================
   SELECTEUR ALPHABETIQUE
=============================== */
.alpha-selector {
    display:flex;
    flex-wrap:wrap;
    gap:0.5rem;
    justify-content:center;
    margin:2rem auto 0.5rem auto;
    max-width:900px;
}
.alpha-btn {
    background:#111;
    color:#c69749;
    border:1px solid #333;
    border-radius:999px;
    padding:0.4rem 0.8rem;
    font-size:0.9rem;
    cursor:pointer;
    transition:all 0.2s ease;
}
.alpha-btn:hover {
    background:#222;
}
.alpha-btn.active {
    background:#c69749;
    color:#000;
    font-weight:bold;
}

/* ===============================
   PAGE TROMBINOSCOPE
=============================== */
.trombi-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(120px,1fr));
    gap:0.5rem;
    padding:2rem;
    max-width:1200px;
    margin:auto;
}
.trombi-grid p {
    margin: 0 auto;
}
.trombi-card {
    position:relative;
    display:block;
    overflow:hidden;
    border-radius:7px;
}
.trombi-card img {
    width:100%;
    height:auto;
    display:block;
}
.trombi-name {
    font-size: small;
    position:absolute;
    inset:0;
    background:#111;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    opacity:0;
    transition:opacity 0.3s ease;
    padding:0.5rem;
}
.trombi-card:hover .trombi-name {
    opacity:0.7;
}
p.placeholder {
    text-align:center;
    color:#777;
    grid-column:1/-1;
}

/* ===============================
   PAGE ARCHIVES
=============================== */
.archive-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1200px;
    margin: 30px auto;
    gap: 2rem;
    align-items: flex-start;
}
.archive-column {
    background: #eee;
    padding:1rem 40px 30px 40px;
    border-radius: 30px;
}
.archive-column.romans {
    flex: 3;
    background:#eee; 

}
.archive-column.auteurs {
    flex: 2;
    background:#eee;
}
.archive-column h3 {
    font-family: "Google Sans", sans-serif;
    background-image : linear-gradient(to left, #eee, #aaa, #aaa, #aaa, #eee);
    border-radius: 10px;
    font-size:1.4rem;
    text-align: center;
    margin-bottom:1.5rem;
    padding: 0.4rem 0;
    box-shadow: 3px 3px 3px #555;
}
@media (max-width: 767px) {
    .archive-columns {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0 auto;
    }
    .archive-column {
        border-radius: 0;
    }
}

/* ===== Romans ===== */
.roman-item {
    margin-bottom: .6rem;
    line-height: 1.4;
}
.roman-item img.note {
    width: 20px;
    margin: 1px 5px 0 0;
}
.roman-title {
    color: #000;
    text-decoration: none;
}
.roman-title:hover {
    color: #c69749;
}
.roman-author {
    font-size: .9rem;
    color: #aaa;
}
.roman-author a {
    color: #aaa;
}
.roman-author a:hover {
    color: #c69749;
}

/* ===== Auteurs ===== */
.auteur-item {
    margin-bottom: .5rem;
}
.auteur-item a {
    text-decoration: none;
}
.auteur-item a:hover {
    color: #c69749;
}
.lang {
    font-size: .6rem;
    background: #c69749;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 50px;
}

/* ===== États vides ===== */
.empty {
    font-style: italic;
    color: #888;
}

/* ===============================
   AUTEURS – ACCORDÉON
=============================== */
.auteur-item {
    margin-bottom: .5rem;
}
.auteur-toggle {
    font-family: "Poppins", sans-serif;
    background: none;
    border: none;
    padding: 0;
    color: #000;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.auteur-toggle:hover {
    color: #c69749;
}
.auteur-livres {
    margin-left: 1rem;
    margin-top: .4rem;
    display: none;
    flex-direction: column;
}
.auteur-livres a {
    font-size: .9rem;
    color: #aaa;
    text-decoration: none;
    margin: 0;
}
.auteur-livres a:hover {
    color: #c69749;
    text-decoration: underline;
}

/* état ouvert */
.auteur-livres.open {
    display: flex;
    max-height: 1000px;
    padding: 0 0 1rem 0;
}
.auteur-livres {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding-left: 1rem;
}

/* =========================
   PAGE ERREUR 404
========================= */
.notfound-img {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.25;
}

/* =========================
   INFO BULLES
========================= */
/* chronique index */
.ifbindex {
    float: left;
    width: 120px;
    height: 120px;
    overflow:hidden;
    border-radius:5px;
    margin-right: 10px;
}
.ifbindexauth {
    font-size:large;
    position:absolute;
    inset:0;
    background:#111;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    opacity:0;
    transition:opacity 0.3s ease;
}

.ifbindex:hover .ifbindexauth {
    opacity:0.65;
}

/* image auteur */
.ifbaut {
    float: left;
    width: 175px;
    height: 175px;
    position:relative;
    overflow:hidden;
    border-radius:7px;
    margin: 7px 15px 0 0;
    box-shadow: 3px 3px 3px #555;
}

.ifbauttxt {
    font-size:medium;
    position:absolute;
    inset:0;
    background:#111;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    opacity:0;
    transition:opacity 0.3s ease;
}

.ifbaut:hover .ifbauttxt {
    opacity:0.65;
}
/* image éditions */
.ifbedit {
    width: 125px;
    height: 188px;
    position:relative;
    display: inline-block;
    overflow:hidden;
    border-radius:7px;
    margin: 0 15px 10px 0;
    box-shadow: 3px 3px 3px #555;
}
.ifbedittxt {
    font-size: small;
    position:absolute;
    inset:0;
    background:#111;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    opacity:0;
    transition:opacity 0.3s ease;
}
.ifbedit:hover .ifbedittxt {
    opacity:0.65;
}

/* ===========================
   PAGE RECHERCHE
   =========================== */
/* Module de recherche */
.fenetre-recherche {
    max-width:1200px;
    margin:20px auto 5px auto;
    text-align: justify;
    background:#eee;
    padding: 15px 0 30px 0 ;
    border-radius:30px;
}
.recherche-module {
    padding: 20px 40px;
}
.recherche-module p.intro {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 30px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
.recherche-coche {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
}
.rech-genre1,
.rech-genre2,
.rech-theme,
.rech-perso,
.rech-divers {
    width: 100%;
    margin: 0;
}
.recherche-module p.demi {
    font-size: 12px;
    color: #444;
    margin-bottom: 0;
}
.recherche-coche input[type=checkbox] {
    accent-color: #c69749;
    margin-right: 6px;
    transform: scale(1.05);
    cursor: pointer;
}
.recherche-coche label,
.recherche-coche p {
    font-size: 13px;
    color: #222;
}
.rech-divers select {
    width: 100%;
    padding: 3px 8px;
    font-size: 13px;
    background: #fff;
    color: #222;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border 0.3s, box-shadow 0.3s;
}
.rech-divers select:focus {
    border-color: #c69749;
    box-shadow: 0 0 0 2px rgba(198,151,73,0.2);
    outline: none;
}
.rech-bouton {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}
.rech-bouton input[type=submit],
.rech-bouton button {
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 20px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}
.rech-bouton input[type=submit] {
    background: #1f1f1f;
    color: #fff;
}
.rech-bouton input[type=submit]:hover {
    background: #c69749;
    color: #1f1f1f;
}
.rech-bouton button {
    background: transparent;
    color: #555;
    border: 1px solid #ccc;
}
.rech-bouton button:hover {
    background: #eee;
}

/* affichage des résultats */
.fenetre-resultats {
    max-width:1200px;
    margin:20px auto 5px auto;
    text-align: center;
    background:#eee;
    padding: 15px 0 30px 0 ;
    border-radius:30px;
}
.fenetre-resultats img {
    width: 100px;
    height: 150px;
    margin: 0 5px 10px 5px;
    border-radius: 7px;
    box-shadow: 3px 3px 3px #555;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fenetre-resultats img:hover {
    transform: scale(1.15);
    box-shadow: 3px 3px 3px #555;
}

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

@media (max-width: 900px) {
    .recherche-module {
        padding: 30px 20px;
    }
}
@media (max-width: 600px) {
    .recherche-coche {
        grid-template-columns: 1fr;
    }
    .rech-bouton {
        flex-direction: column;
    }
}

/* ===========================
   PAGE DE LIENS
   =========================== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding-top: 30px;
}
.link-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 3px 3px 3px #555;
    transition: transform 0.2s, box-shadow 0.2s;
}
.link-card:hover {
    box-shadow: 0 0 15px #555;
}
.link-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
.card-description {
    padding: 15px;
}
.card-description h3 {
    font-family: "Google Sans";
    margin: 0 0 8px;
    font-size: 1rem;
}
.card-description a {
    color:#c69749;
}
.link-card a:hover {
    text-decoration: none;
}
.link-card a h3:hover {
    text-decoration: underline;
}
.card-description p {
    margin: 0;
    font-size: 0.8rem;
    font-weight: lighter;
    color: #666;
}
@media (max-width: 600px) {
    .link-grid {
        grid-template-columns: 1fr;
    }
}
