/**
 * Main CSS - Styles principaux du thème Tekenessi
 * Fusion de critical.css + core.css pour simplifier la maintenance
 * Version: 2.1.0 - Architecture component-first pour faciliter la maintenance
 */

/* ==========================================================================
   RESET ET BASE
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    tab-size: 4;
    box-sizing: border-box;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--tk-font-family-primary);
    font-size: var(--tk-font-size-base);
    line-height: var(--tk-line-height-normal);
    color: var(--tk-color-black);
    background-color: var(--tk-color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    padding: 0;
}

/* Sections
--------------------------------------------- */

section {
    min-height: 600px;
    overflow: hidden;
}

@media (max-width: 768px) {
    section {
        min-height: unset;
    }
}

#home_slider {
    padding: 0;
}

#home_parrutions {
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding-top: 50px;
}

.home_section_title {
    font-size: xx-large;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1,
.variex {
    font-family: var(--tk-font-family-vx);
    font-size: var(--tk-font-size-4xl);
    clear: both;
}

h2,
h3,
h4,
h5,
h6 {
    font-family: var(--tk-font-family-primary);
    font-weight: var(--tk-font-weight-bold);
    clear: both;
    margin: var(--tk-space-4) 0 var(--tk-space-2) 0;
    line-height: var(--tk-line-height-tight);
}

p {
    margin: 0 0 var(--tk-space-4) 0;
    line-height: var(--tk-line-height-relaxed);
}

/* Links */
a {
    font-family: var(--tk-font-family-primary);
    color: var(--tk-color-orange);
}

a:hover,
a:focus,
a:active {
    color: var(--tk-color-orange);
    outline: 0;
}

a:visited {
    color: var(--tk-color-orange);
}

.hidden_link {
    text-decoration: none;
}

.white_link {
    color: var(--tk-color-white);
}

.white_link:hover {
    color: var(--tk-color-orange);
}

/* Lists */
ul,
ol {
    margin: 0 0 var(--tk-space-4) 0;
    padding-left: var(--tk-space-6);
}

ul {
    list-style: none;
}

ol {
    list-style: decimal;
}

li>ul,
li>ol {
    margin-bottom: 0;
    margin-left: var(--tk-space-4);
}

/* Text elements */
blockquote {
    margin: var(--tk-space-6) 0;
    padding: var(--tk-space-4) var(--tk-space-6);
    border-left: 4px solid var(--tk-color-orange);
    background: var(--tk-color-gray-50);
    font-style: italic;
}

address {
    margin: 0 0 var(--tk-space-4) 0;
}



abbr,
acronym {
    border-bottom: 1px dotted var(--tk-color-gray-600);
    cursor: help;
}

mark,
ins {
    background: #fff9c0;
    text-decoration: none;
}

dt {
    font-weight: var(--tk-font-weight-bold);
}

dd {
    margin: 0 var(--tk-space-4) var(--tk-space-4) 0;
}


small {
    font-size: var(--tk-font-size-sm);
}

/* Articles avec miniatures */

.entry {
    width: 380px;
    padding: 8px;
}

.articles {
    clear: both;
}

.title {
    font-size: 50px;
}

.thumbs {
    float: left;
    padding: 5px;
}

/* ==========================================================================
   LAYOUT ET CONTENEURS
   ========================================================================== */

.container,
.wrapper {
    max-width: 100dvw;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .wrapper {
        max-width: var(--tk-max-width);
    }
}

@media (max-width: 768px) {
    .wrapper {
        width: 95%;
        padding: 0 var(--tk-space-2);
    }
}

/* Layout utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .flex-between {
        flex-direction: column;
        gap: var(--tk-space-3);
    }
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Grid utilities */
.grid {
    display: grid;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--tk-space-6);
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tk-space-6);
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tk-space-6);
}

@media (max-width: 768px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--tk-space-6);
}

@media (max-width: 768px) {
    .grid-auto {
        grid-template-columns: 1fr;
    }
}

/* Content layout */
.content-width {
    max-width: 65ch;
    margin: 0 auto;
}

.full-width {
    width: 100%;
}

/* ==========================================================================
   HEADER FIXE
   ========================================================================== */

#masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--tk-z-fixed);
    background-color: var(--tk-color-black);
    height: var(--tk-header-height);
    width: 100dvw;
    transition: transform var(--tk-transition-base);
}

@media (max-width: 768px) {
    #masthead {
        height: 70px;
    }
}

