/* Styles partages par les pages du site (accueil, offres, statistiques).
   Langage visuel des sites d'IA actuels : fond clair et aere, filets fins,
   grands arrondis, typographie Geist, boutons en pilule (noir = action
   principale). Le vert est reserve a la hausse (offres nouvelles). */
[hidden] { display: none !important; }
:root {
  --papier: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F4F4F5;
  --encre: #18181B;
  --gris: #63636E;
  --gris-clair: #A1A1AA;
  --trait: #E7E7EA;
  --trait-fort: #D4D4D8;
  --indice: #0060FD;   /* bleu du logo */
  --noir: #000000;
  --hausse: #12805C;
  --retrait: #B03A2E;
  /* Teintes des graphiques : validees (bande de luminosite, CVD, contraste)
     avec le script de la skill dataviz ; le texte garde l'encre */
  --serie: #2E56B8;
  --serie-nouv: #157A50;
  /* Rampe sequentielle en 5 classes (carte, carte de chaleur), validee en ordinal */
  --seq-1: #86b6ef; --seq-2: #3987e5; --seq-3: #256abf; --seq-4: #184f95; --seq-5: #0d366b;
  --sans-donnee: #EEEEF0;
  /* Palette categorielle (types de contrat), ordre fixe, validee en adjacent */
  --cat-1: #2a78d6; --cat-2: #eb6834; --cat-3: #1baf7a; --cat-4: #eda100; --cat-5: #e87ba4;
  --cat-neutre: #B8C1CE;
  --rayon: 12px;
  --rayon-carte: 20px;
  --ombre: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.05);
  --ombre-forte: 0 2px 4px rgb(0 0 0 / 0.04), 0 18px 48px rgb(0 0 0 / 0.08);
  --police: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* Theme sombre : reglage du systeme, sauf choix explicite "clair" de la page
   hote (data-theme), et choix explicite "sombre" meme sur un systeme clair */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --papier: #111113; --surface: #18181B; --surface-2: #1F1F23;
    --encre: #F4F4F5; --gris: #A1A1AA; --gris-clair: #71717A; --trait: #27272A; --trait-fort: #3F3F46;
    --indice: #6FA4FF; --noir: #FFFFFF; --hausse: #4CC48C; --retrait: #F08A7E;
    --serie: #5B86E5; --serie-nouv: #2FA874;
    /* En sombre la rampe s'inverse : peu = proche du fond, beaucoup = clair */
    --seq-1: #256abf; --seq-2: #3987e5; --seq-3: #6da7ec; --seq-4: #9ec5f4; --seq-5: #cde2fb;
    --sans-donnee: #26262B;
    --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181;
    --cat-neutre: #4A5668;
    --ombre: 0 1px 2px rgb(0 0 0 / 0.3); --ombre-forte: 0 18px 48px rgb(0 0 0 / 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --papier: #111113; --surface: #18181B; --surface-2: #1F1F23;
  --encre: #F4F4F5; --gris: #A1A1AA; --gris-clair: #71717A; --trait: #27272A; --trait-fort: #3F3F46;
  --indice: #6FA4FF; --noir: #FFFFFF; --hausse: #4CC48C; --retrait: #F08A7E;
  --serie: #5B86E5; --serie-nouv: #2FA874;
  --seq-1: #256abf; --seq-2: #3987e5; --seq-3: #6da7ec; --seq-4: #9ec5f4; --seq-5: #cde2fb;
  --sans-donnee: #26262B;
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181;
  --cat-neutre: #4A5668;
  --ombre: 0 1px 2px rgb(0 0 0 / 0.3); --ombre-forte: 0 18px 48px rgb(0 0 0 / 0.45);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1rem/1.55 var(--police);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--indice); }
:focus-visible { outline: 2px solid var(--indice); outline-offset: 2px; }
.page { max-width: 76rem; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 2rem) 5rem; }

