/**
 * Fiche métier CPT styles.
 *
 * @package LidTheme
 */

/* Override GeneratePress defaults */
.fiche-metier-wrap { font-family: 'Rubik', sans-serif; color: #384A4F; }
.fiche-metier-wrap h1,
.fiche-metier-wrap h2,
.fiche-metier-wrap h3 { font-family: 'Rubik', sans-serif; }

/* Force full-width layout — override GP flex container */
.single-fiche_metier #content,
.single-fiche_metier .site-content {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: visible !important;
}
.single-fiche_metier .fiche-metier-wrap {
    width: 100% !important;
    max-width: 100% !important;
}
.single-fiche_metier .inside-article { padding: 0 !important; margin: 0 !important; }
.single-fiche_metier article.post { padding: 0 !important; }
.single-fiche_metier .entry-content { margin: 0 !important; }
.single-fiche_metier #primary { margin: 0 !important; padding: 0 !important; width: 100% !important; }
.single-fiche_metier .site-main { margin: 0 !important; }
.single-fiche_metier .container.grid-container { max-width: 100% !important; padding: 0 !important; }

/* Header over hero */
.single-fiche_metier .site-header { position: relative; z-index: 100; }
.single-fiche_metier .site-header .inside-header {
    border-bottom: none;
    padding: 10px 20px;
}

/* Hero (short, dark background for logo visibility) */
.fm-hero {
    position: relative;
    background: #384A4F;
    min-height: 100px;
}

/* Container */
.fm-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Domaine badge (gold subtitle) */
.fm-domaine-badge {
    color: #C8B568;
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 8px;
}

/* Title section */
.fm-title-section {
    text-align: center;
    padding: 40px 0 30px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 30px;
}
.fm-title-section h1 {
    color: #384A4F;
    font-size: 40px;
    font-weight: 400;
    margin: 10px 0 0;
}

/* Meta items (icon list) */
.fm-meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
}
.fm-meta-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.fm-meta-list li:last-child { border-bottom: none; }
.fm-meta-icon {
    color: #C8B568;
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Scroll offset for TOC anchor links (compensate sticky header) */
.fiche-metier-wrap h2[id],
.fiche-metier-wrap .wp-block-heading[id] {
    scroll-margin-top: 100px;
}

/* Content sections */
.fm-section { margin-bottom: 35px; }
.fm-section-content {
    font-size: 17px;
    line-height: 1.7;
    color: #384A4F;
}
.fm-section-content ul {
    padding-left: 20px;
    margin: 10px 0;
}
.fm-section-content li {
    margin-bottom: 8px;
}

/* CTA section (full-width, image background, matches Elementor LID CTA) */
.fm-cta-section {
    position: relative;
    background-image: url('/app/uploads/2020/05/business-team-handshake-collaboration-concept.jpg');
    background-size: cover;
    background-position: center;
    padding: 0 40px;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 40px;
    border-radius: 0;
}
.fm-cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(56, 74, 79, 0.5);
}
.fm-cta-section > * {
    position: relative;
    z-index: 1;
}
.fm-cta-section .fm-cta-subtitle {
    color: #C8B568;
    font-size: 18px;
    font-weight: 400;
    margin: 0 0 15px;
}
.fm-cta-section .fm-cta-divider {
    width: 80px;
    height: 2px;
    background: rgba(255,255,255,0.3);
    margin: 0 auto 20px;
}
.fm-cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}
.fm-cta-section h3 {
    color: #fff;
    font-size: 40px;
    font-weight: 400;
    margin: 0 0 35px;
    line-height: 1.3;
    max-width: 800px;
}
.fm-cta-section p {
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    margin: 0 0 25px;
}
.fm-btn-gold {
    display: inline-block;
    background-color: #C8B568;
    color: #fff !important;
    padding: 15px 45px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 9999px;
    transition: opacity 0.3s;
}
.fm-btn-gold:hover { opacity: 0.85; color: #fff; }
.fm-btn-outline {
    display: inline-block;
    border: 2px solid #fff;
    color: #fff !important;
    padding: 13px 45px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s;
}
.fm-btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }

/* Breadcrumbs */
.fm-breadcrumbs {
    font-size: 14px;
    color: #9aabaf;
    padding: 0 0 20px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}
/* Seul le lien Accueil reste cliquable — les autres sont désactivés
   tant que les pages archives/termes n'ont pas de contenu */
