/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/


.submitactu button {
	background-color:black!important;
	width:auto!important;
}


div.inside-navigation.grid-container {
	background-color:#F7F8F9;
}

.entry-content, .contained-content.one-container .site-content, .contained-content.separate-containers .inside-article {
    padding: 3%;
}

/* --- GRILLE D'ARCHIVES STYLE "CARD" (Image en haut) --- */

/* 1. Structure de la grille */
@media (min-width: 769px) {
    .archive #main, .blog #main {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        padding: 20px 0;
    }
    .archive .page-header, .blog .page-header {
        grid-column: 1 / -1;
    }
}

/* 2. Réorganisation de la carte avec Flexbox */
.archive .inside-article, .blog .inside-article {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border-radius: 12px; /* Coins un peu plus arrondis pour l'élégance */
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    padding: 0 !important;
}

.archive .inside-article:hover, .blog .inside-article:hover  {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

/* 3. L'astuce magique : l'ordre des éléments */
.archive .post-image, .blog .post-image {
    order: 1; /* L'image passe en premier */
    margin: 0 !important;
}

.archive .entry-header, .blog .entry-header {
    order: 2; /* Le titre passe en deuxième */
    padding: 25px 25px 10px 25px;
}

.archive .entry-summary, .blog .entry-summary {
    order: 3; /* Le texte en troisième */
    padding: 0 25px 25px 25px;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.archive footer.entry-meta, .blog footer.entry-meta {
    order: 4; /* Les infos de catégorie en dernier */
    padding: 15px 25px;
    background: #fcfcfc;
    border-top: 1px solid #f0f0f0;
}

/* 4. Harmonisation de l'image */
.archive .post-image img , .blog .post-image img {
    width: 100%;
    height: 200px; /* Un peu plus grand pour l'élégance */
    object-fit: cover;
    display: block;
}

/* 5. Style du titre */
.archive .entry-title, .blog .entry-title {
    font-size: 1.2rem !important;
    font-weight: 800;
}

.archive .entry-title a , .blog .entry-title a {
    color: #222;
    text-decoration: none;
}

/* Responsive tablette */
@media (max-width: 1024px) and (min-width: 601px) {
    .archive #main, .blog #main {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- AMÉLIORATION DE LA HOME PAGE --- */

/* 1. Global & Aération */
.home .entry-content > * {
    margin-bottom: 40px; /* Plus d'espace entre les sections */
}

/* 2. Style de la section Héro (Blockquote de tête) */
.home blockquote.wp-block-quote {
    border-left: 5px solid var(--accent);
    background: #ffffff;
    padding: 40px !important;
    border-radius: 0 15px 15px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    font-style: normal;
    font-size: 1.1rem;
}

/* 1. Centrage des boutons "Par où commencer" et "Voir les derniers articles" */
.home .wp-block-buttons {
    justify-content: center !important; /* Force le centrage horizontal */
    display: flex !important;
    gap: 20px; /* Espace entre les deux boutons */
    margin-bottom: 40px;
}


/* 2. Rétablissement de la grille pour les 3 cases */
/* Note : J'utilise .wp-block-columns pour cibler le conteneur */
/* 2. Rétablissement de la grille pour les 3 cases */
/* Note : J'utilise .wp-block-columns pour cibler le conteneur */
.home .wp-block-columns.troiscases {
    display: flex !important;
    flex-wrap: nowrap !important; /* Empêche de passer à la ligne sur desktop */
    gap: 25px !important; /* Marge entre les colonnes */
}

.home .troiscases .wp-block-column {
    flex-basis: 33.33% !important; /* Force chaque colonne à prendre 1/3 */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* 3. Responsive pour les 3 cases (on les empile sur mobile pour la lisibilité) */
@media (max-width: 781px) {
    .home .wp-block-columns.troiscases {
        flex-wrap: wrap !important;
    }
    .home .troiscases .wp-block-column {
        flex-basis: 100% !important;
        margin-bottom: 20px;
    }
}

/* 4. Style de la liste d'articles "Essentiels" */
.home .wp-block-list {
    padding-left: 0;
    list-style: none;
}

.home .wp-block-list li {
    background: #ffffff;
    margin-bottom: 12px;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    transition: all 0.2s ease;
}

.home .wp-block-list li:hover {
    border-left-color: var(--accent);
    padding-left: 25px;
    background: #fcfcfc;
}

.home .wp-block-list li:hover a {
    text-decoration: none;
    font-weight: 800;
    color: var(--accent);
}

.home .wp-block-list li a {
    text-decoration: none;
    font-weight: 600;
    color: var(--contrast);
}

/* 5. Le Formulaire Fluent Form (Submit Button) */
.home .submitactu button {
    width: 100%;
    padding: 15px !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 8px !important;
    transition: background 0.3s;
}

/* 6. Section "Pourquoi Sans-Pétrole" en bas */
.home .wp-block-group.has-background {
    border-radius: 20px;
    padding: 60px !important;
}


/* --- ENTÊTE À PROPOS (PAGE 17) : ÉDITO + GALERIE --- */

/* 1. Configuration de la Galerie en 2+1 */
.page-id-17 .wp-block-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px !important;
    border: none !important;
    padding: 0 !important;
}

.page-id-17 .wp-block-gallery .wp-block-image {
    width: 100% !important;
    margin: 0 !important;
}

.page-id-17 .wp-block-gallery .wp-block-image:nth-child(3) {
    grid-column: 1 / span 2 !important;
    width: 50% !important;
    justify-self: center !important;
    margin-top: 5px !important;
}

.page-id-17 .wp-block-gallery img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    filter: grayscale(20%);
    transition: all 0.3s ease;
}

.page-id-17 .wp-block-gallery img:hover {
    filter: grayscale(0%);
    transform: translateY(-3px);
}

/* 2. Style du Texte de l'Édito */
.page-id-17 .wp-block-column:first-child p {
    font-size: 0.95rem; /* Légèrement réaugmenté pour la lisibilité */
    line-height: 1.5;
    color: #444;
    padding-right: 20px;
}

/* 3. Alignement des Colonnes (Centrage Vertical) */
.page-id-17 .wp-block-columns {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important; /* <--- LE CENTRAGE VERTICAL EST ICI */
    gap: 40px !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
}

.page-id-17 .wp-block-column:first-child {
    flex-basis: 60% !important;
}

.page-id-17 .wp-block-column:last-child {
    flex-basis: 40% !important;
    min-width: 300px;
}


.page-id-17 p.has-medium-font-size {
	font-size:0.9em!important;
}

/* 4. Responsive Mobile */
@media (max-width: 782px) {
    .page-id-17 .wp-block-columns {
        flex-wrap: wrap !important;
    }
    .page-id-17 .wp-block-column {
        flex-basis: 100% !important;
    }
    .page-id-17 .wp-block-gallery .wp-block-image:nth-child(3) {
        width: 100% !important;
    }
}


/* --- STYLE DU PORTAIL ARTICLES --- */

/* 1. Configuration de la Grille (Query Loop avec classe .grille-portail) */
.grille-portail .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 25px !important;
    list-style: none !important;
    padding: 0 !important;
}

/* 2. Style des Cartes (on imite le style des archives) */
.grille-portail .wp-block-post {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.grille-portail .wp-block-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 3. Gestion de l'image (en haut) */
.grille-portail .wp-block-post-featured-image {
    order: 1;
    margin: 0 !important;
}

.grille-portail .wp-block-post-featured-image img {
    height: 180px;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* 4. Contenu de la carte (Titre et Excerpt) */
.grille-portail .wp-block-post-title {
    order: 2;
    padding: 20px 20px 10px 20px;
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: 700;
}

.grille-portail .wp-block-post-excerpt {
    order: 3;
    padding: 0 20px 20px 20px;
    font-size: 0.9rem;
    color: #555;
    flex-grow: 1;
}

/* 5. Date et Meta (en bas) */
.grille-portail .wp-block-post-date {
    order: 4;
    padding: 12px 20px;
    background: #f9f9f9;
    font-size: 0.8rem;
    border-top: 1px solid #eee;
}

/* 6. Responsive (Passage en 1 colonne sur mobile) */
@media (max-width: 782px) {
    .grille-portail .wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
}


.page-id-167 .wp-block-buttons>.wp-block-button {
    margin-top: 15px!important;
}

h3.titreboxsp { 
	padding-top:20px;
}

/* Non affichage des meta auteur et catégorie */
div.entry-meta, .wp-block-pullquote cite  {
display:none!important;
}