@font-face {
  font-family: 'TeX Gyre Chorus';
  src: url('../fonts/texgyrechorus-mediumitalic2.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Satoshi';
  src: url('../fonts/satoshi-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/chillax-200.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/chillax-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/chillax-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/chillax-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Chillax';
  src: url('../fonts/chillax-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


:root {
    --noir: #000000;
    --bleu: #67B2FF;
    --blanc: #F8FAFC;
    --gris1: #111214;
    /* Variante moins lumineuse du bleu, utilisée au survol des boutons.
       Reprise telle quelle de style.css (landing) pour que .btn-search ait
       exactement le même comportement que le bouton .btn de l'accueil. */
    --bleu-doux: #5a95d6;

    --title1: 'Satoshi', sans-serif;
    --title2: 'TeX Gyre Chorus', serif;
    --text: 'Chillax', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--noir);
    color: var(--blanc);
    font-family: var(--text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* La barre du haut se cale en haut de page ; c'est .metiers-main qui se
       recentre tout seul dans l'espace restant (margin auto plus bas). */
    justify-content: flex-start;
    gap: 28px;
    padding: 40px 20px 56px;
    overflow-x: hidden;
}

/* --- Barre du haut : navbar + indicateur d'etapes ---
   Reprise de la page carte (carte/carte.html + carte.css), dont la base
   visuelle vient de style.css. Les regles sont RECOPIEES ici plutot que de
   charger style.css comme le fait carte.html : la landing impose un
   `h1 { margin-top: 400px }` qui decalerait le titre de cette page.
   metiers.css est deja autonome (ses propres @font-face et :root). */

.metiers-topbar {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.navbar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    background: rgba(21, 21, 23, 0.77);
    border: 0.5px solid var(--bleu);
    border-radius: 20px;
    padding: 16px 30px;
    gap: 40px;
}

.logo a {
    display: block;
    line-height: 0;
}

.logo img {
    height: 32px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
    align-items: center;
    margin: 0 auto;
}

/* Etapes du parcours F2 : metier -> questionnaire -> resultats.
   Sur cette page, seule la premiere est active. Meme code visuel que la
   page carte : pastille numerotee, etapes a venir attenuees. */

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--text);
    font-weight: 300;
    font-size: 14px;
    color: var(--bleu);
    opacity: 0.45;
}

.step.is-active {
    opacity: 1;
}

.step.is-done {
    opacity: 0.65;
}

.step-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-size: 11px;
}

.step.is-active .step-badge {
    background: var(--bleu);
    border-color: var(--bleu);
    color: var(--noir);
}

/* Bouton ACCUEIL : meme .btn que la landing (comme .btn-search plus bas). */

.btn {
    background: var(--bleu);
    color: var(--noir);
    border: none;

    padding: 10px 12px;
    border-radius: 5px;

    font-family: var(--text);
    font-weight: 300;
    font-size: 14px;

    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
    background-color: var(--bleu-doux);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(90, 149, 214, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* --- Contenu (intro + carte), espace généreux entre les blocs --- */

.metiers-main {
    /* Absorbe l'espace libre au-dessus et en dessous : le contenu reste
       centre verticalement alors que la barre est fixee en haut. */
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    width: 100%;
    max-width: 640px;
}

/* --- Intro --- */

.metiers-intro {
    text-align: center;
    max-width: 640px;
}

.metiers-heading {
    font-family: var(--title1);
    font-weight: 300;
    font-size: 50px;
    line-height: 1.1;
    color: var(--blanc);
    margin-bottom: 20px;
}

.metiers-heading .accent {
    font-family: var(--title2);
    font-style: italic;
    font-weight: 400;
    color: var(--bleu);
}

.accent {
    font-size: 56px;
    margin-left: -4px;
    display: inline-block;
}

.metiers-sub {
    color: var(--bleu);
    font-weight: 300;
    font-size: 18px;
    line-height: 1.5;
}

/* --- Card --- */

.metiers-card {
    width: 100%;
    max-width: 640px;
    background: var(--gris1);
    border: 0.5px solid var(--bleu);
    border-radius: 24px;
    padding: 52px 48px;
}

/* --- Search --- */

.metiers-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 0.5px solid rgba(103, 178, 255, 0.35);
    border-radius: 14px;
    padding: 10px 10px 10px 22px;
    transition: border-color 0.2s ease;
}

.metiers-search:focus-within {
    border-color: var(--bleu);
}

.search-icon {
    display: inline-flex;
    color: var(--bleu);
    flex-shrink: 0;
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

.search-field {
    position: relative;
    flex: 1;
    min-width: 0;
}

#metiers-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--blanc);
    font-family: var(--text);
    font-size: 16px;
    font-weight: 300;
    padding: 13px 0;
}

#metiers-input::placeholder {
    color: rgba(248, 250, 252, 0.4);
}

/* --- Suggestions (autocomplétion) --- */

.metiers-suggestions {
    position: absolute;
    top: calc(100% + 10px);
    left: -22px;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--gris1);
    border: 0.5px solid var(--bleu);
    border-radius: 14px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}