/* États du header */
#masthead.scrolled {
    transform: translateY(-100%);
}

#masthead.scrolled.show {
    transform: translateY(0);
    box-shadow: var(--tk-shadow-lg);
}

#masthead_container {
    display: flex;
    height: 90px;
    justify-content: space-between;
    align-items: center;
    max-width: var(--tk-max-width);
    margin: 0 auto;
    padding: 0 var(--tk-space-4);
    /* Important : empêche le wrapping */
    flex-wrap: nowrap;
    /* Espacement entre les éléments */
    gap: var(--tk-space-2);
}

@media (max-width: 768px) {
    #masthead_container {
        height: 70px;
        padding: 0 var(--tk-space-2);
        gap: var(--tk-space-1);
        /* Espacement réduit */
        /* Forcer la distribution d'espace */
        justify-content: space-between;
    }
}

/* ==========================================================================
   LOGO ET BRANDING
   ========================================================================== */

.site-branding {
    display: flex;
    align-items: center;
    gap: var(--tk-space-3);
    transition-duration: 1s;
    /* Contraintes pour éviter l'étalement */
    /* Empêche la réduction excessive */
    flex-shrink: 0;
    /* Permet la réduction si nécessaire */
    min-width: 0;
    /* Limite la largeur maximale */
    max-width: 300px;
}

.site-branding:hover {
    transform: var(--tk-transform-scale);
    transition-duration: 1s;
}

.site-branding img {
    min-width: 50px;
    max-height: 60px;
    width: auto;
    /* Contraintes fermes pour le logo */
    /* Limite la largeur */
    max-width: 60px;
    /* Préserve les proportions */
    object-fit: contain;
    /* Empêche la compression */
    flex-shrink: 0;

}

@media (max-width: 768px) {
    .site-branding {
        justify-content: flex-start;
        /* Alignement à gauche au lieu du centre */
        gap: var(--tk-space-2);
        /* Espacement réduit */
        max-width: 250px;
        /* Largeur maximale réduite */
        flex-shrink: 0;
        /* Important : empêche l'étalement */
    }

    .site-branding img {
        max-height: 40px;
        max-width: 40px;
        /* Largeur ferme pour mobile */
        min-width: 40px;
        /* Largeur minimale ferme */
        width: 40px;
        /* Largeur fixe pour éviter l'étalement */
        height: 40px;
        /* Hauteur fixe */
        object-fit: contain;
        /* Préserve les proportions dans le carré */
    }
}


.site-title {
    color: var(--tk-color-orange);
    font-size: var(--tk-font-size-3xl);
    font-weight: var(--tk-font-weight-bold);
    margin: 0;
    text-decoration: none;
    transition: font-size 0.3s ease;
}

.site-branding .site-title {
    /* Contraintes pour le texte */
    /* Empêche le retour à la ligne */
    white-space: nowrap;
    /* Cache le débordement */
    overflow: hidden;
    /* Points de suspension si nécessaire */
    text-overflow: ellipsis;
    /* Permet la réduction du texte si nécessaire */
    flex-shrink: 1;
}

@media (max-width: 768px) {
    .site-title {
        font-size: var(--tk-font-size-lg);
        /* Limite la largeur du texte */
        /* max-width: 120px; */
    }
}

/* ==========================================================================
   NAVIGATION PRINCIPALE
   ========================================================================== */

.main-navigation {
    /* display: flex;
    align-items: center;
    margin-right: var(--tk-space-1); */
    flex: 1;
    min-width: 100px;
}

@media (min-width: 1200px) {}

@media (max-width: 768px) {
    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* Primary menu */
#primary-menu {
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    margin-left: 20px;
    /* gap: var(--tk-space-1); */
}

@media (max-width: 1024px) {
    .main-navigation {
        display: flex;
        align-items: end;
        flex-direction: column;
    }

    #primary-menu {
        z-index: var(--tk-z-fixed);
        position: absolute;
        top: 72px;
        right: 10px;
        width: fit-content;
        max-height: 0;
        padding: var(--tk-space-3) var(--tk-space-5);
        gap: var(--tk-space-4);
        display: flex;
        flex-direction: column;
        box-shadow: var(--tk-shadow-xl);
        background-color: var(--tk-color-black);
        opacity: 0;
        overflow: hidden;
        transition: max-height 1s ease, opacity 0.4s ease;
        max-width: 90dvw;
    }

    #primary-menu.show {
        max-height: 1000px;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #primary-menu {
        top: 100%;
        padding: var(--tk-space-4);
        gap: var(--tk-space-3);
        box-shadow: var(--tk-shadow-lg);
    }
}

