/* =========================================================
   Alljobs.fr — feuille de style commune
   (accueil, recherche… — à charger via /style/alljobs.css)
   ========================================================= */

:root {
    --purple: #b50eaf;
    --purple-dark: #8a0a85;
    --green: #99de00;
    --teal: #54c2c2;
    --ink: #1f1f24;
    --ink-soft: #5b5b66;
    --line: #e7e7ee;
    --bg: #f6f6fa;
    --surface: #ffffff;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 8px 24px rgba(20, 20, 40, .08);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

h1, h2 { line-height: 1.2; margin: 0; }

.container {
    width: min(1180px, 100% - 32px);
    margin-inline: auto;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -48px; z-index: 100;
    background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
    text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.muted { color: var(--ink-soft); margin: 6px 0 0; }

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 12px 22px; border-radius: 12px;
    font: 600 1rem/1 var(--font); text-decoration: none;
    border: 0; cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--purple); color: #fff;
    box-shadow: 0 6px 16px rgba(181, 14, 175, .35);
}
.btn--primary:hover { background: var(--purple-dark); }

.btn--ghost {
    background: var(--surface); color: var(--ink);
    border: 1.5px solid var(--line);
}
.btn--ghost:hover { border-color: var(--purple); color: var(--purple); }

.btn--small { padding: 9px 16px; font-size: .9rem; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 72px; gap: 16px;
}
.logo img { width: 160px; height: auto; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 72px 0 88px;
    text-align: center;
    color: #fff;
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(153, 222, 0, .35), transparent 60%),
        radial-gradient(900px 400px at 0% 110%, rgba(84, 194, 194, .45), transparent 60%),
        linear-gradient(135deg, #2b2b33 0%, #3e3e3e 45%, #5a1457 100%);
    overflow: hidden;
}
.hero--compact { padding: 32px 0 76px; }

.hero__badge {
    display: inline-block; margin: 0 0 20px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: .9rem;
}
.hero__badge strong { color: var(--green); }

.hero__title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.hero__subtitle {
    margin: 14px auto 36px; max-width: 620px;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    color: rgba(255, 255, 255, .8);
}

/* ---------- Formulaire de recherche ---------- */
.search {
    display: grid;
    grid-template-columns: 1.4fr 1fr auto;
    gap: 8px;
    max-width: 860px; margin-inline: auto;
    padding: 8px;
    background: var(--surface);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}

.search__field {
    position: relative; display: flex; align-items: center;
}
.search__field + .search__field { border-left: 1px solid var(--line); }

.search__field svg {
    position: absolute; left: 14px; width: 20px; height: 20px;
    fill: var(--ink-soft); pointer-events: none;
}

.search input,
.search select {
    width: 100%; height: 52px;
    padding: 0 14px 0 44px;
    border: 0; border-radius: 12px;
    background: transparent;
    font: 500 1rem var(--font); color: var(--ink);
    appearance: none;
}
.search input::placeholder { color: #9a9aa6; }
.search input:focus,
.search select:focus { outline: none; background: var(--bg); }

.search select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235b5b66'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.search .btn { height: 52px; padding-inline: 28px; }

.hero__tags {
    list-style: none; margin: 24px 0 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.hero__tags a {
    display: inline-block; padding: 6px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #fff; text-decoration: none; font-size: .9rem;
    transition: background .2s;
}
.hero__tags a:hover { background: rgba(255, 255, 255, .22); }

/* ---------- Contenu principal ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 24px;
    margin-top: -40px;
    position: relative;
    padding-bottom: 64px;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px;
}
.card h2 { font-size: 1.4rem; font-weight: 700; }

.carte {
    margin-top: 20px;
    display: flex; justify-content: center;
    min-height: 420px;
}
.carte svg { max-width: 100%; height: auto; }

/* ---------- Encarts ---------- */
.cta-list { display: flex; flex-direction: column; gap: 16px; }

.cta {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    padding: 24px 56px 24px 24px;
    border-radius: var(--radius);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .2s, box-shadow .2s;
}
.cta:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20, 20, 40, .15); }

.cta__eyebrow {
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; opacity: .8;
}
.cta__title { font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.cta__arrow {
    position: absolute; right: 22px; top: 50%; translate: 0 -50%;
    font-size: 1.4rem; transition: translate .2s;
}
.cta:hover .cta__arrow { translate: 4px -50%; }

.cta--purple { background: var(--purple); color: #fff; }
.cta--green  { background: var(--green);  color: var(--ink); }
.cta--teal   { background: var(--teal);   color: var(--ink); }

/* =========================================================
   Page de résultats
   ========================================================= */

.layout--results {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
}

.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- En-tête des résultats ---------- */
.results__head h1 {
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -.01em;
}
.results__query {
    display: block; margin-bottom: 8px;
    font-size: .8rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--purple);
}
.results__count { color: var(--purple); font-weight: 800; }

/* ---------- Filtres contrat ---------- */
.filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin-top: 20px; padding-top: 20px;
    border-top: 1px solid var(--line);
}
.filters__label {
    margin-right: 4px;
    font-size: .85rem; font-weight: 600; color: var(--ink-soft);
}

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--ink);
    font-size: .9rem; font-weight: 500;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}
.chip::before {                       /* pastille de couleur du contrat */
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--chip, var(--ink-soft));
}
.chip:hover { border-color: var(--chip, var(--purple)); }
.chip--on {
    border-color: var(--chip, var(--purple));
    background: color-mix(in srgb, var(--chip, var(--purple)) 14%, white);
    font-weight: 600;
}
.chip--on::before {                   /* coche quand le filtre est actif */
    content: "✓"; width: auto; height: auto; background: none;
    color: var(--chip, var(--purple)); font-weight: 800; line-height: 1;
}

