/* ==========================================
   WineJobr / Vendangeur - Design System
   Palette par défaut : Bordeaux Winejobr + Or
   Variant : .theme-vendangeur (Vert Vigne)
   ========================================== */

:root {
    /* Palette winejobr par défaut */
    --wj-primary: #722F37;
    --wj-primary-dark: #5A252C;
    --wj-primary-light: #F4E3E5;

    /* Or - commun aux deux marques */
    --wj-accent: #E9C46A;
    --wj-accent-dark: #D4A843;
    --wj-accent-light: #FFF8E7;

    /* Neutrals */
    --wj-text: #212529;
    --wj-text-muted: #6C757D;
    --wj-bg-light: #F8F9FA;
    --wj-bg-dark: #1a1a2e;
    --wj-border: #DEE2E6;
    --wj-white: #FFFFFF;

    /* Sémantique */
    --wj-success: #4ade80;
    --wj-error: #dc3545;
    --wj-warning: #f59e0b;

    /* RGB triplets pour usages rgba() */
    --wj-primary-rgb: 114, 47, 55;
    --wj-accent-rgb: 233, 196, 106;

    /* Typo */
    --wj-font-heading: 'Poppins', sans-serif;
    --wj-font-body: 'Open Sans', sans-serif;
}

body.theme-vendangeur {
    --wj-primary: #2D6A4F;
    --wj-primary-dark: #1B4332;
    --wj-primary-light: #D8F3DC;
    --wj-primary-rgb: 45, 106, 79;
}

/* ---- TYPOGRAPHY ---- */
body {
    font-family: var(--wj-font-body);
    color: var(--wj-text);
}

h1, h2, h3, h4, h5, h6,
.fw-bold {
    font-family: var(--wj-font-heading);
}

/* ---- BUTTONS ---- */
.btn-wj-primary {
    background-color: var(--wj-primary);
    border-color: var(--wj-primary);
    color: #fff;
}
.btn-wj-primary:hover,
.btn-wj-primary:focus {
    background-color: var(--wj-primary-dark);
    border-color: var(--wj-primary-dark);
    color: #fff;
}

.btn-wj-accent {
    background-color: var(--wj-accent);
    border-color: var(--wj-accent);
    color: var(--wj-text);
    font-weight: 600;
}
.btn-wj-accent:hover,
.btn-wj-accent:focus {
    background-color: var(--wj-accent-dark);
    border-color: var(--wj-accent-dark);
    color: var(--wj-text);
}

/* ---- BADGES ---- */
.bg-wj-primary-light {
    background-color: var(--wj-primary-light) !important;
}
.text-wj-primary {
    color: var(--wj-primary) !important;
}
.bg-wj-accent-light {
    background-color: var(--wj-accent-light) !important;
}
.text-wj-accent {
    color: var(--wj-accent) !important;
}

/* ---- ICONS ---- */
.wj-icon {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
}
.wj-icon-xs {
    width: 12px;
    height: 12px;
    vertical-align: -1px;
}
.wj-icon-sm {
    width: 18px;
    height: 18px;
    vertical-align: -3px;
}
.text-wj-accent .wj-icon-sm,
.text-wj-accent svg {
    fill: var(--wj-accent);
    stroke: var(--wj-accent);
}

/* ---- NAVBAR ---- */
.navbar {
    padding: 0.75rem 0;
}
.navbar .nav-link {
    font-family: var(--wj-font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--wj-text);
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: var(--wj-primary);
}

/* ---- HERO ---- */
.wj-hero {
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
/* Left half: dark green + vendangeur image */
.wj-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: var(--wj-primary-dark);
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    z-index: 0;
}
img.wj-hero__bg-left,
img.wj-hero__bg-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 60%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    /* Décoratifs (opacity 0.10-0.12), exclus du LCP candidat pour libérer le score mobile */
    content-visibility: auto;
    contain-intrinsic-size: 60vw 50vh;
}
img.wj-hero__bg-left {
    left: 0;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0 100%);
    opacity: 0.12;
    z-index: 1;
}
body.theme-winejobr img.wj-hero__bg-left {
    content: url('/images/hero/winejobr-hero.webp');
    opacity: 0.18;
}
/* Right half: lighter green + domaine image */
.wj-hero::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: var(--wj-primary);
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
    z-index: 0;
}
img.wj-hero__bg-right {
    right: 0;
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
    opacity: 0.10;
    z-index: 1;
}
body.theme-winejobr img.wj-hero__bg-right {
    content: url('/images/hero/winejobr-hero.webp');
    opacity: 0.18;
}
.wj-hero > .container {
    position: relative;
    z-index: 2;
}
.min-vh-50 {
    min-height: 50vh;
}
.wj-search-form .form-control,
.wj-search-form .form-select {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}
.wj-search-form .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}
.wj-hero-card {
    border-radius: 12px;
}

