/* --- VARIABLES & BASE --- */
:root {
    --gold: #d4af37;
    --navy: #0a1931;
    --bg-light: #f4f7fa;
    --white: #ffffff;
    --text: #2d3436;
    --text-muted: #636e72;
    --radius: 15px;
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    --transition: all 0.3s ease;
}

body { 
    font-family: 'Poppins', sans-serif; 
    background: var(--bg-light); 
    margin: 0; 
    color: var(--text); 
    line-height: 1.6;
}

.containerr { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- HERO & SEARCH --- */
.job-hero {
    background: linear-gradient(rgba(10,25,49,0.85), rgba(10,25,49,0.85)), url('../img/emploi.webp');
    background-size: cover; 
    background-position: center;
    padding: 80px 0 120px; 
    text-align: center; 
    color: white;
}
.job-hero h1 { font-size: 3rem; font-weight: 800; margin-bottom: 10px; }

.search-box {
    background: var(--white); 
    padding: 10px; 
    border-radius: 20px;
    display: flex; 
    max-width: 900px; 
    margin: 40px auto 0;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.input-wrap { flex: 1; display: flex; align-items: center; padding: 0 20px; border-right: 1px solid #eee; }
.input-wrap:last-of-type { border-right: none; }
.input-wrap i { color: var(--gold); margin-right: 15px; }
.input-wrap input { border: none; outline: none; width: 100%; padding: 15px 0; font-size: 1rem; background: transparent; }

.btn-search { 
    background: var(--navy); 
    color: white; 
    border: none; 
    padding: 0 35px; 
    border-radius: 15px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: var(--transition); 
}
.btn-search:hover { background: var(--gold); transform: translateY(-2px); }

/* --- PORTAL LAYOUT --- */
.job-portal { margin-top: -50px; padding-bottom: 80px; }
.portal-grid { display: grid; grid-template-columns: 280px 1fr; gap: 30px; }

/* Sidebar Filtres */
.job-filters { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 25px; 
    height: fit-content; 
    box-shadow: var(--shadow); 
}
.filter-group { margin-bottom: 30px; }
.filter-group h3 { 
    font-size: 1.1rem; 
    color: var(--navy); 
    margin-bottom: 15px; 
    border-bottom: 2px solid var(--gold); 
    display: inline-block; 
}
.filter-group label { 
    display: block; 
    margin-bottom: 12px; 
    font-size: 0.95rem; 
    cursor: pointer; 
    color: var(--text-muted); 
    transition: var(--transition);
}
.filter-group label:hover { color: var(--gold); }

/* Job Feed Header */
.feed-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 25px; 
    padding: 0 5px; 
}
.feed-header span { font-size: 0.95rem; color: var(--text-muted); }
.feed-header span strong { color: var(--navy); font-weight: 800; }

/* Select Personnalisé */
.custom-select { position: relative; min-width: 180px; }
.custom-select select {
    width: 100%; padding: 12px 40px 12px 20px;
    font-family: 'Poppins', sans-serif; font-size: 0.9rem; font-weight: 600;
    color: var(--navy); background-color: var(--white);
    border: 2px solid #e2e8f0; border-radius: 12px;
    cursor: pointer; appearance: none; -webkit-appearance: none;
    transition: var(--transition);
}
.custom-select select:hover, .custom-select select:focus { border-color: var(--gold); outline: none; }
.custom-select i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--gold); pointer-events: none; }

/* --- STYLE DU DÉCOMPTE (COUNTDOWN-BOX) --- */
.job-countdown {
    margin-top: 15px;
    padding: 10px 15px;
    background: rgba(212, 175, 55, 0.1); /* Fond gold très léger */
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: var(--transition);
}

.job-countdown i {
    color: var(--gold);
    font-size: 0.9rem;
    animation: pulse-timer 2s infinite;
}

.job-countdown .timer {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gold);
    letter-spacing: 0.5px;
}