#primary-menu li {
    /* padding: 0 var(--tk-space-1); */
    position: relative;

}

@media (max-width: 999px) {
    #primary-menu li {
        /* width: 100%; */
        padding: 0;
    }
}

/* Forcer le trait visible et au-dessus du sous-menu */
#primary-menu li a {
    position: relative;
    z-index: 2;
}

#primary-menu a {
    width: 100%;
    text-align: center;
    padding: 0;
    color: var(--tk-color-white);
    white-space: nowrap;
    transition: color var(--tk-transition-base);
    text-decoration: none;
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: var(--tk-font-weight-extrabold);
}

#primary-menu a:hover {
    color: var(--tk-color-orange);
}

/* Effet de soulignement */
.modele_galerie_photo_flags-subcats a::after .filter-list a::after,
#primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0px;
    width: 0;
    height: 2px;
    background: var(--tk-color-orange);
    transition: width var(--tk-transition-base);
    z-index: 3;
}

.filter-list a:hover::after,
#primary-menu a:hover::after {
    width: 100%;
}

/* Sous-menus */
#primary-menu ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--tk-color-black);
    display: none;
    list-style: none;
    padding: var(--tk-space-3) 0;
    box-shadow: var(--tk-shadow-lg);
    z-index: var(--tk-z-dropdown);
    min-width: 200px;
}

@media (max-width: 999px) {
    #primary-menu ul {
        position: static;
        display: block;
        background: var(--tk-color-black);
        padding-left: var(--tk-space-5);
        box-shadow: none;
        min-width: auto;
        width: 100%;
    }

    #primary-menu ul.show {
        display: flex;
        flex-direction: column;
    }
}

#primary-menu ul.sub-menu {
    z-index: 1;
}

#primary-menu ul li {
    padding: 0;
    width: 200px;
}

#primary-menu ul a {
    padding: var(--tk-space-3) var(--tk-space-4);
    display: block;
    color: var(--tk-color-white);
}

#primary-menu ul a:hover {
    color: var(--tk-color-white);
    background-color: var(--tk-color-black-light);
}

#primary-menu li:hover>ul,
#primary-menu li:focus-within>ul {
    display: block;
}

/* Classes WordPress courantes */
.menu-item-has-children>a::after {
    content: '';
    font-size: var(--tk-font-size-sm);
    /* margin-left: var(--tk-space-1); */
}

.current-menu-item>a,
.current-menu-ancestor>a {
    color: var(--tk-color-orange) !important;
}

/* Menu toggle mobile */
.menu-toggle {
    display: none;
    cursor: pointer;
    color: var(--tk-color-white);
    background-color: var(--tk-color-orange);
    font-size: var(--tk-font-size-base);
    border: 2px solid var(--tk-color-orange);
    border-radius: var(--tk-radius-sd);
    transition: all var(--tk-transition-base);
    padding: var(--tk-space-2);
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        margin: 0;
        padding: var(--tk-space-2);
        box-shadow: var(--tk-shadow-lg);
        width: unset;
    }

}

.menu-toggle:hover {
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
}

/* ==========================================================================
   CONTENU PRINCIPAL
   ========================================================================== */

main {
    min-height: 1300px;
}

@media (max-width: 768px) {
    main {
        margin-top: 60px;
    }
}

/* Hero section */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--tk-color-black) 0%, var(--tk-color-gray-800) 100%);
    color: var(--tk-color-white);
}

.hero-content {
    max-width: 800px;
    padding: var(--tk-space-8) var(--tk-space-4);
}

.hero-title {
    font-size: var(--tk-font-size-4xl);
    font-weight: var(--tk-font-weight-bold);
    margin-bottom: var(--tk-space-4);
    color: var(--tk-color-orange);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: var(--tk-font-size-xl);
    }
}

.hero-subtitle {
    font-size: var(--tk-font-size-xl);
    margin-bottom: var(--tk-space-6);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: var(--tk-font-size-base);
    }
}

/* Entry content */
.entry {
    width: 380px;
    padding: 8px;
}

.entry-header {

    text-align: center;
}