/* ---- JOB CARDS ---- */
.wj-job-card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wj-job-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}
.wj-company-logo img,
.wj-logo-placeholder {
    width: 48px;
    height: 48px;
    object-fit: cover;
}
.wj-logo-placeholder {
    background: var(--wj-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wj-primary);
}

/* ---- REGION CARDS ---- */
.wj-region-card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wj-region-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}
.wj-region-img {
    position: relative;
    height: 160px;
    overflow: hidden;
}
.wj-region-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.wj-region-card:hover .wj-region-img img {
    transform: scale(1.05);
}
.wj-region-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* ---- COUNTRY CARDS ---- */
.wj-country-flag-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 28px;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* ---- SWIPER REGION SLIDERS ---- */
.swiper-regions,
.swiper-countries {
    overflow: hidden;
    padding: 4px;
}
.swiper-regions .swiper-slide,
.swiper-countries .swiper-slide {
    height: auto;
}
.swiper-btn-prev-regions,
.swiper-btn-next-regions,
.swiper-btn-prev-countries,
.swiper-btn-next-countries {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.swiper-btn-prev-regions svg,
.swiper-btn-next-regions svg,
.swiper-btn-prev-countries svg,
.swiper-btn-next-countries svg {
    width: 16px;
    height: 16px;
}

/* ---- PROFILE CARDS ---- */
.wj-profile-card {
    border-radius: 12px;
    transition: transform 0.2s;
    cursor: pointer;
}
.wj-profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}
.wj-avatar img,
.wj-avatar-placeholder {
    width: 50px;
    height: 50px;
    object-fit: cover;
}
.wj-avatar-placeholder {
    background: var(--wj-primary-light);
    color: var(--wj-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}
.wj-avatar-sm img,
.wj-avatar-placeholder-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
}
.wj-avatar-placeholder-sm {
    background: var(--wj-primary-light);
    color: var(--wj-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ---- LAUNCH & STATS SECTION ---- */
.wj-launch-section {
    background: linear-gradient(135deg, var(--wj-primary-dark) 0%, var(--wj-primary) 100%);
    position: relative;
    overflow: hidden;
}
.wj-launch-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* Launch banner */
.wj-launch-banner {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.wj-launch-badge {
    flex-shrink: 0;
    background: var(--wj-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 2px;
    animation: wj-badge-glow 2s ease-in-out infinite;
}
@keyframes wj-badge-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--wj-accent-rgb, 233,196,106), 0.4); }
    50% { box-shadow: 0 0 16px 4px rgba(var(--wj-accent-rgb, 233,196,106), 0.2); }
}
.wj-launch-content h3 {
    font-size: 1.3rem;
}
.text-white-75 {
    color: rgba(255,255,255,0.75);
}

/* Stats cards */
.wj-stat-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 24px 16px;
    position: relative;
}
.wj-stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.wj-stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-top: 6px;
    font-weight: 500;
}

/* Recruiting / blurred stat */
.wj-stat-recruiting {
    position: relative;
}
.wj-stat-blurred {
    filter: blur(8px);
    opacity: 0.3;
    pointer-events: none;
    user-select: none;
}
.wj-stat-number-placeholder {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}
.wj-stat-recruiting-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -65%);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--wj-accent);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Pulse dots */
.wj-pulse-dot,
.wj-pulse-dot-sm,
.wj-pulse-dot-lg {
    display: inline-block;
    border-radius: 50%;
    background: #4ade80;
    animation: wj-pulse 1.5s ease-in-out infinite;
}
.wj-pulse-dot { width: 8px; height: 8px; }
.wj-pulse-dot-sm { width: 6px; height: 6px; }
.wj-pulse-dot-lg { width: 10px; height: 10px; margin-right: 8px; }
@keyframes wj-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.4); }
}

