/* =========================================================
   1. VARIABLES DE LA CHARTE COMVERSIVE (Issues de style.css)
========================================================= */
:root {
    --color-oxford-blue: #001D38 !important;
    --color-metallic-gold: #D3B000 !important;
    --color-light-bg: #f8f9fa !important;
    --font-title: "Techna Sans", sans-serif !important;
    --font-body: "Open Sans", sans-serif !important;
}

/* =========================================================
   2. MASQUAGE INTELLIGENT DES LIENS D'ÉVITEMENT (#prelude)
========================================================= */
/* Cache les liens "Aller au contenu / au menu", sauf au focus du clavier */
#prelude, .skip-links {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

#prelude:focus-within, .skip-links:focus-within {
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    white-space: normal !important;
    background: var(--color-oxford-blue) !important;
}

/* =========================================================
   3. CORRECTION DU TITRE DU BLOG (Mode "Pivot Section")
========================================================= */
/* Le conteneur avec l'image de fond et l'effet parallaxe */
#top {
    position: relative !important;
    padding: 5rem 1.5rem !important;
    background-image: url('/fond_blog_comversive.webp') !important; /* Chemin depuis la racine du site */
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important; /* C'est ce qui donne l'effet de glissement (parallaxe) */
    text-align: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-bottom: 3px solid var(--color-metallic-gold) !important;
}

/* Le calque d'assombrissement (overlay) pour garantir la lisibilité du texte */
#top::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: rgba(26, 26, 26, 0.7) !important;
    z-index: 1 !important;
}

/* On s'assure que le contenu (H1 et paragraphes) passe au-dessus du calque sombre */
#top h1, 
#top p, 
#top .blog-desc {
    position: relative !important;
    z-index: 2 !important;
}

/* Typographie du H1 (Passage en blanc éclatant pour le contraste) */
#top h1, 
#top h1 a,
#top h1 span,
#top h1 span a,
#top h1 a:link,
#top h1 span a:link,
#top h1 a:visited,
#top h1 span a:visited {
    font-family: var(--font-title) !important;
    color: #ffffff !important; 
    text-decoration: none !important;
    font-size: 3.5rem !important; /* Un peu plus grand, pour imposer la thématique */
    font-weight: 700 !important;
    display: inline-block !important;
    margin: 0 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important; /* Légère ombre pour détacher le texte */
}

/* Effet au survol du titre (Or Métallique) */
#top h1 a:hover,
#top h1 span a:hover {
    color: var(--color-metallic-gold) !important;
    text-decoration: none !important;
}

/* Slogan / sous-titre du blog */
#top p, #top .blog-desc {
    font-family: var(--font-body) !important;
    color: #bae0fb !important; /* Reprise de votre couleur Uranian Blue de la pivot-section */
    font-size: 1.2rem !important;
    text-align: center !important;
    margin-top: 15px !important;
    line-height: 1.6 !important;
}

/* =========================================================
   4. CORPS DU BLOG ET ARTICLES (Design Comversive)
========================================================= */
body, #page {
    font-family: var(--font-body);
    background-color: var(--color-light-bg) !important;
    color: var(--color-oxford-blue) !important;
    margin: 0;
}

#main {
    max-width: 900px !important;
    margin: 3rem auto !important;
    padding: 0 20px !important;
}

.post {
    background-color: #ffffff !important;
    padding: 2.5rem !important;
    margin-bottom: 2.5rem !important;
    border-radius: 12px !important; /* Arrondi des "service-cards" Comversive */
    box-shadow: 0 4px 12px rgba(0, 29, 56, 0.08) !important; /* Ombre officielle */
    border: none !important;
}

.post-title, .post-title a, .post-title a:visited {
    font-family: var(--font-title);
    color: var(--color-oxford-blue) !important;
    font-size: 2.2rem !important;
    text-decoration: none !important;
    border-bottom: 2px solid #e9ecef !important;
    padding-bottom: 0.5rem !important;
}

/* Liens génériques à l'intérieur des articles */
.post-content a {
    color: var(--color-metallic-gold) !important;
    font-weight: 600 !important;
}

.post-content a:hover {
    color: var(--color-oxford-blue) !important;
    text-decoration: underline !important;
}

/* =========================================================
   5. STYLE DE LA NAVIGATION BAS DE PAGE (#blognav)
========================================================= */
/* Transformer le conteneur en grille flexible et centrée */
#blognav {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 3rem !important;
    max-width: 900px !important;
    margin: 4rem auto 2rem auto !important;
    padding: 3rem 1rem 1rem 1rem !important;
    border-top: 3px solid var(--color-metallic-gold) !important; /* Ligne de rappel dorée */
    text-align: center !important;
}

/* Espacement égal pour les deux widgets (Recherche et Catégories) */
#blognav .widget {
    flex: 1 !important;
    min-width: 280px !important;
}

/* Typographie des titres des widgets */
#blognav .widget h2, 
#blognav .widget h2 label {
    font-family: var(--font-title) !important;
    color: var(--color-oxford-blue) !important;
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    border: none !important;
}

/* --- WIDGET RECHERCHE --- */
#blognav #q-form p {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 0 !important;
}

/* Champ de texte de recherche */
#blognav input[type="search"] {
    font-family: var(--font-body) !important;
    padding: 12px 15px !important;
    border: 1px solid #ced4da !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    width: 100% !important;
    max-width: 220px !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}