.entry-title {
    font-size: var(--tk-font-size-3xl);
    margin-bottom: var(--tk-space-4);
    color: var(--tk-color-black);
}

@media (max-width: 768px) {
    .entry-title {
        font-size: var(--tk-font-size-2xl);
    }
}

.entry-meta {
    color: var(--tk-color-gray-600);
    font-size: var(--tk-font-size-sm);
    margin-bottom: var(--tk-space-2);
}

.entry-content {
    font-size: var(--tk-font-size-base);
    line-height: var(--tk-line-height-relaxed);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--tk-radius-sd);
}

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.btn {
    display: inline-block;
    padding: var(--tk-space-3) var(--tk-space-6);
    font-size: var(--tk-font-size-base);
    font-weight: var(--tk-font-weight-medium);
    text-decoration: none;
    border-radius: var(--tk-radius-sd);
    transition: all var(--tk-transition-base);
    cursor: pointer;
    border: none;
    text-align: center;
}

@media (max-width: 768px) {
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: var(--tk-space-2);
        padding: var(--tk-space-2) var(--tk-space-4);
        font-size: var(--tk-font-size-sm);
    }
}

.btn-primary {
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
}

@media (max-width: 768px) {
    .btn-primary {
        width: 100%;
        text-align: center;
        margin-bottom: var(--tk-space-2);
    }
}

.btn-primary:hover {
    background: var(--tk-color-orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--tk-shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--tk-color-orange);
    border: 2px solid var(--tk-color-orange);
}

@media (max-width: 768px) {
    .btn-secondary {
        width: 100%;
        text-align: center;
        margin-bottom: var(--tk-space-2);
    }
}

.btn-secondary:hover {
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
}

.btn-small {
    padding: var(--tk-space-2) var(--tk-space-4);
    font-size: var(--tk-font-size-sm);
}

.btn-large {
    padding: var(--tk-space-4) var(--tk-space-8);
    font-size: var(--tk-font-size-lg);
}

/* ==========================================================================
   IMAGES ET MÉDIAS
   ========================================================================== */

img {
    max-width: 100%;
    height: auto;
}

figure {
    margin: var(--tk-space-6) 0;
}

figcaption {
    font-size: var(--tk-font-size-sm);
    color: var(--tk-color-gray-600);
    text-align: center;
    margin-top: var(--tk-space-2);
    font-style: italic;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: var(--tk-font-size-sm);
    color: var(--tk-color-gray-600);
    text-align: center;
    margin-top: var(--tk-space-2);
}

/* ==========================================================================
   TAG
   ========================================================================== */

#related_posts {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

#related_posts_container {
    display: flex;
    flex-direction: row;
}

/* ==========================================================================
   TABLEAUX
   ========================================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--tk-space-6) 0;
    background: var(--tk-color-white);
    border-radius: var(--tk-radius-sd);
    overflow: hidden;
    box-shadow: var(--tk-shadow-lg);
}

@media (max-width: 768px) {
    table {
        font-size: var(--tk-font-size-sm);
    }
}

table th,
table td {
    padding: var(--tk-space-3) var(--tk-space-4);
    text-align: left;
    border-bottom: 1px solid var(--tk-color-gray-200);
}

@media (max-width: 768px) {

    table th,
    table td {
        padding: var(--tk-space-1) var(--tk-space-2);
    }
}

table th {
    background: var(--tk-color-gray-100);
    font-weight: var(--tk-font-weight-semibold);
    color: var(--tk-color-gray-800);
}

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

table tr:hover {
    background: var(--tk-color-gray-50);
}

/* ==========================================================================
   ACTUALITÉS
   ========================================================================== */

#modele_actualities {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    /* Force les éléments à prendre la même hauteur - depuis archive.css */
    background: var(--tk-color-white);
    width: 100%;
    transition: margin-left var(--tk-transition-base);
    margin: 0 auto 50px auto;
    /* Marge bottom pour éviter l'empiètement footer - depuis archive.css */
}

#modele_actualities #modele_actualities_section .card_grid {
    gap: var(--tk-space-2);
}

/* Hauteur minimale spécifique pour éviter l'empiètement - depuis archive.css */
#modele_actualities #modele_actualities_section {
    min-height: 1300px;
    margin-top: var(--tk-space-5);
}

/* Marge spécifique pour card_grid dans modele_actualities - depuis archive.css */
#modele_actualities .card_grid {
    margin: 0 var(--tk-space-4);
}