/* Activity feed */
.wj-activity-feed h5 {
    display: flex;
    align-items: center;
    justify-content: center;
}
.wj-activity-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    transition: background 0.2s, border-color 0.2s;
}
.wj-activity-card:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}
.wj-activity-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wj-accent);
    flex-shrink: 0;
}
.wj-activity-icon svg {
    width: 20px;
    height: 20px;
}
.wj-activity-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.wj-activity-text strong {
    color: #fff;
    font-size: 0.95rem;
}
.wj-activity-text span {
    color: rgba(255,255,255,0.55);
    font-size: 0.82rem;
    line-height: 1.4;
}
.wj-activity-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    align-self: flex-start;
}
.wj-status-active {
    color: #4ade80;
}

/* ---- FEATURES ---- */
.wj-feature-icon {
    width: 64px;
    height: 64px;
    background: var(--wj-primary-light);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wj-primary);
    margin: 0 auto;
}
.wj-feature-icon svg {
    width: 28px;
    height: 28px;
}

/* ---- PRICING ---- */
.wj-pricing-featured {
    border: 2px solid var(--wj-primary) !important;
}
.wj-badge-popular {
    position: absolute;
    top: -1px;
    right: 20px;
    background: var(--wj-primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 0 0 8px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- BLOG CARDS ---- */
.wj-blog-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
}
.wj-blog-card:hover {
    transform: translateY(-2px);
}
.wj-blog-card .card-img-top {
    height: 180px;
    object-fit: cover;
}
.wj-blog-placeholder-img {
    height: 180px;
    background: var(--wj-primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wj-primary);
}
.wj-blog-placeholder-img svg {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

/* ---- FAQ ACCORDION ---- */
.accordion-button:not(.collapsed) {
    background-color: var(--wj-primary-light);
    color: var(--wj-primary);
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--wj-primary-rgb), 0.25);
}

/* ---- CTA SECTION ---- */
.wj-cta-section {
    background: linear-gradient(135deg, var(--wj-primary) 0%, var(--wj-primary-dark) 100%);
}

/* ---- FOOTER ---- */
.wj-footer {
    background: var(--wj-bg-dark);
    color: #ccc;
}
.wj-footer h6 {
    color: #fff;
}
.wj-footer-links li {
    margin-bottom: 0.5rem;
}
.wj-footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9rem;
}
.wj-footer-links a:hover {
    color: var(--wj-accent);
}
.wj-social-link {
    color: #aaa;
    transition: color 0.2s;
}
.wj-social-link:hover {
    color: var(--wj-accent);
}
.wj-social-link svg {
    width: 20px;
    height: 20px;
}
.wj-footer .border-top {
    border-color: rgba(255,255,255,0.1) !important;
}
.wj-footer .text-muted {
    color: #aaa !important;
}
.wj-footer .text-muted a {
    color: #ccc !important;
}
.wj-footer .text-muted a:hover {
    color: var(--wj-accent) !important;
}

/* ---- JOB PHOTO ---- */
.wj-job-photo {
    height: 160px;
    overflow: hidden;
}
.wj-job-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.wj-job-card:hover .wj-job-photo img {
    transform: scale(1.05);
}

/* ---- PAGINATION ---- */
.page-item.active .page-link {
    background-color: var(--wj-primary);
    border-color: var(--wj-primary);
}
.page-link {
    color: var(--wj-primary);
}
.page-link:hover {
    color: var(--wj-primary-dark);
}

/* ---- BLOG FEATURED ---- */
.wj-blog-featured {
    border-radius: 12px;
}
.wj-blog-featured img {
    border-radius: 12px 0 0 12px;
}
@media (max-width: 767.98px) {
    .wj-blog-featured img {
        border-radius: 12px 12px 0 0;
    }
}

/* ---- CONTACT FORM ---- */
.wj-contact-form .form-control {
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wj-contact-form .form-control:focus {
    border-color: var(--wj-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--wj-primary-rgb), 0.15);
}

/* ---- ARTICLE CONTENT ---- */
.wj-article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #333;
}
.wj-article-content p {
    margin-bottom: 1.25rem;
}
.wj-article-content h2, .wj-article-content h3 {
    font-family: var(--wj-font-heading);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.wj-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}