/* --- Navigation (toutes les pages) -------------------------------------------- */
.nav-site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--papier) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--trait);
}
.nav-dedans { display: flex; align-items: center; gap: 2rem; max-width: 76rem; height: 4rem; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.marque { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--encre); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; }
.marque svg, .logo-marque { width: 2rem; height: 2rem; flex: none; }
.nav-liens { display: flex; gap: 0.25rem; margin-right: auto; }
.nav-liens a { padding: 0.4rem 0.8rem; border-radius: 999px; color: var(--gris); font-size: 0.95rem; text-decoration: none; }
.nav-liens a:hover { color: var(--encre); background: var(--surface-2); }
.nav-liens a[aria-current="page"] { color: var(--encre); background: var(--surface-2); font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.langue .court { display: none; }
@media (max-width: 760px) { .langue .court { display: inline; } }

/* Boutons en pilule */
.bouton, .langue {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 2.4rem; padding: 0 1.1rem; border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: 0.95rem; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.bouton-noir { background: var(--noir); color: var(--papier); }
.bouton-noir:hover { opacity: 0.86; }
.bouton-gris, .langue { background: var(--surface-2); color: var(--encre); }
.bouton-gris:hover, .langue:hover { background: var(--trait); }
.bouton-contour { border-color: var(--trait-fort); background: var(--surface); color: var(--encre); }
.bouton-contour:hover { border-color: var(--gris-clair); }

/* Titre de page (offres, statistiques) */
.page-titre { padding: clamp(1.5rem, 4vw, 3rem) 0 0.5rem; }
.page-titre h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.page-titre p { margin: 0.75rem 0 0; max-width: 68ch; color: var(--gris); font-size: 1.05rem; }
.page-titre strong { color: var(--encre); font-weight: 600; }
.hausse { color: var(--hausse); }
/* Candidature sans compte (web/commun.js, sansCompte) */
.sans-compte {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.1rem 0.5rem; border-radius: 999px;
  background: color-mix(in srgb, var(--hausse) 12%, var(--surface));
  color: var(--hausse); font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
}
.sans-compte svg { fill: currentColor; flex: none; }

/* Bande de cotations : entreprises qui publient le plus cette semaine */
.cotes {
  overflow: hidden; white-space: nowrap; font-size: 0.9rem;
  border: 1px solid var(--trait); border-radius: 999px; background: var(--surface);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.cotes-piste { display: inline-flex; padding: 0.65rem 0; }
.cotes a { display: inline-flex; gap: 0.45rem; padding: 0 1.25rem; color: var(--encre); text-decoration: none; border-right: 1px solid var(--trait); }
.cotes a:hover .cote-nom { text-decoration: underline; }
.cote-nom { font-weight: 600; }
.cote-hausse { color: var(--hausse); font-weight: 600; }
.cote-total { color: var(--gris); }
@media (prefers-reduced-motion: no-preference) {
  .cotes-piste { animation: defile var(--duree, 90s) linear infinite; }
  .cotes:hover .cotes-piste, .cotes:focus-within .cotes-piste { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) { .cotes { overflow-x: auto; } }
@keyframes defile { to { transform: translateX(-50%); } }

/* Pied de page */
.pied-site { max-width: 76rem; margin: 0 auto; padding: 2rem clamp(1rem, 3vw, 2rem) 3rem; color: var(--gris); font-size: 0.9rem; border-top: 1px solid var(--trait); }

/* Carte de contenu */
.carte-bloc { padding: clamp(1.1rem, 2.5vw, 1.75rem); border: 1px solid var(--trait); border-radius: var(--rayon-carte); background: var(--surface); box-shadow: var(--ombre); }

/* Monogramme d'entreprise : initiales colorees sur la meme teinte adoucie */
.mono {
  display: inline-grid; place-items: center; flex: none;
  width: 2.5rem; height: 2.5rem; border-radius: 10px;
  background: color-mix(in srgb, var(--teinte) 13%, var(--surface));
  color: var(--teinte);
  font-size: 0.82rem; font-weight: 650; letter-spacing: 0.01em;
  position: relative; overflow: hidden;
}
/* Logo par-dessus les initiales (retire s'il n'existe pas) : pas de cadre ni de
   fond blanc, le logo occupe le carre arrondi ; en theme clair, le blanc
   incruste dans certaines icones se fond dans le fond (multiply) */
.mono img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.mono.avec-logo { background: var(--surface-2); color: transparent; }
.mono.avec-logo img { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mono.avec-logo img { mix-blend-mode: normal; } }
:root[data-theme="dark"] .mono.avec-logo img { mix-blend-mode: normal; }

/* --- Champs et filtres ------------------------------------------------------------ */
.barre { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem 1rem; }
.page > .barre { margin: 1.5rem 0 0; padding: 1.1rem 1.25rem; border: 1px solid var(--trait); border-radius: var(--rayon-carte); background: var(--surface); box-shadow: var(--ombre); }
.champ { display: grid; gap: 0.3rem; font-size: 0.82rem; color: var(--gris); }
.champ-recherche { flex: 1 1 18rem; }
input[type="search"], input[type="text"], select {
  height: 2.6rem;
  padding: 0 0.85rem;
  border: 1px solid var(--trait-fort);
  border-radius: var(--rayon);
  background: var(--surface);
  color: var(--encre);
  font: inherit;
  font-size: 0.95rem;
}
input[type="search"]:focus, input[type="text"]:focus, select:focus { outline: none; border-color: var(--encre); box-shadow: 0 0 0 3px color-mix(in srgb, var(--encre) 10%, transparent); }
input[type="search"] { width: 100%; }
select { max-width: 14rem; }
.bascule { display: flex; align-items: center; gap: 0.5rem; height: 2.6rem; font-size: 0.95rem; color: var(--encre); cursor: pointer; }
.bascule input { width: 1.1rem; height: 1.1rem; accent-color: var(--encre); }
.effacer { height: 2.6rem; padding: 0 0.9rem; border: 0; border-radius: 999px; background: none; color: var(--gris); font: inherit; font-size: 0.95rem; cursor: pointer; }
.effacer:hover { color: var(--encre); background: var(--surface-2); }

.erreur { padding: 3rem 0; max-width: 56ch; }
code { font-size: 0.95em; }

@media (max-width: 760px) {
  /* Une seule ligne : liens compacts, defilement horizontal s'ils ne tiennent pas */
  .nav-dedans { gap: 0.5rem; height: 3.5rem; }
  .nav-liens { min-width: 0; overflow-x: auto; scrollbar-width: none; gap: 0; margin-right: 0; flex: 1 1 auto; }
  .nav-liens::-webkit-scrollbar { display: none; }
  .nav-liens a { flex: none; padding: 0.35rem 0.42rem; font-size: 0.84rem; white-space: nowrap; }
  .marque { flex: none; }
  .marque svg, .logo-marque { width: 1.7rem; height: 1.7rem; }
  .nav-actions { margin-left: auto; }
  .langue { height: 2rem; padding: 0 0.6rem; }
  .nav-actions .bouton-noir { display: none; }
  .langue .long { display: none; }
  .barre { align-items: stretch; }
  .champ { flex: 1 1 calc(50% - 0.5rem); min-width: 0; }
  .champ-recherche { flex-basis: 100%; }
  select { width: 100%; max-width: none; min-width: 0; }
}
@media (max-width: 420px) {
  .nav-liens .nav-secondaire:not([aria-current]) { display: none; }   /* 5 onglets : Entreprises reste accessible depuis Offres */
  .marque span { display: none; }
}
/* Tres petits ecrans (360 px) : les quatre liens tiennent encore sur une ligne */
@media (max-width: 380px) {
  .nav-dedans { gap: 0.3rem; padding: 0 0.75rem; }
  .nav-liens a { padding: 0.35rem 0.32rem; font-size: 0.8rem; }
  .langue { padding: 0 0.5rem; }
}

/* Bloc « M'alerter chaque matin » (pages Offres et Mon match) */
.alerte-bloc { margin: 0.5rem 0 1rem; }
.alerte-ouvrir { height: 2.3rem; padding: 0 1rem; border: 1px solid var(--trait-fort); border-radius: 999px; background: var(--surface);
  color: var(--encre); font: inherit; font-size: 0.9rem; cursor: pointer; }
.alerte-ouvrir:hover { border-color: var(--encre); }
.alerte-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.6rem; }
.alerte-form input { flex: 1 1 15rem; min-width: 0; height: 2.6rem; padding: 0 1rem; border: 1px solid var(--trait-fort); border-radius: 999px;
  background: var(--surface); color: var(--encre); font: inherit; }
.alerte-note { flex-basis: 100%; margin: 0; color: var(--gris); font-size: 0.82rem; }
.alerte-message { margin: 0.5rem 0 0; font-size: 0.92rem; }

/* Texte reserve aux lecteurs d'ecran (libelle d'un champ deja explicite) */
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Blocs de chargement : la forme du contenu en attendant les donnees */
.squelette {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in srgb, var(--surface-2) 40%, var(--surface)) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) { .squelette { animation: lueur 1.3s ease-in-out infinite; } }
@keyframes lueur { from { background-position: 100% 0; } to { background-position: -100% 0; } }