#modele_actualities_section {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    min-height: 50vh;
    /* Hauteur minimale pour le contenu - depuis archive.css */
}

#modele_actualities_container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    #modele_actualities {
        flex-direction: column;
        margin: var(--tk-space-8) auto;
        min-height: auto;
        /* Supprime la contrainte de hauteur sur mobile - depuis archive.css */
        align-items: flex-start;
        /* Retour au comportement par défaut sur mobile - depuis archive.css */
    }

    /* Responsive pour sidebar et section - depuis archive.css */
    #modele_actualities_section,
    .aside_bar {
        min-height: auto;
        /* Supprime la contrainte de hauteur sur mobile */
    }
}

#modele_actualities_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--tk-space-6);
    max-width: var(--tk-max-width);
    margin: 0 auto;
    padding: 0 var(--tk-space-4);
}

@media (max-width: 768px) {
    #modele_actualities_container {
        gap: var(--tk-space-4);
    }
}

.card_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tk-space-5);
    margin: var(--tk-space-8);
}

@media (max-width: 768px) {
    .card_grid {
        grid-template-columns: 1fr;
        margin: auto 15px;
    }
}

.home_actualities_vertical_card {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.attachment-homepage-thumb {
    width: 280px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

/*  vérifier si ça n'affecte pas le reste du site.  */
.entry-footer {
    margin: 40px 0;
    text-align: center;
}

#footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: var(--tk-color-orange);
}

#footer-menu {
    text-align: center;
    position: relative;
}

#site_footer_container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 90%;
    height: 100%;
}

#site_footer_container .widget_block h2,
nav#footer-navigation h2 {
    margin: unset;
    color: var(--tk-color-orange);
    font-size: var(--tk-font-size-4xl);
}

.site-footer .widget_block p {
    font-size: var(--tk-font-size-sm);
    color: var(--tk-color-white);

}

#site_footer_container div {
    width: 100%;
    max-width: calc(100vw / 3);
}

#site_footer_container section {
    min-height: unset;
    overflow: unset;
    padding: unset;
}

#site_footer_container_center {
    display: flex;
    justify-content: center;
}

#footer-navigation {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: left;
    align-items: left;
    height: 100%;
}

#footer-navigation h2 {
    margin: 0;
    text-align: center;
}

#footer-navigation ul {
    list-style: none;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

#footer-navigation a {
    color: var(--tk-color-white);
    text-decoration: none;
}

#footer-navigation a:hover {
    color: var(--tk-color-orange);
    text-decoration: none;
}

.menu-primary-container {
    margin-top: var(--tk-space-4);
}

.site-footer {
    background-color: var(--tk-color-black);
    color: var(--tk-color-white);
    padding: 40px 0 20px;
    /* vérifier si ce code impacte tout le site.  */
    /* margin-top: 50px; */
}

.site-footer .site-branding {
    width: var(--tk-max-width);
    margin: auto;
}


.site-footer .site-branding:hover {
    transform: unset;

}

@media (max-width: 768px) {

    #footer {
        text-align: center;
    }

    .site-footer .site-branding {
        width: fit-content;
    }

    #site_footer_container .widget_block h2,
    nav#footer-navigation h2 {
        font-size: var(--tk-font-size-lg);
    }

    #footer_container {
        grid-template-columns: 1fr;
        gap: var(--tk-space-6);
    }

    #site_footer_container {
        flex-direction: column;
        align-items: center;
    }

    #site_footer_container div {
        max-width: unset;
    }

}

@media (min-width: 769px) and (max-width: 1024px) {
    #footer_container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tk-space-6);
    padding: 0 var(--tk-space-4);
}