.wj-article-content blockquote {
    border-left: 4px solid var(--wj-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--wj-bg-light);
    border-radius: 0 8px 8px 0;
}
.wj-article-content ul, .wj-article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

/* ---- SEO CONTENT ---- */
.seo-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}
.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--wj-primary-dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--wj-primary-light);
}
.seo-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--wj-text);
}
.seo-content p {
    margin-bottom: 1.25rem;
}
.seo-content ul, .seo-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}
.seo-content li {
    margin-bottom: 0.4rem;
}
.seo-content blockquote {
    border-left: 4px solid var(--wj-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--wj-bg-light);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}
.seo-content {
    overflow-x: hidden;
}
.seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.seo-content th, .seo-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e9ecef;
    text-align: left;
    font-size: 0.95rem;
}
.seo-content th {
    background: var(--wj-primary-light);
    font-weight: 600;
    color: var(--wj-primary-dark);
}
.seo-content .info-box {
    background: linear-gradient(135deg, var(--wj-primary-light), var(--wj-primary-light));
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.seo-content .info-box h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--wj-primary-dark);
}
.seo-content a {
    color: var(--wj-primary);
    font-weight: 500;
}
.seo-content a:hover {
    color: var(--wj-primary-dark);
}

/* ---- FORM ERRORS ---- */
.wj-contact-form .invalid-feedback,
.wj-contact-form ul li {
    color: #dc3545;
    font-size: 0.8rem;
}

.navbar-brand img {
    height: 60px;
    margin: -12px 0;
    display: block;
    float: left;
}

img.logo-footer {
    max-width: 80%;
    border-radius: 79px;
    width: 251px;
    margin-bottom: 15px;
    margin-top: -15px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991.98px) {
    .wj-hero {
        padding: 3rem 0;
    }
    .wj-hero h1 {
        font-size: 1.8rem;
    }
    .wj-search-form .row {
        gap: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    .wj-hero {
        padding: 2.5rem 0;
    }
    .wj-hero h1 {
        font-size: 1.5rem;
    }
    .wj-region-img {
        height: 120px;
    }
    .wj-stat-number {
        font-size: 1.8rem;
    }
    .wj-launch-banner {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 20px;
    }
    .wj-stat-recruiting-badge {
        font-size: 10px;
        padding: 4px 10px;
    }
    .wj-activity-card {
        padding: 16px;
    }
}

/* ====== Accessibilité (WCAG 2.1 AA) ====== */

/* Focus visible renforcé (contraste AAA) */
:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px;
    border-radius: 3px;
}
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(255, 191, 71, 0.25) !important;
}

/* Remonter le contraste du text-muted sur fond blanc (4.5:1 minimum) */
.text-muted {
    color: #606770 !important;
}
/* Préserver les muted sur fond sombre (hero) qui ont déjà du contraste */
.wj-company-hero .text-muted,
.bg-dark .text-muted,
.wj-footer .text-muted {
    color: #c8cfd7 !important;
}

/* Messages d'erreur : couleur conforme AAA */
.form-errors,
.form-errors ul li {
    color: #b00020 !important;
}

/* Skip link : rendu uniquement au focus */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background: var(--wj-primary-dark);
    color: #fff;
    border-radius: 6px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
}

/* Fix S4 : bloquer tout overflow horizontal sur mobile dashboard */
@media (max-width: 992px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    .utf-dashboard-container-aera,
    .utf-dashboard-content-container-aera,
    .utf-dashboard-content-inner-aera {
        max-width: 100vw;
        overflow-x: hidden;
    }
    .utf-dashboard-content-inner-aera .row {
        margin-left: 0;
        margin-right: 0;
    }
    .utf-dashboard-content-inner-aera img,
    .utf-dashboard-content-inner-aera table {
        max-width: 100%;
        height: auto;
    }
}

/* Fix S4 : filtres "Gérer mes offres" lisibles */
.job-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 15px 20px 5px;
}
.job-filter-btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid #d4d9d6;
    background: #fff;
    color: var(--wj-primary);
    text-decoration: none;
    transition: all 0.15s;
}
.job-filter-btn:hover {
    background: #e8f2ec;
    border-color: var(--wj-primary);
    color: var(--wj-primary-dark);
}
.job-filter-btn.active {
    background: var(--wj-primary);
    color: #fff;
    border-color: var(--wj-primary);
}

