
* {
    box-sizing: border-box;
}


body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fa;
    /*margin: 20px;*/
}


#logo {
    width: 100%;
    margin-top: 30px;
    margin-bottom: 40px;
    text-align: center;
}

#logo img {
    width: 25%;
    height: auto;
    max-width: 500px;
    min-width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}


/* Bandeau intro Swiss-Lib */

#intro-header {
    width : 60%;
    font-size: 1rem;
    padding: 10px 10px;
    margin : auto;
}

/* TABLEAU */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Titres */

.title {
    background: #BBC1C8;           
    color: #5f7895;                
    text-align: center;
    font-weight: bold;;
    font-size : 1.5em;
    padding: 30px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    line-height: 1.4;
}


#title_archive::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;               /* longueur de la barre */
    height: 3px;
    background: #c3c9d1;       /* couleur douce */
    border-radius: 2px;
}

/* Titre pour les catégories */
.filter-title {
    font-size: 1em;
    font-weight: 600;
    color: #777;
    margin: 1rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}

/* Titre pour les posts */
#titre_post {
    color: #5f6f86;            /* même couleur */
    font-weight: 500;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
    font-size: 1.5em;          /* plus grand que h2 */
}

#titre_post::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;               /* longueur de la barre */
    height: 3px;
    background: #c3c9d1;       /* couleur douce */
    border-radius: 2px;
}

h1 {
    color: #5f6f86;            /* même couleur */
    font-weight: 500;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
    font-size: 1.8em;          /* plus grand que h2 */
}



h2 {
    color: #5f6f86;            /* gris bleuté discret */
    font-weight: 500;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 6px;
    font-size: 1.2em;
}

/* barre sous le titre */
h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;               /* longueur de la barre */
    height: 3px;
    background: #c3c9d1;       /* couleur douce */
    border-radius: 2px;
}

/* HEADER */
table tr:first-child {
    background: #1a73e8;
    color: white;
    font-weight: bold;
}

table tr:first-child td {
    padding: 12px;
}

/* LIGNES */
table tr {
    border-bottom: 1px solid #eee;
}

table tr:nth-child(even) {
    background: #f9fbfd;
}

table td {
    padding: 12px;
    vertical-align: middle;
}

/* LIENS */
table a {
    text-decoration: none;
    color: #1a73e8;
    font-weight: bold;
}

table a:hover {
    text-decoration: underline;
}


/* Blocs d'introduction et img */

.container, .container_mobile, main {
    max-width: 900px;
    margin: 40px auto;
}

/* Bloc d'intro mobile */
.container_mobile {
    display : none;
}

.language-info summary {
    cursor: pointer;
    font-style: italic;
}

.title {
    text-align: center;
    background: #e4ecf6;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
}

.card {
    display: flex;
    align-items: flex-start;
    background: #FFF0D0;
    color : #685e35;
    border-radius: 5px;
    padding: 15px 20px;
    margin-bottom: 20px;
    gap: 20px;
}

.content {
    flex: 1;
    min-width: 0;
}


.content {
    min-width: 0;
}

.content p {
    word-break: break-word;
    overflow-wrap: anywhere;
}


.flag img {
    width: 40px;
    height: 40px;
    border-radius: 3px;
}

.flag {
    flex-shrink: 0;
}

.content {
    flex: 1;
}

.content p {
    margin: 5px 0;
    line-height: 1.4;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Card archives */

.cards-container-archives {
    display: flex;
    /*flex-direction: column-reverse;*/
    flex-direction: column;             
    gap: 8px;
    margin-bottom: 40px;
    justify-content: center;      /* centre les cards */

}

.card-archives {

    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e4ecf6;
    border-radius: 14px;
    padding: 6px 10px;
    border: 1px solid #c3c9d1;
    transition: all 0.2s ease;
}

/* texte du lien */
.card-archives a {
    display: block; /* C'était display : flex */
    flex-direction: column;   /* ✅ empile titre + auteur */
    width : 100%;
    text-decoration: none;
    /*width: 100%;*/
}

/* titre */
.card-archives .title {
    color: #3d4d5e;
    background: transparent;
    font-weight: 500;
    font-size: 0.95em;   
    transition: 0.2s;
    padding-left: 0;
    text-align: left;
}

/* auteur discret */
.card-archives .author {
    display: block;
    text-align : right;
    /*margin: 2px 0 0 0;*/
    padding-left : 20px;
    font-size: 0.85em;
    color: #7a8899;           
    transition: 0.2s;
}

/* Pastille */
.badge {
    display: inline-block;
    width: 12px;
    height: 12px;
    /*background: #3b3a3b;*/
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.badge.autre {
    border : 1px solid black;
}

.badge.all {
    background: rgb(218, 212, 212);
}

.badge.emploi {
    background: #22c55e;
    border-color: #81c784;
}

.badge.evenements {
    background: #3b82f6;
    border-color: #64b5f6;
}

.badge.communaute {
    background: #8b5e3c;
    border-color: #ffd54f;
}

.badge.formations {
    background: #61136d;
    border-color: #ba68c8;
}

.badge.ressources {
    background: #f59e0b;
    border-color: #90a4ae;
}

.badge.recherches {
    background: #e6d737;
    border-color: #f06292;
}

.badge.newsletter {
    background: #cf0707;
    border-color: #ffb74d;
}



/* effet hover */

.card-archives:hover {
    background-color: #cad9eb;
}

.cards-container-archives a:hover .title,
.cards-container-archives a:hover .author {
    color: white;
}

/* Bouton de Load More */
#load-more-btn {
    display: block;
    margin: 20px auto;

    padding: 10px 18px;
    border: 1px solid rgba(23, 32, 43, 0.1);
    border-radius: 999px;

    background: #ffffff;
    color: #333b44;

    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(23,32,43,0.04);
}

#load-more-btn:hover {
    background: #FFF0D0;
    border-color: #e7d6ae;
    transform: translateY(-1px);
}