@media (max-width: 768px) {
    .footer-widgets {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

}

.footer-widget {
    color: var(--tk-color-white);
}

.footer-widget h3 {
    color: var(--tk-color-orange);
    font-size: var(--tk-font-size-xl);
    margin-bottom: var(--tk-space-4);
    border-bottom: 2px solid var(--tk-color-orange);
    padding-bottom: var(--tk-space-2);
}

.footer-widget p {
    color: var(--tk-color-gray-300);
    line-height: var(--tk-line-height-relaxed);
}

.footer-widget a {
    color: var(--tk-color-gray-300);
    text-decoration: none;
    transition: color var(--tk-transition-base);
}

.footer-widget a:hover {
    color: var(--tk-color-orange);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

.footer-widget li {
    margin-bottom: var(--tk-space-2);
}

/* Copyright */
.site-info {
    text-align: center;
    padding-top: var(--tk-space-8);
    margin-top: var(--tk-space-8);
    border-top: 1px solid var(--tk-color-gray-700);
    color: var(--tk-color-gray-400);
    font-size: var(--tk-font-size-sm);
}

/* ==========================================================================
   COMMENTAIRES
   ========================================================================== */

.comments-area {
    margin-top: var(--tk-space-12);
    padding-top: var(--tk-space-8);
    border-top: 1px solid var(--tk-color-gray-300);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: var(--tk-space-6);
    padding: var(--tk-space-4);
    background: var(--tk-color-gray-50);
    border-radius: var(--tk-radius-sd);
}

.comment-content a {
    word-wrap: break-word;
}

.bypostauthor {
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: var(--tk-space-2);
    margin: var(--tk-space-8) 0;
}

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: var(--tk-space-1);
    }
}

.page-numbers {
    padding: var(--tk-space-2) var(--tk-space-3);
    border: 1px solid var(--tk-color-gray-300);
    background: var(--tk-color-white);
    color: var(--tk-color-black);
    text-decoration: none;
    border-radius: var(--tk-radius-sd);
    transition: all var(--tk-transition-base);
}

@media (max-width: 768px) {
    .page-numbers {
        padding: var(--tk-space-1) var(--tk-space-2);
        font-size: var(--tk-font-size-sm);
    }
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
    border-color: var(--tk-color-orange);
}

/* ==========================================================================
   CLASSES UTILITAIRES
   ========================================================================== */

.align-center {
    text-align: center;
}

.align-left {
    text-align: left;
}

.align-right {
    text-align: right;
}

.background_orange {
    background-color: var(--tk-color-orange);
    box-shadow: -1px 2px 10px 3px rgba(0, 0, 0, 0.3) inset;
}

.background_black {
    background-color: var(--tk-color-black);
}

.background_white {
    background-color: var(--tk-color-white);
}

.orange {
    color: var(--tk-color-orange);
}

.white {
    color: var(--tk-color-white);
}

.black {
    color: var(--tk-color-black);
}

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: var(--tk-space-3);
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
    text-decoration: none;
    z-index: var(--tk-z-tooltip);
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--tk-color-gray-300);
    border-top: 2px solid var(--tk-color-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Alignments
--------------------------------------------- */
.alignleft {
    /*rtl:ignore*/
    float: left;

    /*rtl:ignore*/
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    /*rtl:ignore*/
    float: right;

    /*rtl:ignore*/
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
    /* margin-bottom: 1.5em; */
    text-align: center;
}

.vertical_spacer {
    padding-top: 50px;
    padding-bottom: 50px;
}

#no_margin_top {
    margin-top: unset;
}

/* ===================================================================
   1. LAYOUT PRINCIPAL
   =================================================================== */

#modele_actualities {
    transition: margin-left var(--tk-transition-base);
}

.shadow_box {
    position: relative;
}

/* ===================================================================
   2. ASIDE BAR - SIDEBAR LEGACY
   =================================================================== */

.aside_bar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    min-width: 250px;
    /* min-height: 50vh; */
    /* Hauteur minimale pour la sidebar - depuis archive.css */
    margin: var(--tk-space-5) var(--tk-space-5) 0 0;
    padding: 0 0 21px 0;
    border-radius: 5px;
    height: 45px;
}

.aside_bar ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

/* ===================================================================
   3. MENU ASIDE-FILTER - STRUCTURE DE BASE
   =================================================================== */

/* Structure du menu */
.aside-filter-menu section {
    margin: 0;
    padding: 0;
    list-style: none;
    min-height: unset;
}

.aside-filter-menu ul {
    margin: 0 0 var(--tk-space-1) 0;
    padding: 0;
    list-style: none;
    /* line-height supprimé - causait l'écrasement du texte */
}

.aside-filter-menu a {
    color: var(--tk-color-orange);
    text-decoration: none;
    transition: all var(--tk-transition-base);
}

.aside-filter-menu a:hover {
    color: var(--tk-color-orange-dark);
}

/* ===================================================================
   4. BOUTON TOGGLE MOBILE
   =================================================================== */