.fm-breadcrumbs a { color: #9aabaf; text-decoration: none; pointer-events: none; }
.fm-breadcrumbs .breadcrumb-item:first-child a { color: #C8B568; pointer-events: auto; }
.fm-breadcrumbs .breadcrumb-item:first-child a:hover { text-decoration: underline; }

/* Summary card */
.fm-summary-card {
    background: #f5f7f8;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    margin-bottom: 30px;
}
.fm-summary-row {
    display: flex;
    align-items: stretch;
}
.fm-featured-image {
    flex: 0 0 340px;
    min-height: 280px;
}
.fm-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fm-summary-right {
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.fm-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.fm-meta-pills li {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.fm-meta-pills .fm-pill-highlight {
    background: #C8B568;
    color: #fff;
    border-color: #C8B568;
    font-weight: 600;
}
.fm-summary-intro {
    font-size: 16px;
    line-height: 1.6;
    color: #55666b;
    margin: 0;
}

/* Alternative titles */
.fm-alt-titles {
    font-size: 14px;
    color: #9aabaf;
    font-style: italic;
    padding: 12px 32px;
    margin: 0;
    border-top: 1px solid #e8e8e8;
    background: #f0f2f3;
}
.fm-alt-titles strong {
    color: #6b7c80;
}
.fm-date-update {
    font-size: 14px;
    color: #9aabaf;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Tables */
.fm-section-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 16px;
    border: 1px solid #C8B568;
    border-radius: 6px;
    overflow: hidden;
}
.fm-section-content table caption {
    font-weight: 600;
    margin-bottom: 10px;
    text-align: left;
    font-size: 15px;
    color: #6b7c80;
}
.fm-section-content table th {
    background: #C8B568;
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid #b8a45a;
}
.fm-section-content table td {
    padding: 10px 16px;
    border-bottom: 1px solid #e8dfc4;
}
.fm-section-content table tr:nth-child(even) td {
    background: #faf7ee;
}
.fm-section-content table tr:nth-child(odd) td {
    background: #fff;
}
.fm-section-content table tbody tr:last-child td {
    border-bottom: none;
}

/* FAQ details */
.fm-section-content .wp-block-wpseopress-faq-block-v2 {
    margin: 20px 0;
}
.fm-section-content details {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    padding: 0;
    overflow: hidden;
}
.fm-section-content details summary {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 17px;
    list-style: none;
    background: #C8B568;
    color: #fff;
    transition: background 0.2s;
}
.fm-section-content details summary:hover {
    background: #b8a45a;
}
.fm-section-content details[open] summary {
    background: #f5f7f8;
    color: #384A4F;
    border-bottom: 1px solid #e0e0e0;
}
.fm-section-content details summary::before {
    content: '▸ ';
    color: #fff;
}
.fm-section-content details[open] summary::before {
    content: '▾ ';
    color: #C8B568;
}
.fm-section-content details summary::-webkit-details-marker { display: none; }
.fm-section-content details > .wp-block-paragraph,
.fm-section-content details > p {
    padding: 20px 24px;
    margin: 0;
    line-height: 1.7;
}

/* Related métiers (maillage interne) */
.fm-related-metiers {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}
.fm-related-metiers h2 {
    font-size: 24px;
    font-weight: 400;
    color: #384A4F;
    margin-bottom: 25px;
}

/* Related offers grid */
.fm-related-offers {
    margin-top: 40px;
    margin-bottom: 10px;
}
.fm-related-offers h2 {
    font-size: 24px;
    font-weight: 400;
    color: #384A4F;
    margin-bottom: 20px;
}
.fm-offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.fm-offer-card {
    display: block;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 24px;
    text-decoration: none;
    color: #384A4F;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.fm-offer-card:hover {
    border-color: #C8B568;
    box-shadow: 0 4px 12px rgba(200,181,104,0.15);
    color: #384A4F;
}
.fm-offer-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #384A4F;
    line-height: 1.3;
}
.fm-offer-card:hover .fm-offer-title {
    color: #C8B568;
}
.fm-offer-meta {
    font-size: 14px;
    color: #6b7c80;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* TOC styling */
.fm-section-content .wp-block-wpseopress-table-of-contents {
    background: #f5f7f8;
    border-left: 3px solid #C8B568;
    padding: 20px 24px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 30px;
}

/* =============================================
   Archive fiches métiers
   ============================================= */

.fm-archive-header {
    text-align: center;
    padding: 40px 0 20px;
    margin-bottom: 20px;
}
.fm-archive-header h1 {
    color: #384A4F;
    font-size: 36px;
    font-weight: 400;
    margin: 0 0 15px;
}
.fm-archive-intro {
    font-size: 17px;
    line-height: 1.6;
    color: #6b7c80;
    max-width: 800px;
    margin: 0 auto;
}

/* Domain filters (client-side JS) */
.fm-domain-filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}
.fm-filter-pill {
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #384A4F;
    transition: all 0.2s;
    cursor: pointer;
    background: transparent;
}
.fm-filter-pill:hover {
    border-color: #C8B568;
    color: #C8B568;
}
.fm-filter-active {
    background: #C8B568;
    color: #fff !important;
    border-color: #C8B568;
}
.fm-archive-card[data-hidden] {
    display: none;
}

/* Cards grid */
.fm-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.fm-archive-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #384A4F;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.fm-archive-card:hover {
    border-color: #C8B568;
    box-shadow: 0 6px 20px rgba(200,181,104,0.15);
    color: #384A4F;
}
.fm-archive-card-image {
    height: 200px;
    overflow: hidden;
}
.fm-archive-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.fm-archive-card:hover .fm-archive-card-image img {
    transform: scale(1.05);
}
.fm-archive-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.fm-archive-badge {
    display: inline-block;
    background: #C8B568;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    align-self: flex-start;
}
.fm-archive-card-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #384A4F;
    line-height: 1.3;
}
.fm-archive-card:hover .fm-archive-card-title {
    color: #C8B568;
}
.fm-archive-card-salary {
    font-size: 15px;
    color: #C8B568;
    font-weight: 600;
    margin: 0 0 10px;
}
.fm-archive-card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #6b7c80;
    margin: 0;
    flex: 1;
}
.fm-archive-card-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #C8B568;
}

/* Responsive */
@media (max-width: 768px) {
    .fm-archive-grid { grid-template-columns: 1fr; }
    .fm-archive-header h1 { font-size: 26px; }
    .fm-offers-grid { grid-template-columns: 1fr; }
    .fm-summary-row { flex-direction: column; }
    .fm-featured-image { flex: none; width: 100%; min-height: 200px; }
    .fm-summary-right { padding: 20px; }
    .fm-alt-titles { padding: 12px 20px; }
    .fm-title-section h1 { font-size: 28px; }
    .fm-cta-section { padding: 30px 20px; }
    .fm-btn-gold, .fm-btn-outline { display: block; margin: 10px 0; }
    .fm-section-content table { font-size: 14px; }
    .fm-section-content table th,
    .fm-section-content table td { padding: 8px 10px; }
}