#load-more-btn.active {
    background: #2a5bd7;
    color: white;
    border-color: #2a5bd7;
}

/* Quand il n'y a pas de résultats de posts */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-results h3 {
    margin-bottom: 10px;
}

/* Search panel and filters */

#search-panel {
    background: rgba(255, 255, 255, 0.726);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    text-align: center;
    max-width: 900px;
    margin: 0 auto;

}

/* Boutons des sous-filtres */

.specific-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.55rem;
}

.specific-filters button {
    padding: 10px 18px;
    border: 1px solid rgba(23, 32, 43, 0.1);
    border-radius: 999px;

    background: #ffffff;
    color: #333b44;

    font-size: 0.85rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(23,32,43,0.04);
}

.specific-filters button:hover {
    background: #FFF0D0;
    border-color: #e7d6ae;
    transform: translateY(-1px);
}

.specific-filters button.active {
    background: #2a5bd7;
    color: white;
    border-color: #2a5bd7;
}

.specific-filters button:active {
    transform: translateY(0);
}

/* Class bouton actif */

.specific-filters button.active {
    background: #0078d4;
    color: white;
}
 /* Pourcentages */

.pourcentage-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.95rem;
}


.pourcentage-filters button {
    padding: 10px 18px;
    border: 1px solid rgba(23, 32, 43, 0.1);
    border-radius: 999px;

    background: #ffffff;
    color: #333b44;

    font-size: 0.85rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(23,32,43,0.04);
}

.pourcentage-filters button:hover {
    background: #FFF0D0;
    border-color: #e7d6ae;
    transform: translateY(-1px);
}

.pourcentage-filters button.active {
    background: #2a5bd7;
    color: white;
    border-color: #2a5bd7;
}

.pourcentage-filters button:active {
    transform: translateY(0);
}

/* Class bouton actif */

.pourcentage-filters button.active {
    background: #0078d4;
    color: white;
}
/* Boutons des filtres */

.language-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.95rem;
}

.language-filters button {
    padding: 10px 18px;
    border: 1px solid rgba(23, 32, 43, 0.1);
    border-radius: 999px;

    background: #ffffff;
    color: #333b44;

    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(23,32,43,0.04);
}

.language-filters button:hover {
    background: #FFF0D0;
    border-color: #e7d6ae;
    transform: translateY(-1px);
}

.language-filters button.active {
    background: #2a5bd7;
    color: white;
    border-color: #2a5bd7;
}

.language-filters button:active {
    transform: translateY(0);
}

/* Class bouton actif */

.language-filters button.active {
    background: #0078d4;
    color: white;
}


/* Mobile */

.mobile-select {
    display : none;
}

#desktop_filters {
    display : inline-block;
}

.mobile-select select {
    width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(240, 242, 210, 0.842);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 12px rgba(0,0,0,.05),
        0 1px 2px rgba(0,0,0,.08);

    font-size: 15px;
    font-weight: 500;
    color: #1e293b;
    appearance: none;

    transition: all .2s ease;
}

.mobile-select select:focus {
    transform: translateY(-1px);
    box-shadow:
        0 8px 24px rgba(0,0,0,.08),
        0 0 0 4px rgba(59,130,246,.15);
}


.mobile-select select {
    background-color: #fcfcfc;
    color: #334155;
}


/* Filters*/

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
    align-items: center;
    padding: 10px 18px;
    font-size: 0.95rem;

}

.filters button {
    padding: 10px 18px;
    border: 1px solid rgba(23, 32, 43, 0.1);
    border-radius: 999px;

    background: #ffffff;
    color: #333b44;

    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;
    transition: all 0.2s ease;

    box-shadow: 0 2px 8px rgba(23,32,43,0.04);
}

