/*

Theme Name: keskustakirjasto

Author: Me

Description: Thème unique.

Version: 1.9

Text Domain: keskustakirjasto

*/

@media (max-width: 991px) {
    .T2525f169d:before {
   right: 29px !important;
        
    }
}

:root {

    /* --- VARIABLES PAR DÉFAUT (Écrasées par le Customizer) --- */

    

    /* Fonds */

    --bg-color: #0f172a;          /* Body Background */

    --header-bg: #1e293b;         /* Header & Footer Background */

    

    /* Textes */

    --text-color: #f1f5f9;        /* Body Font */

    --heading-color: #ffffff;     /* Headings */

    --header-text-color: #ffffff; /* Header & Footer Font */

    

    /* Éléments interactifs */

    --link-color: #fbbf24;        /* Links */

    --btn-bg: #fbbf24;            /* Buttons */

    --btn-text: #000000;          /* Button Text */

    

    /* Polices (Gérées par PHP) */

    --font-body: sans-serif;

    --font-heading: sans-serif;



    /* Variables fixes */

    --container-width: 1200px;

    --radius: 5px;

}



/* Reset & Base */

* { box-sizing: border-box; margin: 0; padding: 0; }



body {

    background-color: var(--bg-color);

    color: var(--text-color);

    font-family: var(--font-body);

    line-height: 1.8;

    font-size: 18px;

}



/* LIENS */

a { color: var(--link-color); text-decoration: none; transition: 0.2s; }

a:hover { filter: brightness(1.2); text-decoration: underline; }



/* IMAGES */

img { 

    max-width: 100%; 

    height: auto; 

    display: block;

    margin-bottom: 2rem; 

    border-radius: 4px;

}



/* Alignements WordPress */

.aligncenter { display: block; margin: 0 auto 2rem; clear: both; }

.alignleft { float: left; margin: 0 1.5em 1em 0; }

.alignright { float: right; margin: 0 0 1em 1.5em; }



/* HEADER */

.site-header {

    background: var(--header-bg);

    color: var(--header-text-color);

    padding: 1rem 0;

    box-shadow: 0 2px 10px rgba(0,0,0,0.1);

    width: 100%;

    z-index: 1000;

}



.header-container {

    max-width: var(--container-width);

    margin: 0 auto;

    padding: 0 20px;

    display: flex;

    justify-content: space-between;

    align-items: center;

    flex-wrap: wrap;

}



/* Logo & Titre */

.site-branding { flex-shrink: 0; }

.custom-logo-link img { height: auto; margin-bottom: 0; }

.site-title a { 

    font-size: 1.5rem; 

    font-weight: 800; 

    color: var(--header-text-color); 

    text-transform: uppercase; 

    text-decoration: none; 

}



/* Navigation Desktop */

.main-navigation ul { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; }

.main-navigation a { 

    color: var(--header-text-color); 

    font-weight: 500; 

    font-size: 1rem; 

}

.main-navigation a:hover { color: var(--link-color); text-decoration: none; }



/* Menu Toggle (Mobile) */

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; }

.menu-toggle span { display: block; width: 25px; height: 3px; background-color: var(--header-text-color); margin: 5px 0; transition: 0.3s; }



/* CONTENU */

.site-content {

    max-width: var(--container-width);

    margin: 20px auto;

    padding: 0 20px;

    min-height: 60vh;

}



/* --- TYPOGRAPHIE & ESPACEMENT --- */



/* Titres */

h1, h2, h3, h4, h5 { 

    color: var(--heading-color); 

    font-family: var(--font-heading);

    line-height: 1.3; 

    margin: 1.5rem 0 1rem; 

    font-weight: 700; 

}

h1 { font-size: 2.5rem; text-align: center; margin-top: 1rem; }

h2 { font-size: 2rem; border-bottom: 1px solid var(--link-color); padding-bottom: 10px; display: inline-block; }

h3 { font-size: 1.5rem; }



/* Paragraphes & Listes */

.entry-content p { margin-bottom: 1rem; }