/* Fix S4 : Gérer mes offres mobile — empêcher le chevauchement */
@media (max-width: 767px) {
    .utf-dashboard-box-list .utf-job-listing {
        flex-direction: column;
        align-items: stretch;
    }
    .utf-dashboard-box-list .utf-job-listing-details {
        width: 100%;
    }
    .utf-dashboard-box-list .utf-job-listing-footer ul {
        flex-wrap: wrap;
        gap: 6px 14px;
    }
    .utf-dashboard-box-list .job-stats {
        display: flex;
        gap: 12px;
        padding: 8px 16px;
        border-top: 1px solid #eee;
        margin-top: 8px;
        flex-wrap: wrap;
    }
    .utf-dashboard-box-list .utf-job-listing .buttons-to-right,
    .utf-dashboard-box-list .utf-job-listing .utf-job-bt-btn {
        position: static;
        display: flex;
        gap: 8px;
        padding: 10px 16px;
        flex-wrap: wrap;
    }
}

/* Fix S4 : bouton "Voir en ligne" dashboard - texte blanc sur vert */
.btn-view-profile,
.btn-view-profile:hover,
.btn-view-profile:focus,
.btn-view-profile:visited {
    color: #fff !important;
    background: var(--wj-primary);
    padding: 7px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}
.btn-view-profile:hover {
    background: var(--wj-primary-dark);
}
.btn-view-profile i {
    color: #fff;
}

/* Fix S4 : footer — tagline lisible + logo centré mobile */
.wj-footer-tagline {
    color: #d0d8d3;
    font-size: 14px;
    line-height: 1.55;
    margin-top: 12px;
}
.wj-footer .logo-footer {
    max-width: 200px;
    height: auto;
}
@media (max-width: 767px) {
    .wj-footer .col-lg-4:first-child,
    .wj-footer .col-md-6:first-child {
        text-align: center;
    }
    .wj-footer .logo-footer {
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    .wj-footer .wj-footer-tagline {
        text-align: center;
    }
    .wj-footer .col-lg-4 .d-flex.gap-3 {
        justify-content: center;
    }
}

/* ==========================================================================
   DASHBOARD (Lot 3, étape A — fondation moderne BS5 + .wj-*)
   Scope : seulement les pages qui étendent templates/dashboard/base.html.twig
   Layout : sidebar fixe ≥lg, offcanvas Bootstrap <lg.
   ========================================================================== */

.wj-dash-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 70px); /* 70px = hauteur header global */
    background: var(--wj-bg-light);
}
@media (max-width: 991.98px) {
    .wj-dash-shell {
        grid-template-columns: 1fr;
    }
}

/* ---- Sidebar (desktop) ---- */
.wj-dash-sidebar {
    background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
    color: rgba(255, 255, 255, 0.85);
    padding: 1.25rem 0;
    position: sticky;
    top: 70px;
    align-self: start;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}
@media (max-width: 991.98px) {
    .wj-dash-sidebar { display: none; }
}

.wj-dash-sidebar__profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.75rem;
}
.wj-dash-sidebar__profile img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
}
.wj-dash-sidebar__name {
    font-weight: 600;
    color: #fff;
    font-size: 0.92rem;
    line-height: 1.2;
    margin: 0;
    word-break: break-word;
}
.wj-dash-sidebar__role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wj-dash-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}
.wj-dash-nav__link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.25rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.wj-dash-nav__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}
.wj-dash-nav__link.active {
    color: var(--wj-accent);
    background: rgba(var(--wj-primary-rgb), 0.18);
    border-left-color: var(--wj-accent);
}
.wj-dash-nav__link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.wj-dash-nav__badge {
    margin-left: auto;
    background: var(--wj-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    line-height: 1.3;
}

.wj-dash-nav__section {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.5rem;
}

/* ---- Topbar ---- */
.wj-dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border-bottom: 1px solid var(--wj-border);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 70px;
    z-index: 30;
}
.wj-dash-topbar__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0;
    color: var(--wj-text);
}
.wj-dash-topbar__menu-btn {
    display: none;
    background: var(--wj-primary);
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    margin-right: 0.5rem;
}
@media (max-width: 991.98px) {
    .wj-dash-topbar__menu-btn { display: inline-flex; align-items: center; }
}

