/* ======================================= */
/* Styles Généraux et Typographie */
/* ======================================= */

body {
    /* Utilisation d'une police plus moderne et lisible (System Stack) */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6; /* Améliore la lisibilité du texte long */
    color: #333; /* Noir moins agressif */
    background-color: #F8F8F8; /* Fond légèrement cassé pour un look "doux" */
}

/* Amélioration des titres de section (H2) */
.section-grille h2, .section-liste h2, .section-syndication h2 {
    font-size: 1.8em; /* Légèrement plus grand */
    font-weight: 700;
    margin-bottom: 25px; /* Plus d'espace sous le titre */
    /* Bordure plus subtile */
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 15px;
    color: #1a1a1a;
}

/* ======================================= */
/* MISE EN PAGE PRINCIPALE                 */
/* ======================================= */

.content-wrapper {
    padding: 0 15px; /* Ajoute 15px de marge intérieure à gauche et à droite */
    box-sizing: border-box; /* Assure que le padding n'augmente pas la largeur totale */
}

/* ======================================= */
/* HEADER / HERO SECTION                 */
/* ======================================= */

.site-hero {
    position: relative; /* Indispensable pour la superposition */
    padding: 80px 20px; /* Un peu plus d'espace vertical */
    text-align: center;
    background-color: #f4f4f4; /* Couleur par défaut si pas d'image */
    
    /* Styles pour l'image de fond */
    background-size: cover;
    background-position: center center;

    border-bottom: 1px solid #EAEAEA;
    margin-bottom: 50px;
}

/* Superposition sombre pour la lisibilité du texte */
.site-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4); /* Superposition noire à 40% d'opacité */
    z-index: 1; /* Se place entre le fond et le texte */
}

/* Le contenu textuel passe au-dessus de la superposition */
.site-hero .hero-content {
    position: relative;
    z-index: 2;
}

/* Le texte doit être clair pour contraster avec la superposition */
.site-hero .site-title {
    font-size: 3em; /* Un peu plus grand pour plus d'impact */
    font-weight: 700;
    color: #FFFFFF; /* Texte blanc */
    text-shadow: 0 2px 5px rgba(0,0,0,0.5); /* Ombre portée pour détacher le texte */
    margin: 0;
}

.site-hero .site-slogan {
    font-size: 1.3em;
    color: #E0E0E0; /* Blanc cassé pour le slogan */
    margin-top: 10px;
}


/* ======================================= */
/* 1. GRILLE RESPONSIVE (Styles Grille et Cartes) */
/* ======================================= */