.refine-inline {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    margin-top: 14px;
    font-size: .9rem;
}
.refine-inline a {
    padding: 4px 10px; border-radius: 8px;
    background: var(--bg); text-decoration: none;
    transition: background .2s, color .2s;
}
.refine-inline a:hover { background: var(--line); }
.refine-inline a[aria-current] { background: var(--purple); color: #fff; font-weight: 600; }

/* ---------- Alerte email ---------- */
.alert-box {
    padding: 24px 28px;
    border-radius: var(--radius);
    background:
        radial-gradient(500px 200px at 100% 0%, rgba(153, 222, 0, .25), transparent 70%),
        linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    box-shadow: var(--shadow);
}
.alert-box h2 { font-size: 1.25rem; font-weight: 800; }
.alert-box > p { margin: 4px 0 16px; opacity: .85; }

.alert-box__form { display: flex; gap: 8px; }
.alert-box__form input {
    flex: 1; min-width: 0; height: 48px;
    padding: 0 16px;
    border: 0; border-radius: 12px;
    font: 500 1rem var(--font); color: var(--ink);
}
.alert-box__form .btn { height: 48px; background: var(--ink); color: #fff; }
.alert-box__form .btn:hover { background: #000; }

.alert-box > .alert-box__note { margin: 10px 0 0; font-size: .85rem; opacity: .8; }
.alert-box > .alert-box__note--ok,
.alert-box > .alert-box__note--erreur {
    opacity: 1; font-weight: 600;
    padding: 8px 12px; border-radius: 10px;
    background: rgba(255, 255, 255, .15);
}
.alert-box > .alert-box__note--erreur { background: rgba(0, 0, 0, .25); }

/* ---------- Offres ---------- */
.section-label {
    margin: 8px 0 -4px;
    font-size: .75rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--ink-soft);
}

.offer {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color .2s, transform .2s;
}
.offer:hover { border-color: var(--line); transform: translateY(-2px); }
.offer--sponso {
    border-color: color-mix(in srgb, var(--purple) 35%, transparent);
    background: linear-gradient(180deg, color-mix(in srgb, var(--purple) 5%, white), var(--surface) 60%);
}

.offer__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
    font-size: .9rem; color: var(--ink-soft);
}
.offer__company { font-weight: 600; color: var(--ink); }
.offer__place::before { content: "·"; margin-right: 10px; color: #b5b5c0; }
.offer__company:first-child + .offer__place::before,
.offer__place:first-child::before { content: none; margin: 0; }

.badge {
    display: inline-block; padding: 2px 10px;
    border-radius: 999px;
    background: var(--badge, var(--ink-soft)); color: #fff;
    font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}

.offer__title { margin-top: 10px; font-size: 1.15rem; font-weight: 700; }
.offer__title a { text-decoration: none; }
.offer__title a:hover { color: var(--purple); }

.offer__desc { margin: 8px 0 0; font-size: .95rem; color: var(--ink-soft); }
.offer__date { margin: 10px 0 0; font-size: .8rem; color: #8a8a96; }

.empty { text-align: center; }
.empty .btn { margin-top: 8px; }

/* ---------- Pagination ---------- */
.pagination {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
    gap: 16px; margin-top: 8px;
}
.pagination__info { font-weight: 600; color: var(--ink-soft); }

/* ---------- Colonne latérale ---------- */
.refine-card { padding: 22px; }
.refine-card h2 {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    font-size: 1rem; font-weight: 700;
}
.refine-card .refine-list + h2 { margin-top: 20px; }

.refine-list {
    list-style: none; margin: 8px 0 0; padding: 0;
    max-height: 420px; overflow-y: auto;
}
.refine-list a {
    display: block; padding: 6px 10px;
    border-radius: 8px;
    font-size: .95rem; text-decoration: none;
    transition: background .2s;
}
.refine-list a:hover { background: var(--bg); color: var(--purple); }
.refine-list a[aria-current] { background: var(--purple); color: #fff; font-weight: 600; }

/* ---------- Publicités ---------- */
.ad-slot { text-align: center; min-width: 0; }
.ad-slot--aside { padding: 12px; }
.alljobs-var { width: 100%; max-width: 336px; height: 280px; }

/* ---------- Footer ---------- */
.site-footer {
    background: #2b2b33; color: rgba(255, 255, 255, .75);
    font-size: .9rem;
}
.site-footer__inner {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 12px;
    padding-block: 28px;
}
.site-footer ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; gap: 8px 24px;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .layout,
    .layout--results { grid-template-columns: 1fr; }
    .carte { min-height: 0; }
    .refine-list { max-height: none; columns: 2; column-gap: 8px; }
    .refine-list li { break-inside: avoid; }
}

@media (max-width: 680px) {
    .hero { padding: 48px 0 72px; }
    .hero--compact { padding: 20px 0 64px; }
    .search { grid-template-columns: 1fr; }
    .search__field + .search__field { border-left: 0; border-top: 1px solid var(--line); }
    .search .btn { width: 100%; }
    .logo img { width: 130px; }
    .site-header .btn--ghost { padding: 10px 14px; font-size: .9rem; }
    .card, .offer, .alert-box { padding: 20px; }
    .alert-box__form { flex-direction: column; }
    .alert-box__form input { flex: none; width: 100%; }
    .alljobs-var { height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}