/* =================================================================
    PALETTE DE COULEURS ET VARIABLES GLOBALES
   ================================================================= */
:root {
  /* Couleurs */
  --primary: #FF7A00;      
  --secondary: #00B050;    
  --dark: #1A1A1A;
  --light: #F8F9FA;
  --text-color: #333;
  --meta-color: #6c757d;

  /* Ombres & Effets */
  --shadow-soft: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(255,122,0,0.25);

  /* Typographie */
  --font-primary: 'Inter', 'Segoe UI', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --border-radius: 12px;
}

/* =================================================================
    STYLES DE BASE ET HÉROS
   ================================================================= */
.jobkora-blog-body {
    font-family: var(--font-primary);
    background-color: #fff;
    color: var(--text-color);
}

.blog-hero {
    text-align: center;
    padding: 5rem 1rem;
    background: linear-gradient(45deg, var(--dark), #000000);
    color: white;
    overflow: hidden; /* Empêche tout débordement */
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    min-height: 70px; /* Empêche le sautillement de la page pendant l'écriture */
}

.hero-content .lead {
    font-size: 1.25rem;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.9;
}

/* =================================================================
    STRUCTURE ET STYLES DES CARTES (BASE COMMUNE)
   ================================================================= */
.featured-card, .blog-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    overflow: hidden; /* Important pour les coins arrondis */
    box-shadow: var(--shadow-soft);
    text-decoration: none;
    color: inherit;
    display: flex;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.featured-card:hover, .blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* ✅ LE CORRECTIF CLÉ EST ICI ✅ */
.blog-card-img-container {
    overflow: hidden; /* Cache tout ce qui dépasse de ce conteneur */
    position: relative;
}

.blog-card-img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease-in-out; /* Animation de zoom sur l'image */
}

.featured-card:hover .blog-card-img,
.blog-card:hover .blog-card-img {
    transform: scale(1.05); /* Effet de zoom au survol */
}

/* =================================================================
    CARTE "À LA UNE" (FEATURED)
   ================================================================= */
.featured-post-section {
    padding: 3rem 0;
}
.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
}
.featured-card .blog-card-img {
    height: 450px;
    object-fit: cover;
}
.featured-card-content {
    padding: 2rem;
}
.featured-card-content h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--dark);
    line-height: 1.3;
}
.featured-card-content .excerpt {
    line-height: 1.7;
    margin: 1rem 0;
}

/* =================================================================
    GRILLE DES ARTICLES
   ================================================================= */
.posts-grid-section {
    padding: 3rem 0;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    text-align: center;
}
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}
.blog-card {
    flex-direction: column;
}
.blog-card .blog-card-img {
    height: 220px;
    object-fit: cover;
}
.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permet au footer de se coller en bas */
}
.blog-card-content h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin: 0.5rem 0;
    line-height: 1.4;
}

/* =================================================================
    ÉLÉMENTS COMMUNS AUX CARTES (TAGS, FOOTER)
   ================================================================= */
.category-tag {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.blog-card .category-tag {
    color: var(--secondary);
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Pousse le footer en bas de la carte */
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}
.meta-info {
    font-size: 0.85rem;
    color: var(--meta-color);
}
.read-more-link {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    transition: transform 0.2s ease;
}
.blog-card:hover .read-more-link {
    transform: translateX(5px);
}

/* =================================================================
    BOUTON "CHARGER PLUS"
   ================================================================= */
.load-more-container {
    text-align: center;
    padding: 2.5rem 0 1rem 0;
}
.load-more-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(95deg, var(--primary) 0%, #ff9a40 100%);
    border: none;
    padding: 14px 35px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    letter-spacing: 0.5px;
}
.load-more-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.load-more-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
}

/* =================================================================
    ANIMATIONS
   ================================================================= */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.typewriter {
    display: inline-block;
    overflow: hidden; 
    white-space: nowrap;
    border-right: .15em solid orange; /* Le curseur */
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

/* =================================================================
    RESPONSIVE DESIGN
   ================================================================= */
@media (max-width: 992px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-card .blog-card-img {
        height: 350px;
    }
}
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
        min-height: 50px;
    }
    .featured-card-content h2 {
        font-size: 1.8rem;
    }
    .section-title {
        font-size: 2rem;
    }
}

