/* ==========================================================================
   Arkane Cloud — Custom CSS pour le job board Ashby
   https://jobs.ashbyhq.com/Arkane-Cloud
   --------------------------------------------------------------------------
   Charte reprise d'arkanecloud.com :
   - Police : Fira Sans (secours : Trebuchet MS)
   - Titres / texte fort : #0A0A0A
   - CTA : #181D27 (texte blanc #FFFFFF)
   - Mot clé titre / liens / focus : #7A5AF8
   - Icônes : #5A4BD6
   - Texte courant : #5E6269
   - Fond violet clair : #EAE8FF
   - Bordures : #EAEAEA
   - Boutons en pilule (border-radius 30px), cartes arrondies
   ========================================================================== */

/* --- At-rule @import : doit rester en tout premier dans le fichier --- */
@import url("https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&display=swap");

/* --------------------------------------------------------------------------
   Variables Ashby + tokens Arkane
   ⚠️ --colorPrimary900 / --colorPrimary600 sont aussi réglables dans
   Ashby > Theme settings : mettez-y les mêmes valeurs (#181D27 / #7A5AF8)
   pour éviter tout décalage.
   -------------------------------------------------------------------------- */
:root {
  --colorAppBackground: #ffffff;
  --colorPrimary900: #181d27;
  --colorPrimary600: #7a5af8;

  --widthMaxContent: 960px;
  --widthMaxJobBoard: 960px;
  --widthMaxSubscriptionPreferences: 600px;

  --borderRadiusContainer: 16px;
  --borderRadiusControl: 10px;
  --borderRadiusButton: 30px;

  --fontFamily: "Fira Sans", "Trebuchet MS", "-apple-system", "BlinkMacSystemFont",
    "Segoe UI", "Helvetica", "Arial", sans-serif;

  /* Tokens Arkane (usage interne à ce fichier) */
  --ak-ink: #0a0a0a;          /* Texte / titres */
  --ak-cta: #181d27;          /* CTA */
  --ak-text: #5e6269;         /* Texte courant */
  --ak-muted: #5e6269;
  --ak-violet: #7a5af8;       /* Mot clé titre */
  --ak-violet-dark: #5a4bd6;  /* Icône */
  --ak-cyan: #7af0ff;
  --ak-violet-soft: #eae8ff;
  --ak-violet-ring: rgba(122, 90, 248, 0.18);
  --ak-border: #eaeaea;
  --ak-border-strong: #d6d6d6;
  --ak-surface: #fafafa;
  --ak-shadow: 0 1px 2px rgba(10, 13, 18, 0.05);
  --ak-shadow-hover: 0 12px 24px -8px rgba(24, 29, 39, 0.12),
    0 0 0 4px var(--ak-violet-ring);
  --ak-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
  font-family: var(--fontFamily);
  color: var(--ak-text);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  /* Quadrillage léger, comme le hero d'arkanecloud.com */
  background-color: var(--colorAppBackground);
  background-image:
    linear-gradient(to right, rgba(24, 29, 39, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 29, 39, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-attachment: fixed;
}

::selection {
  background: var(--ak-violet-ring);
  color: var(--ak-ink);
}

/* --------------------------------------------------------------------------
   Liste des offres
   -------------------------------------------------------------------------- */

/* Titre principal : "Open Positions (3)" */
.ashby-job-board-heading {
  color: var(--ak-ink);
  font-weight: 600;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

/* Le compteur avec le "Gradient titre" de la charte (#7A5AF8 -> #7AF0FF).
   color reste en secours si le dégradé n'est pas pris en charge. */
.ashby-job-board-heading-count {
  color: var(--ak-violet);
  font-weight: 600;
  background-image: linear-gradient(90deg, #7a5af8 0%, #7af0ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Filtres */
.ashby-job-board-filters-label {
  color: var(--ak-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ashby-job-board-filter {
  background-color: #ffffff;
  border: 1px solid var(--ak-border-strong);
  border-radius: var(--borderRadiusButton);
  color: var(--ak-ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--ak-shadow);
  transition: border-color 0.2s var(--ak-ease), box-shadow 0.2s var(--ak-ease);
}

.ashby-job-board-filter:hover {
  border-color: var(--ak-violet);
}

.ashby-job-board-filter:focus,
.ashby-job-board-filter:focus-visible {
  border-color: var(--ak-violet);
  box-shadow: 0 0 0 4px var(--ak-violet-ring);
  outline: none;
}

.ashby-job-board-reset-filters-label {
  background-color: var(--ak-violet-soft);
  color: var(--ak-violet-dark);
  border-radius: var(--borderRadiusButton);
  font-weight: 500;
}

/* Départements / équipes */
.ashby-department-heading {
  color: var(--ak-ink);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-top: 40px;
}

.ashby-department-heading-level,
.ashby-job-posting-brief-department-heading-level {
  color: var(--ak-muted);
  font-weight: 500;
}

.ashby-job-posting-brief-department-heading {
  color: var(--ak-ink);
  font-weight: 600;
}

/* Cartes d'offre */
.ashby-job-posting-brief {
  position: relative;
  margin-bottom: 12px;
  background-color: #ffffff;
  border: 1px solid var(--ak-border);
  border-radius: var(--borderRadiusContainer);
  box-shadow: var(--ak-shadow);
  transition: border-color 0.2s var(--ak-ease), box-shadow 0.25s var(--ak-ease),
    transform 0.25s var(--ak-ease);
  animation: ak-fade-up 0.45s var(--ak-ease) both;
}

.ashby-job-posting-brief:hover {
  border-color: var(--ak-violet);
  box-shadow: var(--ak-shadow-hover);
  transform: translateY(-2px);
}

/* Petite flèche "→" à droite, comme les CTA du site */
.ashby-job-posting-brief::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: 24px;
  transform: translate(-6px, -50%);
  color: var(--ak-violet-dark);
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.2s var(--ak-ease), transform 0.2s var(--ak-ease);
  pointer-events: none;
}

.ashby-job-posting-brief:hover::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.ashby-job-posting-brief-title {
  color: var(--ak-ink);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.02em;
  padding-right: 32px;
}

.ashby-job-posting-brief-details {
  color: var(--ak-text);
  font-size: 14px;
}

/* Apparition en cascade des cartes */
.ashby-job-posting-brief-list > *:nth-child(2) .ashby-job-posting-brief,
.ashby-job-posting-brief-list > .ashby-job-posting-brief:nth-child(2) { animation-delay: 0.05s; }
.ashby-job-posting-brief-list > *:nth-child(3) .ashby-job-posting-brief,
.ashby-job-posting-brief-list > .ashby-job-posting-brief:nth-child(3) { animation-delay: 0.1s; }
.ashby-job-posting-brief-list > *:nth-child(4) .ashby-job-posting-brief,
.ashby-job-posting-brief-list > .ashby-job-posting-brief:nth-child(4) { animation-delay: 0.15s; }
.ashby-job-posting-brief-list > *:nth-child(n + 5) .ashby-job-posting-brief,
.ashby-job-posting-brief-list > .ashby-job-posting-brief:nth-child(n + 5) { animation-delay: 0.2s; }

/* --------------------------------------------------------------------------
   Page d'une offre
   -------------------------------------------------------------------------- */
.ashby-job-board-back-to-all-jobs-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background-color: #ffffff;
  border: 1px solid var(--ak-border-strong);
  border-radius: var(--borderRadiusButton);
  color: var(--ak-ink);
  font-weight: 500;
  transition: border-color 0.2s var(--ak-ease), color 0.2s var(--ak-ease);
}

.ashby-job-board-back-to-all-jobs-button:hover {
  border-color: var(--ak-violet);
  color: var(--ak-violet);
}

.ashby-job-posting-heading {
  color: var(--ak-ink);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.ashby-job-posting-left-pane {
  color: var(--ak-text);
}

/* Titres de la colonne de gauche (Location, Employment Type…) */
.ashby-job-posting-left-pane h2 {
  color: var(--ak-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ashby-job-posting-left-pane p {
  color: var(--ak-ink);
  font-weight: 500;
}

/* Onglets Overview / Application */
.ashby-job-posting-right-pane-tab-slider {
  background-color: var(--ak-violet) !important;
  border-radius: 2px;
}

.ashby-job-posting-right-pane-overview-tab,
.ashby-job-posting-right-pane-application-tab {
  font-weight: 500;
}

/* Contenu riche de la description */
.ashby-job-posting-description {
  color: var(--ak-text);
  font-size: 16px;
  line-height: 1.7;
}

.ashby-job-posting-description h1,
.ashby-job-posting-description h2,
.ashby-job-posting-description h3,
.ashby-job-posting-description strong {
  color: var(--ak-ink);
}

.ashby-job-posting-description h1,
.ashby-job-posting-description h2,
.ashby-job-posting-description h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 1.6em;
}

.ashby-job-posting-description a {
  color: var(--ak-violet);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ashby-job-posting-description a:hover {
  color: var(--ak-violet-dark);
}

.ashby-job-posting-description ul li::marker {
  color: var(--ak-violet-dark);
}

/* --------------------------------------------------------------------------
   Formulaire de candidature
   -------------------------------------------------------------------------- */
.ashby-application-form-container {
  color: var(--ak-text);
}

.ashby-application-form-section-container {
  background-color: #ffffff;
  border: 1px solid var(--ak-border);
  border-radius: var(--borderRadiusContainer);
  box-shadow: var(--ak-shadow);
}

.ashby-application-form-section-header-title {
  color: var(--ak-ink);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ashby-application-form-section-header-description,
.ashby-application-form-question-description,
.ashby-application-form-texting-consent-description {
  color: var(--ak-muted);
}

.ashby-application-form-question-title {
  color: var(--ak-ink);
  font-weight: 500;
}

/* Champs */
.ashby-application-form-input-text,
.ashby-application-form-input-textarea,
.ashby-application-form-input-date,
.ashby-application-form-input-autocomplete,
.ashby-application-form-input-dropdown-select {
  border: 1px solid var(--ak-border-strong);
  border-radius: var(--borderRadiusControl);
  background-color: #ffffff;
  color: var(--ak-ink);
  box-shadow: var(--ak-shadow);
  transition: border-color 0.2s var(--ak-ease), box-shadow 0.2s var(--ak-ease);
}

.ashby-application-form-input-text:hover,
.ashby-application-form-input-textarea:hover,
.ashby-application-form-input-date:hover,
.ashby-application-form-input-autocomplete:hover,
.ashby-application-form-input-dropdown-select:hover {
  border-color: #a4a7ae;
}

.ashby-application-form-input-text:focus,
.ashby-application-form-input-textarea:focus,
.ashby-application-form-input-date:focus,
.ashby-application-form-input-autocomplete:focus,
.ashby-application-form-input-autocomplete[aria-expanded="true"],
.ashby-application-form-input-dropdown-select:focus {
  border-color: var(--ak-violet);
  box-shadow: 0 0 0 4px var(--ak-violet-ring);
  outline: none;
}

/* Résultats d'autocomplétion */
.ashby-application-form-input-autocomplete-popup {
  border: 1px solid var(--ak-border);
  border-radius: var(--borderRadiusControl);
  box-shadow: 0 12px 24px -8px rgba(24, 29, 39, 0.15);
}

.ashby-application-form-input-autocomplete-popup-result[aria-selected="true"] {
  background-color: var(--ak-violet-soft);
  color: var(--ak-violet-dark);
}

/* Zone d'upload (CV) */
.ashby-application-form-input-file-dropzone,
.ashby-application-form-autofill-input-root {
  border: 1.5px dashed var(--ak-border-strong);
  border-radius: var(--borderRadiusContainer);
  background-color: var(--ak-surface);
  transition: border-color 0.2s var(--ak-ease), background-color 0.2s var(--ak-ease);
}

.ashby-application-form-input-file-dropzone:hover,
.ashby-application-form-autofill-input-root[data-state="drag"] {
  border-color: var(--ak-violet);
  background-color: var(--ak-violet-soft);
}

.ashby-application-form-autofill-input-title {
  color: var(--ak-ink);
  font-weight: 600;
}

.ashby-application-form-autofill-input-icon {
  color: var(--ak-violet-dark);
}

.ashby-application-form-input-file-dropzone-upload,
.ashby-application-form-input-education-add {
  border-radius: var(--borderRadiusButton);
  font-weight: 500;
}

/* Cases à cocher / radios / Oui-Non */
.ashby-application-form-input-checkbox-group-option-checkbox,
.ashby-application-form-input-radio-group-option-radio {
  accent-color: var(--ak-violet);
}

.ashby-application-form-input-yesno-option {
  border-radius: var(--borderRadiusButton);
  font-weight: 500;
  transition: background-color 0.2s var(--ak-ease), color 0.2s var(--ak-ease);
}

.ashby-application-form-input-yesno-option[aria-pressed="true"] {
  background-color: var(--ak-cta);
  border-color: var(--ak-cta);
  color: #ffffff;
}

/* Bouton d'envoi : pilule noire, comme "Get Started" */
.ashby-application-form-submit-button {
  background-color: var(--ak-cta) !important;
  border: 1px solid var(--ak-cta);
  border-radius: var(--borderRadiusButton);
  color: #ffffff;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 14px 28px;
  transition: background-color 0.2s var(--ak-ease), box-shadow 0.2s var(--ak-ease),
    transform 0.2s var(--ak-ease);
}

.ashby-application-form-submit-button:hover {
  background-color: var(--ak-violet) !important;
  border-color: var(--ak-violet);
  box-shadow: 0 8px 20px -6px rgba(122, 90, 248, 0.55);
  transform: translateY(-1px);
}

.ashby-application-form-submit-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ak-violet-ring);
}

/* Messages de retour */
.ashby-application-form-success-container {
  border: 1px solid #abefc6;
  background-color: #ecfdf3;
  border-radius: var(--borderRadiusContainer);
  color: #067647;
}

.ashby-application-form-failure-container {
  border: 1px solid #fecdca;
  background-color: #fef3f2;
  border-radius: var(--borderRadiusContainer);
  color: #b42318;
}

.ashby-application-form-blocked-application-container,
.ashby-application-blocking-disclosure {
  border: 1px solid var(--ak-border);
  background-color: var(--ak-violet-soft);
  border-radius: var(--borderRadiusContainer);
  color: var(--ak-ink);
}

/* --------------------------------------------------------------------------
   At-rules : animations, responsive, accessibilité
   -------------------------------------------------------------------------- */
@keyframes ak-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  body {
    background-size: 32px 32px;
  }

  .ashby-job-board-heading {
    font-size: 32px;
  }

  .ashby-job-posting-brief::after {
    display: none;
  }

  .ashby-job-posting-brief-title {
    padding-right: 0;
  }

  .ashby-application-form-submit-button {
    width: 100%;
  }
}

@media (hover: none) {
  .ashby-job-posting-brief:hover {
    transform: none;
  }
}

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