/* Animation discrète pour l'icône sablier */
@keyframes pulse-timer {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* État quand l'offre est expirée (géré par JS) */
.job-countdown.expired {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.2);
}

.job-countdown.expired .timer, 
.job-countdown.expired i {
    color: #e74c3c;
}

/* --- ADAPTATION MOBILE --- */
@media (max-width: 768px) {
    .job-countdown {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
}

/* --- MODE SOMBRE --- */
.dark-theme .job-countdown {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.1);
}

/* --- JOB CARDS --- */
.job-card-premium {
    background: var(--white); padding: 25px; border-radius: 25px;
    display: grid; grid-template-columns: 80px 1fr 150px; gap: 25px;
    align-items: center; margin-bottom: 20px; transition: var(--transition);
    box-shadow: var(--shadow); border: 1px solid transparent;
}
.job-card-premium:hover { transform: translateY(-5px); border-color: var(--gold); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

.featured-job { border-left: 5px solid var(--gold); background: #fffdf5; }
.badge-partner { background: var(--gold); color: var(--navy); font-size: 0.65rem; padding: 3px 8px; border-radius: 5px; margin-left: 10px; font-weight: 700; }

.job-logo img { width: 80px; height: 80px; border-radius: 15px; object-fit: cover; background: #f8f9fa; }
.company-name { font-size: 0.85rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; }
.job-main-info h3 { margin: 5px 0 10px; font-size: 1.3rem; color: var(--navy); font-weight: 700; }

.job-tags { display: flex; gap: 15px; color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap; }
.job-tags span { display: flex; align-items: center; gap: 6px; }
.job-tags i { color: var(--gold); }

.btn-view {
    display: block; text-align: center; background: #f0f2f5; color: var(--navy);
    text-decoration: none; padding: 12px; border-radius: 12px; font-weight: 700; transition: var(--transition);
}
.btn-view:hover { background: var(--navy); color: white; }

/* --- RESPONSIVITÉ (MOBILE & TABLETTE) --- */

@media (max-width: 1024px) {
    .portal-grid { grid-template-columns: 1fr; }
    .job-filters { order: 2; } /* Filtres passent après le flux */
    .job-feed { order: 1; }
}

@media (max-width: 768px) {
    .job-hero h1 { font-size: 2rem; }
    .search-box { flex-direction: column; background: transparent; box-shadow: none; gap: 10px; margin-top: 25px;}
    .input-wrap { background: white; border-radius: 15px; border-right: none; margin-bottom: 5px; padding: 10px 20px; }
    .btn-search { padding: 15px; width: 100%; }
    
    .job-card-premium { 
        grid-template-columns: 1fr; 
        text-align: center; 
        padding: 30px 20px;
    }
    .job-logo { margin: 0 auto; }
    .job-tags { justify-content: center; }
    .feed-header { flex-direction: column; gap: 15px; text-align: center; }
}

/* --- DARK MODE --- */
.dark-theme { --bg-light: #050a14; --white: #0d1626; --text: #e1e8f0; --navy: #ffffff; }
.dark-theme .featured-job { background: rgba(212, 175, 55, 0.05); }
.dark-theme .input-wrap { border-color: #1f2d44; }
.dark-theme .input-wrap input { color: white; }
.dark-theme .btn-view { background: #1a2639; color: white; }
.dark-theme .custom-select select { background-color: #16213e; border-color: #1f2d44; color: white; }
.dark-theme .job-filters { border: 1px solid #1f2d44; }

/* --- ÉTATS VIDES --- */
.no-results {
    text-align: center; padding: 60px 20px; border-radius: 20px;
    background: rgba(255, 255, 255, 0.05); border: 2px dashed rgba(255, 255, 255, 0.2);
    color: var(--text-muted); width: 100%;
}
.no-results i { font-size: 3.5rem; margin-bottom: 15px; opacity: 0.5; color: var(--gold); }