/* ---- Main content ---- */
.wj-dash-main { min-width: 0; }
.wj-dash-content { padding: 1.5rem; }
@media (max-width: 575.98px) {
    .wj-dash-content { padding: 1rem; }
    .wj-dash-topbar { padding: 0.7rem 1rem; }
}

/* ---- Welcome / hero card ---- */
.wj-dash-welcome {
    background: linear-gradient(135deg, var(--wj-primary) 0%, var(--wj-primary-dark) 100%);
    color: #fff;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(var(--wj-primary-rgb), 0.18);
}
.wj-dash-welcome h2 { color: #fff; margin: 0 0 0.35rem; font-size: 1.5rem; font-weight: 600; }
.wj-dash-welcome p  { margin: 0; color: rgba(255, 255, 255, 0.85); }

/* ---- Stats cards ---- */
.wj-dash-stat {
    background: #fff;
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--wj-border);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    height: 100%;
}
.wj-dash-stat__icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(var(--wj-primary-rgb), 0.1);
    color: var(--wj-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wj-dash-stat__icon svg { width: 22px; height: 22px; }
.wj-dash-stat__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--wj-text);
    line-height: 1;
    font-family: var(--wj-font-heading);
}
.wj-dash-stat__label {
    font-size: 0.82rem;
    color: var(--wj-text-muted);
    margin-top: 0.2rem;
}

/* ---- Quick action card ---- */
.wj-dash-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid var(--wj-border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    color: var(--wj-text);
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    height: 100%;
}
.wj-dash-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--wj-primary-rgb), 0.1);
    border-color: var(--wj-primary);
    color: var(--wj-text);
    text-decoration: none;
}
.wj-dash-action__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(var(--wj-primary-rgb), 0.08);
    color: var(--wj-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wj-dash-action__icon svg { width: 20px; height: 20px; }
.wj-dash-action__label { font-weight: 600; font-size: 0.95rem; }
.wj-dash-action__sub   { font-size: 0.78rem; color: var(--wj-text-muted); }

/* ---- Section title ---- */
.wj-dash-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wj-text);
    margin: 1.5rem 0 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.wj-dash-section-title a {
    font-size: 0.85rem;
    color: var(--wj-primary);
    text-decoration: none;
    font-weight: 500;
}
.wj-dash-section-title a:hover { text-decoration: underline; }

/* ---- Recent activity list ---- */
.wj-dash-list { display: flex; flex-direction: column; gap: 0.65rem; }
.wj-dash-list__item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #fff;
    border: 1px solid var(--wj-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: var(--wj-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.wj-dash-list__item:hover {
    border-color: var(--wj-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--wj-text);
}
.wj-dash-list__main { flex: 1; min-width: 0; }
.wj-dash-list__title { font-weight: 600; font-size: 0.95rem; }
.wj-dash-list__meta {
    font-size: 0.8rem;
    color: var(--wj-text-muted);
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}
.wj-dash-list__meta svg { width: 13px; height: 13px; margin-right: 2px; vertical-align: -2px; }

.wj-dash-pill {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.4;
}
.wj-dash-pill--pending  { background: #fff4e0; color: #b07005; }
.wj-dash-pill--accepted { background: #d4f5dd; color: #1d6c33; }
.wj-dash-pill--rejected { background: #fde0e0; color: #98232f; }
.wj-dash-pill--cancelled{ background: #e7e7e7; color: #555; }

/* ---- Vendangeur theme overrides (sidebar) ---- */
body.theme-vendangeur .wj-dash-nav__link.active {
    color: #E9C46A;
}
body.theme-vendangeur .wj-dash-stat__icon,
body.theme-vendangeur .wj-dash-action__icon {
    background: rgba(45, 106, 79, 0.12);
    color: var(--wj-primary);
}

/* ---- Empty state ---- */
.wj-dash-empty {
    background: #fff;
    border: 1px dashed var(--wj-border);
    border-radius: 12px;
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: var(--wj-text-muted);
}
.wj-dash-empty svg { width: 36px; height: 36px; opacity: 0.5; margin-bottom: 0.5rem; }