.entry-content ul, .entry-content ol { margin-bottom: 1.5rem; padding-left: 2rem; }

.entry-content li { margin-bottom: 0.5rem; }

.entry-content ul ul, .entry-content ol ol { margin-bottom: 0; }



/* Méta Données */

.entry-meta { display: flex; justify-content: center; align-items: center; gap: 15px; margin-bottom: 1rem; font-size: 0.9rem; opacity: 0.8; }

.entry-meta img.avatar { border-radius: 50%; width: 42px; height: 42px; border: 2px solid var(--link-color); margin-bottom: 0; }



/* --- TABLEAUX (DESIGN INVERSÉ) --- */

table { 

    width: 100%; 

    margin-bottom: 2rem; 

    background: transparent; 

    border-collapse: separate; 

    border-spacing: 0;

    /* La bordure extérieure du tableau reste de la couleur du texte */

    border: 1px solid var(--text-color); 

    border-radius: var(--radius);

    overflow: hidden; 

}



td { 

    padding: 15px; 

    text-align: left; 

    border-bottom: 1px solid var(--text-color);

    border-right: 1px solid var(--text-color);

}



th, thead { 

    padding: 15px; 

    text-align: left;

    

    /* INVERSION DES COULEURS POUR LE HEADER */

    background-color: var(--text-color); /* Fond = Couleur texte body */

    color: var(--bg-color);              /* Texte = Couleur fond body */

    

    font-weight: bold; 

    text-transform: uppercase; 

    font-size: 0.85em; 

    

    /* Bordures internes du header inversées pour être visibles */

    border-bottom: 1px solid var(--bg-color);

    border-right: 1px solid var(--bg-color);

}



/* Suppression des bordures en trop (droite et bas) */

tr:last-child td { border-bottom: none; }

th:last-child, td:last-child { border-right: none; }



/* BOUTONS */

.wp-block-button__link {

    background-color: var(--btn-bg) !important;

    color: var(--btn-text) !important;

    font-weight: bold;

    padding: 12px 28px;

    border-radius: 6px;

    transition: transform 0.2s;

    text-decoration: none !important;

    display: inline-block; 

}

.wp-block-button__link:hover { transform: translateY(-2px); filter: brightness(1.1); }



/* FOOTER */

.site-footer {

    background: var(--header-bg);

    color: var(--header-text-color);

    margin-top: 5rem;

    padding-top: 3rem;

    border-top: 1px solid var(--text-color); 

    opacity: 0.95;

    font-size: 0.9rem;

    text-align: center;

}



/* Disclaimer */

.footer-disclaimer {

    max-width: 800px;

    margin: 0 auto 30px;

    padding: 15px;

    border: 1px solid var(--text-color); 

    border-radius: var(--radius);

    background: rgba(0,0,0,0.1);

    font-size: 0.8rem;

    opacity: 0.8;

}



/* Site Info */

.site-info {

    background-color: var(--bg-color); 

    color: var(--text-color);

    padding: 20px 0;

    border-top: 1px solid var(--text-color);

    opacity: 0.6;

}



/* RESPONSIVE MOBILE */

@media (max-width: 768px) {

    .menu-toggle { display: block; }

    

    .main-navigation {

        display: none; 

        width: 100%;

        margin-top: 15px;

        background: rgba(0,0,0,0.3);

        padding: 10px;

        border-radius: 4px;

    }

    .main-navigation.toggled { display: block; }

    

    .main-navigation ul { flex-direction: column; gap: 0; }

    .main-navigation li { border-bottom: 1px solid var(--text-color); }

    .main-navigation li:last-child { border: none; }

    .main-navigation a { display: block; padding: 12px 0; font-size: 1.1rem; }



    h1 { font-size: 1.8rem; margin-bottom: 1rem; }

    

    /* Tableaux Scrollable */

    table { display: block; overflow-x: auto; white-space: nowrap; border-radius: 0; border: none; }

    /* Sur mobile on remet les bordures classiques pour que ce soit lisible */

    th, td { border: 1px solid var(--text-color); }

}