.aside-filter-toggle {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
    border: none;
    border-radius: var(--tk-radius-sd);
    padding: var(--tk-space-3) var(--tk-space-4);
    cursor: pointer;
    box-shadow: var(--tk-shadow-lg);
    transition: all var(--tk-transition-base);
    align-items: center;
    gap: var(--tk-space-2);
    font-family: var(--tk-font-family-primary);
    font-weight: var(--tk-font-weight-medium);
    min-width: auto;
    width: auto;
}

/* États du bouton toggle */
.aside-filter-toggle:has(+ [popover]:popover-open) {
    background: var(--tk-color-orange-dark);
    transform: scale(0.95);
}

.aside-filter-toggle:hover {
    background: var(--tk-color-orange-dark);
    transform: translateY(-2px);
    box-shadow: var(--tk-shadow-xl);
}

.aside-filter-toggle:active {
    transform: translateY(0);
}

/* Icône hamburger */
.filter-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hamburger-line {
    width: 16px;
    height: 2px;
    background: var(--tk-color-white);
    border-radius: 1px;
    transition: all var(--tk-transition-base);
}

.filter-text {
    font-size: var(--tk-font-size-sm);
    white-space: nowrap;
}

/* ===================================================================
   5. HEADER DU MENU
   =================================================================== */

.filter-header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: var(--tk-space-1);
    background: linear-gradient(135deg, var(--tk-color-orange), var(--tk-color-orange-dark));
    color: var(--tk-color-white);
    top: 0;
    z-index: 1;
}

.filter-header h2 {
    margin: 0;
    color: var(--tk-color-white);
    font-size: var(--tk-font-size-lg);
    text-align: left;
}

/* Bouton fermer */
.filter-close {
    background: unset;
    border: none;
    color: var(--tk-color-white);
    font-size: var(--tk-font-size-4xl);
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tk-transition-base);
    line-height: 1;
}

button.filter-close {
    padding: 0.6em 1em 0.8em;
}

.filter-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ===================================================================
   6. CONTENU DU MENU
   =================================================================== */

.filter-content {
    padding: var(--tk-space-4);
    height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--tk-color-gray-400) var(--tk-color-gray-100);
}

.filter-content::-webkit-scrollbar {
    width: 6px;
}

.filter-content::-webkit-scrollbar-track {
    background: var(--tk-color-gray-100);
}

.filter-content::-webkit-scrollbar-thumb {
    background: var(--tk-color-gray-400);
    border-radius: 3px;
}

/* Lien page d'accueil */
.home-link {
    display: block;
    padding: var(--tk-space-3);
    background: linear-gradient(135deg, var(--tk-color-orange), var(--tk-color-orange-dark));
    color: var(--tk-color-white);
    text-decoration: none;
    border-radius: var(--tk-radius-sd);
    margin-bottom: var(--tk-space-5);
    transition: all var(--tk-transition-base);
    text-align: center;
    font-weight: var(--tk-font-weight-medium);
}

.home-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--tk-shadow-md);
    color: var(--tk-color-white);
}

/* ===================================================================
   7. SECTIONS DE FILTRES
   =================================================================== */

.filter-section {
    margin-bottom: var(--tk-space-6);
}

.filter-section h3 {
    color: var(--tk-color-gray-800);
    margin: 0 0 var(--tk-space-3) 0;
    font-size: var(--tk-font-size-base);
    font-weight: var(--tk-font-weight-semibold);
    padding-bottom: var(--tk-space-2);
    border-bottom: 2px solid var(--tk-color-gray-200);
}

/* Listes de filtres */
.filter-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.filter-list a {
    position: relative;
    display: block;
    padding: var(--tk-space-2) var(--tk-space-3);
    color: var(--tk-color-orange);
    text-decoration: none;
    border-radius: var(--tk-radius-sd);
    transition: all var(--tk-transition-base);
    font-size: var(--tk-font-size-sm);
    font-family: var(--tk-font-family-primary);
    font-weight: var(--tk-font-weight-medium);
    border: 1px solid transparent;
}

/* Tags spéciaux */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tk-space-2);
}

.tag-item {
    margin: 0;
}

.tag-link {
    display: inline-block;
    padding: var(--tk-space-1) var(--tk-space-2);
    background: var(--tk-color-gray-100);
    color: var(--tk-color-gray-700);
    font-size: var(--tk-font-size-xs);
    border-radius: var(--tk-radius-sd);
    transition: all var(--tk-transition-base);
    border: 1px solid var(--tk-color-gray-200);
}