.grille-responsive {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.carte-article {
    background-color: #FFF;
    border: 1px solid #EAEAEA;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carte-article:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.carte-lien {
    text-decoration: none;
    color: inherit;
    display: contents;
}

.carte-media {
    width: 100%;
    padding-top: 100%;
    height: 0;
    position: relative;
    overflow: hidden;
    background-color: #F8F8F8;
}

.carte-media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carte-corps {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.carte-titre {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #2c3e50;
    line-height: 1.4;
}

.carte-description {
    font-size: 0.95em;
    color: #555;
    margin-top: 10px;
    margin-bottom: 10px;
    flex-grow: 1;
}

/* ======================================= */
/* 2. SYNDICATION (Style "Widget")         */
/* ======================================= */

.section-syndication {
    background-color: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 25px 30px;
    margin-top: 50px;
    border: 1px solid #EAEAEA;
}

.section-syndication h2 {
    font-size: 1.6em;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
    color: #1a1a1a;
}

.liste-syndication {
    list-style: none;
    padding: 0;
    margin: 0;
}

.item-syndication {
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}

.item-syndication:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.item-syndication a.spip_out {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.item-syndication a.spip_out::before {
    font-family: FontAwesome;
    content: "\f08e";
    margin-right: 12px;
    color: #2E7777;
    font-size: 0.9em;
    transition: transform 0.2s ease;
}

.item-syndication a.spip_out:hover {
    color: #2E7777;
    transform: translateX(5px);
}

.item-syndication a.spip_out:hover::before {
    transform: scale(1.1);
}

.syndic-date {
    display: block;
    font-size: 0.85em;
    color: #999;
    margin-top: 4px;
    padding-left: 25px;
}


/* ======================================= */
/* 3. VUE LISTE (GRAND ÉCRAN) - CUBES 150x150 */
/* ======================================= */

.section-liste h2 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 25px;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 15px;
    margin-top: 40px;
    color: #1a1a1a;
}

body .liste-articles-grand {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: none;
}

.item-liste {
    display: flex;
    align-items: flex-start;
    padding: 30px 15px;
    transition: background-color 0.2s ease, box-shadow 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: none;
    margin-bottom: 20px;
}

.item-liste:hover {
    background-color: #F2F2F2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.item-media {
    flex-shrink: 0;
    margin-right: 30px;
    width: 150px;
    height: 150px;
    border: none;
    padding: 0;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.item-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}
.item-media.item-media-vide {
    box-shadow: none;
    border-radius: 0;
    background-color: transparent;
}
.item-corps {
    flex-grow: 1;
}

.item-titre {
    font-size: 1.45em;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.item-titre a {
    color: #333;
    text-decoration: none;
}

.item-titre a:hover {
    color: #2E7777;
    text-decoration: underline;
}

.item-description {
    font-size: 1em;
    line-height: 1.5;
    color: #444;
    margin-bottom: 10px;
    max-width: 90%;
}

/* ========================================================================= */
/* AMÉLIORATIONS VISUELLES POUR LA DATE ET LA RUBRIQUE (Cartes et Listes)   */
/* ========================================================================= */

.carte-date {
    font-size: 0.9em;
    color: #888;
    margin-top: auto;
    display: flex;
    align-items: center;
    padding-top: 15px;
}

.carte-date .separateur-date {
    display: none;
}

.carte-categorie {
    font-size: 0.8em;
    font-weight: 600;
    color: #2E7777;
    background-color: #eaf2f2;
    padding: 4px 8px;
    border-radius: 5px;
    margin-left: auto;
}

.item-date {
    display: flex;
    align-items: center;
    font-size: 0.85em;
    color: #888;
    margin-top: auto;
}

.item-date .separateur-date {
    margin: 0 0.5em;
    color: #ccc;
}

.item-rubrique-lien {
    font-weight: 500;
    color: #777;
    transition: color 0.2s ease;
}

.item-rubrique-lien:hover {
    color: #2E7777;
    text-decoration: none;
}

/* ======================================= */
/* 4. FOOTER (Style Amélioré)              */
/* ======================================= */

.site-footer {
    background-color: #FFFFFF;
    border-top: 1px solid #E0E0E0;
    padding: 25px 0;
    margin-top: 50px;
    font-size: 0.9em;
    color: #555;
    font-family: 'News Cycle', arial, sans-serif;
}

.footer-wrapper {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-copyright p {
    margin: 0;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer-nav a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: #2E7777;
}

.footer-nav .fa {
    font-size: 22px;
}

.footer-separator {
    color: #DDD;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .footer-wrapper {
        flex-direction: column;
        justify-content: center;
    }
}

/* ======================================= */
/* Styles de la Page de Recherche          */
/* ======================================= */
.page_recherche .section-liste {
    margin-bottom: 50px; /* Espace entre les résultats articles et la grille */
}
.zone-recherche-haut {
	background-color: #f8f8f8;
	border: 1px solid #eaeaea;
	border-radius: 10px;
	padding: 20px;
	margin: 30px auto;
	max-width: 700px;
}
.zone-recherche-haut .formulaire_recherche {
    display: flex;
    gap: 10px;
}
.zone-recherche-haut .formulaire_recherche .text {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.zone-recherche-haut .formulaire_recherche .text:focus {
    border-color: #2E7777;
    box-shadow: 0 0 0 3px rgba(46, 119, 119, 0.15);
    outline: none;
}
.zone-recherche-haut .formulaire_recherche .submit {
    background-color: #2E7777;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.zone-recherche-haut .formulaire_recherche .submit:hover {
    background-color: #245d5d;
}
.resultats-secondaires {
	margin-top: 50px;
	padding-top: 30px;
	border-top: 1px solid #E0E0E0;
}
.resultats-secondaires-grille {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 30px;
}
.resultats-secondaires-grille .liste-resultats {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.resultats-secondaires-grille .liste-resultats h2 {
	font-size: 1.4em;
	margin-bottom: 15px;
	border-bottom: none;
	padding-bottom: 0;
}
.resultats-secondaires-grille .liste-resultats ul {
	list-style: none;
	padding-left: 0;
}
.resultats-secondaires-grille .liste-resultats li a::before {
	font-family: FontAwesome;
	margin-right: 10px;
	color: #2E7777;
}
.resultats-secondaires-grille .liste-rubriques li a::before { content: "\f07c"; }
.resultats-secondaires-grille .liste-mots li a::before { content: "\f02b"; }
.resultats-secondaires-grille .liste-breves li a::before { content: "\f1ea"; }
.aucun-resultat {
	text-align: center;
	padding: 50px 20px;
	background-color: #fdfdfd;
	border: 1px dashed #ddd;
	border-radius: 10px;
	margin-top: 30px;
}
.aucun-resultat h2 {
	font-size: 1.5em;
	color: #333;
}
.aucun-resultat p {
	color: #666;
	margin-top: 10px;
}

/* ======================================= */
/* Pagination SPIP (Corrigé - Priorité)   */
/* ======================================= */

/* Conteneur de la pagination - on vise ul.pagination-items */
.pagination-items {
    text-align: center; 
    margin: 40px auto; 
    
    /* Styles pour la liste UL */
    list-style: none;
    padding: 0;
    
    /* Flexbox pour l'alignement horizontal */
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* ⚠️ CORRECTION : Rendu plus spécifique pour assurer l'espacement */
.pagination-items .pagination-item {
    margin: 2px;
}

/* Style commun pour les liens (a) et les span de la page active/points (...) */
.pagination-item-label {
    display: block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Style au survol pour les liens (a.pagination-item-label) */
.pagination-item a.pagination-item-label:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
    color: #333;
}

/* Style pour la page active (li.on .pagination-item-label) */
.pagination-item.on .pagination-item-label {
    background-color: #2E7777;
    color: #fff;
    border-color: #2E7777;
    font-weight: bold;
    cursor: default;
}

/* Style pour les "..." (li.tbc .pagination-item-label) */
.pagination-item.tbc .pagination-item-label {
    border: none;
    background: none;
    padding: 8px 4px;
}

/* ======================================= */
/* Styles de la Page Contact               */
/* ======================================= */
.contact-form-container {
    max-width: 750px;
    margin: 40px auto;
    padding: 30px 40px;
    background-color: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}
.contact-form-container .cartouche {
    text-align: center;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 20px;
    margin-bottom: 30px;
}
.contact-form-container .cartouche .soustitre {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 0;
}
.contact-form-container .formulaire_ecrire_auteur fieldset {
    border: none;
    padding: 0;
    margin: 0;
}
.contact-form-container .formulaire_ecrire_auteur legend {
    padding: 0;
    display: block;
    width: 100%;
    font-size: 1.4em;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 25px;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 15px;
}
.contact-form-container .formulaire_ecrire_auteur .editer {
    margin-bottom: 25px; 
}
.contact-form-container .formulaire_ecrire_auteur label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}
.contact-form-container .formulaire_ecrire_auteur input[type="text"],
.contact-form-container .formulaire_ecrire_auteur input[type="email"],
.contact-form-container .formulaire_ecrire_auteur textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form-container .formulaire_ecrire_auteur input[type="text"]:focus,
.contact-form-container .formulaire_ecrire_auteur input[type="email"]:focus,
.contact-form-container .formulaire_ecrire_auteur textarea:focus {
    border-color: #2E7777;
    box-shadow: 0 0 0 3px rgba(46, 119, 119, 0.15);
    outline: none;
}
.contact-form-container .formulaire_ecrire_auteur textarea {
    min-height: 150px;
    resize: vertical;
}
.contact-form-container .formulaire_ecrire_auteur .boutons {
    text-align: right;
    margin-top: 10px;
}
.contact-form-container .formulaire_ecrire_auteur .submit {
    background-color: #2E7777;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}
.contact-form-container .formulaire_ecrire_auteur .submit:hover {
    background-color: #245d5d;
    transform: translateY(-2px);
}

/* ======================================= */
/* Styles de la Page Auteur                */
/* ======================================= */
.auteur-profile {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 50px;
}
.auteur-header {
    display: flex;
    align-items: center;
    gap: 30px;
}
.auteur-logo img {
    border-radius: 50%;
}
.auteur-info .hyperlien {
    margin:0; 
    padding:0; 
    background:none;
}
.auteur-bio {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}