.metiers-suggestions.is-open {
    display: block;
}

.metiers-suggestions li {
    padding: 12px 16px;
    border-radius: 10px;
    font-family: var(--text);
    font-weight: 300;
    font-size: 15px;
    color: var(--blanc);
    cursor: pointer;
    /* Les libellés ESCO du graphe sont stockés en minuscules ; on les capitalise
       à l'affichage seulement (la valeur envoyée au QCM reste celle du graphe). */
    text-transform: capitalize;
}

.metiers-suggestions li mark {
    background: none;
    color: var(--bleu);
    font-weight: 500;
}

.metiers-suggestions li:hover,
.metiers-suggestions li.active {
    background-color: rgba(103, 178, 255, 0.1);
}

.metiers-suggestions .suggestions-empty {
    color: rgba(248, 250, 252, 0.4);
    cursor: default;
    text-transform: none;
}

.metiers-suggestions .suggestions-empty:hover {
    background-color: transparent;
}

/* Ligne d'action affichée quand aucun métier ne correspond (bascule vers le QCM guidé) */
.metiers-suggestions .suggestions-cta {
    color: var(--bleu);
    font-weight: 400;
    cursor: pointer;
    text-transform: none;
}

/* Repris à l'identique du bouton .btn de la landing (style.css : règle de base
   l.236, survol l.964) : même fond, même rayon, même police Chillax 300, même
   levée de 2px au survol. Seuls `flex-shrink` et `white-space` sont conservés
   ici — ce sont des contraintes de la rangée du formulaire, pas du design. */
.btn-search {
    flex-shrink: 0;
    white-space: nowrap;

    background: var(--bleu);
    color: var(--noir);
    border: none;

    padding: 10px 12px;
    border-radius: 5px;

    font-family: var(--text);
    font-weight: 300;
    font-size: 14px;

    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-search:hover {
    background-color: var(--bleu-doux);
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(90, 149, 214, 0.15);
}

.btn-search:active {
    transform: translateY(0);
}

/* --- Séparateur "ou" --- */

.metiers-sep {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(248, 250, 252, 0.4);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 36px 0;
}

.metiers-sep::before,
.metiers-sep::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.metiers-sep span {
    padding: 0 16px;
}

/* --- Bouton "pas d'idée" --- */

.btn-noidea {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: rgba(255, 255, 255, 0.02);
    border: 0.5px solid rgba(103, 178, 255, 0.35);
    border-radius: 14px;
    padding: 24px 52px 24px 28px;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-noidea:hover {
    border-color: var(--bleu);
    background-color: rgba(103, 178, 255, 0.06);
}

.btn-noidea::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 28px;
    width: 9px;
    height: 9px;
    border-top: 1.5px solid var(--bleu);
    border-right: 1.5px solid var(--bleu);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s ease;
}

.btn-noidea:hover::after {
    transform: translateY(-50%) rotate(45deg) translate(2px, -2px);
}

.noidea-title {
    font-family: var(--title1);
    font-weight: 400;
    font-size: 20px;
    color: var(--blanc);
}

.noidea-sub {
    font-family: var(--text);
    font-weight: 300;
    font-size: 14px;
    color: var(--bleu);
}

/* --- Responsive --- */

/* Sous 1024px les 3 etapes ne tiennent plus dans la barre : elles sont
   masquees et la navbar se reduit au logo + bouton ACCUEIL. Meme
   comportement que la page carte (herite de style.css). */
@media (max-width: 1024px) {
    .navbar {
        padding: 12px 16px;
        gap: 0;
        justify-content: space-between;
        border-radius: 14px;
    }

    .nav-links {
        display: none;
    }

    .logo img {
        height: 26px;
    }
}

@media (max-width: 768px) {
    .navbar {
        gap: 10px;
        padding: 10px 12px;
    }

    .navbar .btn {
        padding: 9px 14px;
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .metiers-heading { font-size: 32px; }
    .metiers-card { padding: 24px; }
    .metiers-search {
        flex-wrap: wrap;
    }
    .btn-search {
        width: 100%;
    }
}


/* Téléphone : les contours de 0,5 px perdaient un trait (gauche ou du haut)
   sur iPhone, Safari arrondissant ce demi-pixel selon la position du cadre à
   l'écran. 1 px est toujours tracé, dans les mêmes couleurs. Les traits simples
   (séparateurs) restent fins. */
@media (max-width: 768px) {
    .navbar,
    .metiers-card,
    .metiers-search,
    .metiers-suggestions,
    .btn-noidea {
        border-width: 1px;
    }
}