#blognav input[type="search"]:focus {
    border-color: var(--color-metallic-gold) !important;
    box-shadow: 0 0 5px rgba(211, 176, 0, 0.3) !important;
}

/* Bouton OK (Design tiré du style.css de Comversive) */
#blognav input[type="submit"] {
    font-family: var(--font-body) !important;
    background-color: var(--color-metallic-gold) !important;
    color: var(--color-oxford-blue) !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: transform 0.2s ease-in-out, background-color 0.2s !important;
}

#blognav input[type="submit"]:hover {
    background-color: #F4AE24 !important; /* var(--color-yellow-cta) */
    transform: translateY(-2px) !important;
}

/* --- WIDGET CATÉGORIES --- */
#blognav .categories ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.8rem !important;
}

/* Style des liens de catégories (Format badges/boutons) */
#blognav .categories li a {
    font-family: var(--font-body) !important;
    color: var(--color-oxford-blue) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 10px 18px !important;
    background-color: #ffffff !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px !important;
    display: inline-block !important;
    box-shadow: 0 2px 4px rgba(0, 29, 56, 0.03) !important;
    transition: all 0.3s ease !important;
}

#blognav .categories li a:hover {
    background-color: var(--color-oxford-blue) !important;
    color: var(--color-metallic-gold) !important;
    border-color: var(--color-oxford-blue) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 4px 8px rgba(0, 29, 56, 0.1) !important;
}

/* =========================================================
   6. MISE EN FORME DES ÉTIQUETTES / TAGS (ul.post-tags)
========================================================= */
/* On transforme la liste verticale en liste horizontale flexible */
ul.post-tags {
    list-style-type: none !important;
    padding: 0 !important;
    margin: 2rem 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

ul.post-tags li {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Astuce : Ajout automatique du séparateur "|" */
ul.post-tags li::after {
    content: "|" !important;
    color: var(--color-metallic-gold) !important; /* Le doré Comversive */
    margin: 0 12px !important;
    font-weight: 800 !important;
}

/* On masque le séparateur après le tout dernier tag de la liste */
ul.post-tags li:last-child::after {
    content: none !important;
    margin: 0 !important;
}

/* Typographie et couleurs des liens (tags) */
ul.post-tags li a {
    font-family: var(--font-body) !important;
    color: #6c757d !important; /* Gris discret pour ne pas distraire la lecture */
    font-size: 0.85rem !important;
    text-transform: uppercase !important; /* Look expert / technique */
    font-weight: 700 !important;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

/* Effet au survol : on repasse au Bleu Oxford */
ul.post-tags li a:hover {
    color: var(--color-oxford-blue) !important;
}

/* =========================================================
   7. MISE EN FORME DES LÉGENDES D'IMAGES (Figcaption)
========================================================= */
/* On cible les légendes spécifiquement à l'intérieur des articles */
.post figcaption, 
figure figcaption {
    font-family: var(--font-body) !important;
    font-size: 0.85rem !important; /* Réduction de la taille de la police */
    font-style: italic !important; /* Mise en italique */
    color: #6c757d !important; /* Gris "dark-gray" de la charte Comversive */
    text-align: center !important; /* Centrage parfait sous l'image */
    margin-top: 0.75rem !important; /* Léger espace pour respirer sous l'image */
    line-height: 1.4 !important; /* Interligne resserré pour faire "bloc" */
    padding: 0 1rem !important; /* Évite que le texte touche les bords sur mobile */
}

/* =========================================================
   8. ENCARTS CALL-TO-ACTION (Dans les articles)
========================================================= */
/* Conteneur du CTA */
.cta-section {
    background: linear-gradient(45deg, var(--color-oxford-blue, #001D38), #003566) !important;
    padding: 50px 25px !important;
    border-radius: 12px !important;
    text-align: center !important;
    margin: 40px 0 !important;
    box-shadow: 0 8px 24px rgba(0, 29, 56, 0.15) !important;
}

/* Titre du CTA */
.cta-section h2 {
    font-family: var(--font-title) !important;
    color: #ffffff !important;
    border-bottom: none !important;
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    font-size: 2rem !important;
}

/* Texte incitatif du CTA */
.cta-section p {
    font-family: var(--font-body) !important;
    color: #e9ecef !important; /* Gris très clair pour le contraste */
    font-size: 1.1rem !important;
    margin-bottom: 30px !important;
    line-height: 1.6 !important;
}

/* Bouton d'action (Design tiré du site principal) */
.cta-button, 
.cta-section a.cta-button,
.cta-section a.cta-button:link,
.cta-section a.cta-button:visited {
    display: inline-block !important;
    background-color: var(--color-yellow-cta, #F4AE24) !important;
    color: #1a1a1a !important; /* Gris très foncé / presque noir pour une lisibilité maximale */
    padding: 15px 30px !important;
    border-radius: 8px !important;
    font-weight: 700 !important; /* Un peu plus gras pour faire ressortir le texte */
    font-family: var(--font-body) !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: transform 0.2s ease-in-out, background-color 0.2s !important;
}

/* Effet dynamique au survol du bouton */
.cta-button:hover {
    background-color: var(--color-metallic-gold, #d3b000) !important;
    transform: scale(1.05) !important;
    text-decoration: none !important;
    color: var(--color-oxford-blue, #001D38) !important;
}