/* ─────────────────────────────────────────────────────────────────────────────
   PHOTO ENHANCEMENTS
   ───────────────────────────────────────────────────────────────────────────── */
.photo-enhanced {
    filter: contrast(1.05) saturate(1.1) brightness(1.02);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.photo-enhanced:hover {
    transform: scale(1.015);
    box-shadow: var(--shadow-lg);
    filter: contrast(1.05) saturate(1.15) brightness(1.05);
}

/* Grid-2 avec image : conteneur d'image optimisé */
.grid-2>div:has(.photo-enhanced) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-2 .photo-enhanced {
    max-width: 320px;
    max-height: 320px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-xl);
}

@media (max-width: 768px) {
    .grid-2 .photo-enhanced {
        max-width: 200px;
        max-height: 200px;
    }
}

.card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: 0;
    filter: contrast(1.05) saturate(1.1);
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO ACTIONS INLINE (Button + Badge on same line)
   ───────────────────────────────────────────────────────────────────────────── */
.hero-actions--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
}

.badges--compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0;
}

.badges--compact img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.badges--compact span {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .hero-actions--inline {
        flex-direction: column;
        align-items: flex-start;
    }

    .badges--compact {
        margin-top: 0.5rem;
    }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PAGE À PROPOS — hero-card IT & Tech : équilibre visuel avec colonne de texte
   ───────────────────────────────────────────────────────────────────────────── */

/* Colonne de gauche : supprime la marge basse du dernier <p> pour ne pas fausser la hauteur */
.page-a-propos .section-alt .grid-2>div:first-child>p:last-child {
    margin-bottom: 0 !important;
}

.hero-card--stretch {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 20px 24px 16px !important;
    gap: 0 !important;
    margin-bottom: 0 !important;
}

/* Sur-titre 'Contextes' : +4px par rapport au .tag natif (0.75rem → 1rem) */
.hero-card--stretch .tag {
    font-size: 1rem !important;
    margin-bottom: 14px !important;
    width: max-content !important;
}

/* Grand titre 'IT, Tech...' : élargi au max sans passer sur 2 lignes */
.hero-card--stretch h3 {
    font-size: clamp(1.125rem, 2.2vw, 1.5rem) !important;
    margin: 0 0 12px !important;
    white-space: nowrap !important;
}

/* Paragraphe interne : même taille que la colonne gauche (var(--p)) */
.hero-card--stretch p {
    font-size: var(--p) !important;
    margin: 0 0 1.5rem !important;
}

/* Grille 2x2 des magnets : dans les 4 angles, texte centré */
.hero-card--stretch .pills {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1rem !important;
    align-content: space-between !important;
    max-width: 100% !important;
    margin-top: auto !important;
}

.hero-card--stretch .pills .pill {
    font-size: var(--p) !important;
    text-align: center !important;
    white-space: nowrap !important;
    padding: 6px 8px !important;
}

.hero-card--stretch .pills .pill:nth-child(odd) {
    justify-self: start !important;
}

.hero-card--stretch .pills .pill:nth-child(even) {
    justify-self: end !important;
}

@media (max-width: 768px) {
    .hero-card--stretch .pills {
        grid-template-columns: 1fr !important;
        justify-items: center !important;
    }

    .hero-card--stretch .pills .pill:nth-child(odd),
    .hero-card--stretch .pills .pill:nth-child(even) {
        justify-self: center !important;
    }
}