/**
 * offres.css
 * Styles dédiés aux offres d'emploi, alternance, stage
 * Couvre : formulaire dépôt, archive, single
 */

.archive-offres .offre-banner,
.single-offre .offre-banner {
    background: var(--color-primary-brown-dark);
    color: var(--color-white);
}

/* ============================================================
   PAGE DÉPÔT D'OFFRE — Formulaire
   ============================================================ */

.deposer-intro {
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-muted, #555);
    max-width: 720px;
}

/* Fieldset */
.offre-fieldset {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 24px 28px;
    margin-bottom: 2rem;
}

.offre-legend {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary-brown);
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Checkboxes */
.form-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 6px;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.form-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary-brown);
    cursor: pointer;
    flex-shrink: 0;
}

/* File input */
.form-input-file {
    display: block;
    width: 100%;
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--color-text);
    cursor: pointer;
}

/* Hint sous les champs */
.form-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted, #888);
    margin-top: 4px;
}

.form-hint--counter {
    text-align: right;
}

/* Bouton submit */
.form-submit-row {
    justify-content: flex-end;
}

/* Message réponse formulaire */
.offre-form-response {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.offre-form-response--success {
    background-color: var(--color-light-green);
    color: var(--color-green);
}

.offre-form-response--error {
    background-color: var(--color-light-red);
    color: var(--color-red);
}

/* ============================================================
   AUTOCOMPLETE ADRESSE
   ============================================================ */

.adresse-autocomplete-wrap {
    position: relative;
}

.adresse-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-top: none;
    border-radius: 0 0 4px 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 220px;
    overflow-y: auto;
}

.adresse-suggestion-item {
    padding: 10px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}

.adresse-suggestion-item:last-child {
    border-bottom: none;
}

.adresse-suggestion-item:hover,
.adresse-suggestion-item.is-active {
    background-color: var(--color-light-brown, #f5ede3);
    color: var(--color-primary-brown);
}

/* ============================================================
   ARCHIVE OFFRES — Liste horizontale
   ============================================================ */

.offres-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Card offre horizontale */
.offre-card {
    background: var(--bg-soft-gradient, #fff);
    border-radius: 8px;
    box-shadow: var(--soft-box-shadow, 0 2px 8px rgba(0, 0, 0, 0.07));
    overflow: hidden;
    display: flex;
    align-items: stretch;
    transition: box-shadow 0.3s ease, border-left 0.3s ease, transform 0.3s ease;
    position: relative;
    min-height: 130px;
    border-left: 4px solid transparent;
    text-decoration: none;
    color: inherit;
}

a.offre-card::after {
    display: none;
}

.offre-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--color-primary-brown-dark);
    transform: translateX(4px);
}

/* Logo à gauche */
.card-logo {
    width: 120px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light, #f9f9f7);
    border-right: 1px solid var(--color-border);
    padding: 16px;
    flex-shrink: 0;
}

.card-logo img {
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
}

.logo-placeholder-small {
    font-size: 2rem;
    color: var(--color-border);
}

/* Contenu principal */
.card-content {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* Ligne 1 : titre + date */
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.card-title a {
    color: var(--color-primary-brown-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.card-title a:hover {
    color: var(--color-primary-brown);
}

.card-date {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    padding-top: 3px;
}

/* Ligne 2 : entreprise + localisation */
.card-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.card-company,
.card-location {
    font-size: 0.85rem;
    color: var(--color-text-muted, #666);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-company i,
.card-location i {
    color: var(--color-primary-brown-dark);
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Ligne 3 : tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
}

.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tag-type {
    background-color: var(--color-primary-brown-dark);
    color: var(--color-white, #fff);
}

.tag-niveau {
    background-color: var(--color-light-brown, #f5ede3);
    color: var(--color-primary-brown-dark);
    border: 1px solid rgba(113, 66, 26, 0.2);
}

.tag-more {
    background-color: var(--color-bg-light, #eee);
    color: var(--color-text-muted);
}

/* Ligne 4 : excerpt */
.card-excerpt {
    font-size: 0.83rem;
    color: var(--color-text-muted, #666);
    line-height: 1.5;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Flèche à droite */
/* .card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    color: var(--color-primary-brown-dark);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.offre-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(4px);
} */

.no-post {
    text-align: center;
    color: var(--color-text-muted);
    padding: 3rem 0;
}

/* ============================================================
   SINGLE OFFRE
   ============================================================ */

.offre-intro {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: start;
}

.offre-text h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.offre-adresse,
.offre-email,
.offre-telephone,
.offre-website {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.offre-meta {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
}

.offre-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.logo-wrapper {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 12px;
    background: #fff;
}

.logo-wrapper img {
    max-width: 160px;
    max-height: 100px;
    object-fit: contain;
}

.logo-placeholder {
    width: 160px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--color-border);
    border: 1px dashed var(--color-border);
    border-radius: 6px;
}

.offre-date-badge {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background: var(--color-bg-light, #f9f9f7);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 4px 12px;
    text-align: center;
}

.offre-description {
    margin-bottom: 2rem;
}

.offre-description h3,
.offre-cta h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary-brown-dark);
}

.description-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text);
}

.offre-pdf-download {
    margin-top: 1.5rem;
}

.offre-cta {
    background: var(--color-bg-light, #f9f9f7);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 24px;
    text-align: center;
}

.offre-cta p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .offre-card {
        flex-direction: column;
        min-height: auto;
        border-left: 4px solid transparent;
        border-top: 4px solid transparent;
    }

    .offre-card:hover {
        transform: translateY(-2px) translateX(0);
        border-left: 4px solid transparent;
        border-top: 4px solid var(--color-primary-brown-dark);
    }

    .card-logo {
        width: 100%;
        min-width: unset;
        height: 80px;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .card-arrow {
        display: none;
    }

    .offre-intro {
        grid-template-columns: 1fr;
    }

    .offre-logo {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .offre-fieldset {
        padding: 16px;
    }

    .card-header {
        flex-direction: column;
        gap: 4px;
    }

    .card-meta {
        gap: 0.75rem;
    }
}

/* Custom Pagination */
.archive-offres .archive-pagination .page-numbers.current,
.archive-offres .archive-pagination .page-numbers:hover {
    color: var(--color-primary-brown) !important;
}