.filters button:hover {
    background: #FFF0D0;
    border-color: #e7d6ae;
    transform: translateY(-1px);
}

.filters button.active {
    background: #2a5bd7;
    color: white;
    border-color: #2a5bd7;
}

.filters button:active {
    transform: translateY(0);
}

/* Class bouton actif */

.filters button.active {
    background: #0078d4;
    color: white;
}



/* Recherche */
.search-box {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin: 20px auto;

}

.search-box input {
    width: 100%;
    padding: 14px 18px 14px 48px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.25s ease;
    outline: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.search-box input {
    box-sizing: border-box;
}


.search-box input::placeholder {
    color: #94a3b8;
}

.search-box input:hover {
    border-color: #cbd5e1;
}

.search-box input:focus {
    border-color: #3b82f6;
    box-shadow:
        0 0 0 4px rgba(59,130,246,.12),
        0 8px 24px rgba(59,130,246,.08);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Card message dans les posts archives */
.card-message {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    line-height: 1.4; /* avant j'avais 1.6 */
}


.card-message pre {
    margin: 0;
    padding : 0;
    white-space: pre-wrap; /* conserve les sauts de ligne */
    word-break: break-word;
    font-family: inherit; /* utilise la police du site */
    text-justify: inter-word;
}

#origin_post {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    font-style: italic;
    color: #7a8899;
    text-decoration: none;
    transition: color 0.2s ease;
}

#origin_post:hover {
    color: #5f6f86;
    text-decoration: underline;
}

.card-message:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}


/* Metadata post archive */
.message-meta {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.message-meta .row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 8px 0;
    align-items: start;
}

.message-meta .label {
    font-weight: 600;
    color: #2563eb;
    white-space: nowrap;
}

/* Footer */

.footer {

    margin-top: 50px;
    padding: 30px 20px;

    border-top: 1px solid #e5e7eb;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    text-align: center;
}

.footer span {
    font-size: 0.9rem;
}

.footer a {

    color: #2563eb; /* bleu moderne */

    text-decoration: none;

    font-size: 0.9rem;
    font-weight: 500;

    transition: color 0.2s ease;
}

.footer a:hover {

    color: #1d4ed8;

    text-decoration: underline;
}

.footer-copy {

    margin-top: 10px;

    color: #9ca3af;

    font-size: 0.8rem;
}



/*Flèche pour remonter*/

#back-to-top {

    position: fixed;

    right: 25px;
    bottom: 25px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #2563eb;
    color: white;

    text-decoration: none;

    border-radius: 50%;

    font-size: 1.3rem;
    font-weight: bold;

    opacity: 0;
    visibility: hidden;

    transition: all 0.3s ease;

    z-index: 1000;
}

#back-to-top.show {

    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {

    background: #1d4ed8;

    transform: translateY(-3px);
}

/* Bouton retour */

.btn-retour {
    display: inline-block;

    padding: 10px 16px;

    background: #2563eb;
    color: white;

    text-decoration: none;

    border-radius: 6px;
}

.btn-retour:hover {
    background: #1d4ed8;
}



/* Post-archives */
/* Contenu supplémentaire */
.hidden-part summary {
    color: #6c757d;          /* gris discret */
    font-style: italic;
    cursor: pointer;
    display: inline-block;
    transition: color 0.2s ease;
}

.hidden-part summary:hover {
    color: #495057;          /* légèrement plus foncé */
    text-decoration: underline;
}



.hidden-part summary::before {
    content: "▶ ";
}

.hidden-part[open] summary::before {
    content: "▼ ";
}

/* Chargement Loading */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: #6b7280;
}

.spinner {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border: 3px solid #dbeafe;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.dots::after {
    content: "";
    animation: dots 1.5s infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dots {
    0%   { content: ""; }
    25%  { content: "."; }
    50%  { content: ".."; }
    75%  { content: "..."; }
    100% { content: ""; }
}

/* Responsive */
@media (max-width: 600px) {

        #intro-header {
        width : 100%;
        font-size: 1rem;
        margin : auto;
    }

    .title {
        font-size : 1rem;
        font-weight:bold;
    }

    #titre_post {
        font-size : 1.2rem;
    }
    .card {
        flex-direction: row;
        align-items: flex-start;
    }

    .flag {
        margin-bottom: 0;
    }


    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

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


    #logo img {
        min-width: 300px;
    }

    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters button {
        width: 100%;
    }

    .mobile-select {
        display : block !important;
    }

    .filters {
        display : none !important;
    }

    .language-filters {
        display : none !important;
    }

    /* Blocs d'intro' de la liste */
    .container {
        display : none;
    }

    .container_mobile {
        display : block !important;
    }
}