.tag-link:hover {
    background: var(--tk-color-orange);
    color: var(--tk-color-white);
    border-color: var(--tk-color-orange);
    transform: translateY(-1px);
}

/* ===================================================================
   8. ANIMATIONS ET KEYFRAMES
   =================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===================================================================
   9. RESPONSIVE - DESKTOP (min-width: 769px)
   =================================================================== */

@media (min-width: 769px) {
    .aside-filter-menu {
        position: absolute;
        top: var(--tk-space-4);
        left: var(--tk-font-size-xl);
        padding: 0;
        margin: 0;
        width: var(--tk-size-aside-menu);
        overflow-y: auto;
        z-index: var(--tk-z-dropdown);
        border: none;
        border-radius: var(--tk-radius-sd);
        box-shadow: var(--tk-shadow-xl);

        /* Forcer l'affichage en desktop */
        display: block;
        opacity: 1;
        transform: none;
    }

    .filter-header {
        background: var(--tk-color-white);
        padding: var(--tk-space-3) var(--tk-space-4);
    }

    .filter-header h2 {
        color: var(--tk-color-gray);
        font-size: var(--tk-font-size-2xl);
        margin: 0;
    }

    .filter-close {
        display: none;
    }

    .filter-content {
        padding: var(--tk-space-4);
        height: auto;
        overflow: visible;
    }

    /* IMPORTANT: Supprimer complètement le backdrop en desktop */
    .aside-filter-menu::backdrop {
        display: none;
        opacity: 0;
        pointer-events: none;
    }

    /* Ajuster le contenu principal pour laisser de la place à la sidebar */
    /* #modele_actualities {
        padding-left: var(--tk-space-4);
    } */

    .filter-list a {
        font-size: var(--tk-font-size-sm);
        padding: var(--tk-space-1);
    }

    .home-link {
        margin-bottom: var(--tk-space-4);
        font-size: var(--tk-font-size-sm);
    }

    .filter-section {
        margin-bottom: var(--tk-space-4);
    }

    .filter-section h3 {
        font-size: var(--tk-font-size-lg);
        margin: var(--tk-space-2);
    }

    /* Scrollbar plus discrète en desktop */
    .aside-filter-menu::-webkit-scrollbar {
        width: 4px;
    }

    .aside-filter-menu::-webkit-scrollbar-thumb {
        background: var(--tk-color-gray-300);
    }

    .aside-filter-menu::-webkit-scrollbar-thumb:hover {
        background: var(--tk-color-gray-400);
    }
}

/* ===================================================================
   10. RESPONSIVE - MOBILE (max-width: 768px)
   =================================================================== */

@media (max-width: 768px) {
    .filter-list {
        /* column-count: 2; */
        display: flex;
        flex-wrap: wrap;
        gap: var(--tk-space-2);
    }

    .filter-list a {
        font-size: var(--tk-font-size-xs);
        white-space: normal;
        word-break: break-word;
        max-width: 100%;
    }

    .aside-filter-toggle {
        display: flex;
        margin-left: var(--tk-space-4);
    }

    /* Menu popover - effet glissement depuis la gauche */
    .aside-filter-menu {
        position: fixed;
        width: 90dvw;
        top: 0;
        left: 0;
        background: var(--tk-color-white);
        border: none;
        box-shadow: var(--tk-shadow-2xl);
        margin: 0;
        padding: 0;

        /* Position initiale - hors écran à gauche */
        transform: translateX(-110%);
        transition: transform 0.3s ease-out;
        opacity: 1;
    }

    /* API Popover native - styles spécifiques */
    .aside-filter-menu[popover] {
        position: fixed;
        /* inset: 0; */
        opacity: 0;
        transform: translateX(-100%);
        transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    }

    .aside-filter-menu[popover]:popover-open {
        margin: 0;
        padding: 0.25em;
        overflow: auto;
        color: CanvasText;
        background-color: Canvas;
        /* width: fit-content; */
        height: fit-content;
        opacity: 1;
        transform: translateX(0);

        @starting-style {
            /*POPOVER AVANT L'ENTREE DANS LE CHAMP*/
            opacity: 0;
            transform: translateX(-350px);
        }
    }

    .aside-filter-menu[popover]:not(:popover-open):not(dialog[open]) {
        display: none;
    }

    /* Backdrop pour l'API Popover native */
    .aside-filter-menu::backdrop {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        /* animation: fadeIn var(--tk-transition-base) ease-out; */
    }
}