/**
 * Metiers du droit — Liste & cartes
 * UIkit 3 (jl-*) + BEM .metier-card
 */

/* ── Page ── */
.metiers-page {
    padding-top: 40px;
}

/* ── Filtres pilules ── */
.metiers-filters {
    margin-bottom: 30px;
}
.metiers-filters .jl-subnav-pill > li > a {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: .88rem;
    font-weight: 500;
    color: #555;
    background: #f0f0f0;
    transition: background .2s, color .2s;
}
.metiers-filters .jl-subnav-pill > li.jl-active > a {
    background: #0f7173;
    color: #fff;
}
.metiers-filters .jl-subnav-pill > li > a:hover {
    background: #0f7173;
    color: #fff;
}

/* ── Carte metier ── */
.metier-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    transition: box-shadow .3s, transform .3s;
    text-decoration: none;
    color: inherit;
}
.metier-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.14);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

/* ── Image ── */
.metier-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #e8e8e8;
}
.metier-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.metier-card:hover .metier-card__img img {
    transform: scale(1.05);
}

/* Placeholder si pas d'image */
.metier-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f7173 0%, #0d5f61 100%);
    color: rgba(255,255,255,.5);
}

/* ── Badge secteur ── */
.metier-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #fff;
    background: rgba(15,113,115,.9);
}

/* ── Overlay resume au hover ── */
.metier-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
    opacity: 0;
    transition: opacity .3s ease;
}
.metier-card:hover .metier-card__overlay {
    opacity: 1;
}
.metier-card__overlay p {
    margin: 0;
    font-size: .8rem;
    line-height: 1.45;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Body ── */
.metier-card__body {
    flex: 1;
    padding: 14px 14px 14px;
}
.metier-card__title {
    margin: 0;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Compteur resultats ── */
.metiers-count {
    font-size: .85rem;
    color: #888;
    margin-bottom: 15px;
}
.metiers-count strong {
    color: #333;
}

/* ═══════════════════════════════════════
   DETAIL — .metier-detail
   ═══════════════════════════════════════ */

.metier-detail {
    padding-top: 30px;
}

/* ── Titre ── */
.metier-detail__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 25px;
    line-height: 1.25;
}

/* ── Hero image ── */
.metier-detail__hero {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}
.metier-detail__hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Intro ── */
.metier-detail__intro {
    font-size: .95rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

/* ── Contenu ── */
.metier-detail__content {
    font-size: .95rem;
    line-height: 1.7;
    color: #333;
}
.metier-detail__content h2,
.metier-detail__content h3 {
    margin-top: 28px;
    color: #222;
}

/* ── Sidebar ── */
.metier-detail__sidebar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 22px;
    position: sticky;
    top: 100px;
}
.metier-detail__sidebar-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f7173;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f7173;
}

/* ── Métadonnées dl ── */
.metier-detail__meta {
    margin: 0;
}
.metier-detail__meta dt {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .02em;
    margin-top: 14px;
}
.metier-detail__meta dt:first-child {
    margin-top: 0;
}
.metier-detail__meta dt [jl-icon] {
    color: #0f7173;
}
.metier-detail__meta dd {
    margin: 4px 0 0;
    font-size: .9rem;
    color: #333;
    line-height: 1.5;
}

/* ── Section titre (vidéos) ── */
.metier-detail__section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 20px;
}

/* ── Vidéos ── */
.metier-video {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}
.metier-video__media {
    position: relative;
    background: #111;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}
.metier-video__media iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.metier-video__player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.metier-video__iframe {
    width: 100%;
    height: 100%;
}
.metier-video__iframe iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.metier-video__play {
    color: rgba(255,255,255,.8);
    transition: color .2s;
    cursor: pointer;
}
.metier-video__play:hover {
    color: #fff;
}
.metier-video__info {
    flex: 1;
    padding: 14px;
}
.metier-video__desc {
    font-size: .88rem;
    line-height: 1.5;
    color: #444;
    margin: 0 0 10px;
}
.metier-video__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .82rem;
    font-weight: 600;
    color: #0f7173;
    text-decoration: none;
}
.metier-video__link:hover {
    color: #0a5456;
    text-decoration: none;
}
.metier-video__logo {
    margin-top: 10px;
    text-align: center;
}
.metier-video__logo img {
    max-height: 40px;
    opacity: .7;
    transition: opacity .2s;
}
.metier-video__logo img:hover {
    opacity: 1;
}

/* ── Bouton retour ── */
.metier-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    background: #0f7173;
    color: #fff;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .2s;
}
.metier-detail__back:hover {
    background: #0a5456;
    color: #fff;
    text-decoration: none;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */

@media (max-width: 959px) {
    .metier-detail__sidebar {
        position: static;
    }
}

@media (max-width: 639px) {
    .metiers-page {
        padding-top: 20px;
    }
    .metiers-filters .jl-subnav-pill > li > a {
        padding: 5px 12px;
        font-size: .82rem;
    }
    .metier-card__overlay {
        display: none;
    }
    .metier-detail__title {
        font-size: 1.4rem;
    }
    .metier-detail__sidebar {
        margin-top: 20px;
    }
}
