/* ==========================================================================
   Evolution — feuille de style commune
   ========================================================================== */

:root {
    --violet: #8b17f5;
    --indigo: #5b3be6;
    --encre: #111827;
    --texte: #374151;
    --texte-doux: #6b7280;
    --fond: #f9fafb;
    --fond-sombre: #172033;
    --blanc: #ffffff;
    --rayon: 12px;
    --largeur-max: 1200px;
    --police: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
    margin: 0;
    font-family: var(--police);
    color: var(--texte);
    background: var(--fond);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

h1,
h2,
h3 {
    color: var(--encre);
    font-weight: 400;
    line-height: 1.15;
}

a:focus-visible {
    outline: 3px solid #facc15;
    outline-offset: 3px;
}

.conteneur {
    max-width: var(--largeur-max);
    margin: 0 auto;
    padding: 0 24px;
}

.visuellement-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- Barre de navigation ------------------------------------------------ */

.barre {
    background: var(--violet);
    color: var(--blanc);
}

.barre__contenu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 64px;
}

.barre__logo {
    color: var(--blanc);
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.barre__menu {
    display: flex;
    gap: 8px;
}

.barre__menu a {
    color: var(--blanc);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 999px;
    opacity: 0.85;
}

.barre__menu a:hover,
.barre__menu a[aria-current="page"] {
    opacity: 1;
    background: rgba(255, 255, 255, 0.18);
}

/* --- Bandeau (haut de page violet) -------------------------------------- */

.bandeau {
    background: linear-gradient(160deg, var(--violet) 0%, var(--violet) 55%, var(--indigo) 100%);
    color: var(--blanc);
    padding: 56px 0 64px;
}

.bandeau--accueil {
    padding: 72px 0 96px;
}

.bandeau h1 {
    color: var(--blanc);
    font-size: clamp(2rem, 5vw, 3.5rem);
    max-width: 18em;
    margin: 0 0 24px;
}

.bandeau__intro {
    font-size: 1.15rem;
    max-width: 44em;
    margin: 0 0 16px;
}

.bouton {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 24px;
    background: var(--blanc);
    color: var(--indigo);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.bouton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- Fil d'Ariane ------------------------------------------------------- */

.fil-ariane ol {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.fil-ariane li + li::before {
    content: "›";
    margin: 0 8px;
    opacity: 0.7;
}

.fil-ariane a {
    color: var(--blanc);
    opacity: 0.8;
}

.fil-ariane a:hover {
    opacity: 1;
}

/* --- Sections ----------------------------------------------------------- */

.section {
    padding: 64px 0 80px;
}

/* --- Chiffres clés (accueil) -------------------------------------------- */

.chiffres {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.chiffres__element {
    display: block;
    height: 100%;
    background: var(--blanc);
    border-radius: var(--rayon);
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: center;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.chiffres__element:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(91, 59, 230, 0.18);
}

.chiffres__nombre {
    display: block;
    font-size: 2.75rem;
    font-weight: 300;
    color: var(--violet);
    line-height: 1.1;
}

.chiffres__libelle {
    color: var(--texte-doux);
}

.chiffres__icone {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #ede9fe;
    color: var(--violet);
}

.chiffres__icone .icone {
    width: 26px;
    height: 26px;
}

/* --- Bandeau de l'accueil : image de fond plus présente que sur les fiches -- */

.bandeau--accueil.bandeau--fiche {
    background-position: right center;
}

.bandeau--accueil.bandeau--fiche[style]::before {
    background: linear-gradient(90deg, rgba(139, 23, 245, 0.97) 0%, rgba(139, 23, 245, 0.88) 40%, rgba(91, 59, 230, 0.35) 75%, rgba(91, 59, 230, 0.1) 100%);
}

/* --- Logos du projet et des partenaires (accueil) ----------------------- */

.partenaires {
    background: var(--blanc);
    border-top: 1px solid #e5e7eb;
    padding: 40px 0;
}

.partenaires__contenu {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 32px 96px;
}

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

.partenaires__titre {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--texte-doux);
}

.partenaires__logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px 48px;
    min-height: 104px; /* même hauteur que le logo Évolution : intitulés alignés */
}

.partenaires__logo {
    display: block;
    width: auto;
    max-width: 100%;
}

.partenaires__logo--evolution {
    height: 104px;
}

.partenaires__logo--france2030 {
    height: 88px;
}

.partenaires__logo--banque {
    height: 56px;
}

/* --- Grille de cartes --------------------------------------------------- */

.grille {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Carte : vignette (image 300×145 ou dégradé) avec le titre, puis texte sur fond blanc */
.carte {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--rayon);
    overflow: hidden;
    background: var(--blanc);
    color: var(--texte);
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.carte:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.carte__visuel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    aspect-ratio: 300 / 145;
    padding: 12px 14px;
    color: var(--blanc);
    background-size: cover;
    background-position: center;
    /* Sans image : dégradé calculé à partir de --teinte (fournie par le PHP) */
    background-image: linear-gradient(
        160deg,
        hsl(var(--teinte, 270) 70% 55%) 0%,
        hsl(calc(var(--teinte, 270) + 40) 65% 28%) 100%
    );
}

/* Voile sombre en bas de la vignette pour garder le titre lisible */
.carte__visuel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 80%);
}

.carte__visuel > * {
    position: relative;
    z-index: 1;
}

.carte__etiquette {
    align-self: flex-end;
    max-width: 100%;
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: right;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
}

.carte__titre {
    margin-top: auto;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.carte__corps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
}

.carte__description {
    font-size: 0.9rem;
    color: var(--texte-doux);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carte__lien {
    margin-top: auto;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--violet);
}

.carte:hover .carte__lien {
    text-decoration: underline;
}

/* --- Blocs de liens regroupés par famille ------------------------------- */

/* Colonnes « maçonnerie » : les blocs de hauteurs différentes s'empilent sans trous */
.groupes {
    columns: 3 300px;
    column-gap: 24px;
}

.groupe {
    break-inside: avoid;
    margin-bottom: 24px;
    padding: 20px 22px;
    border-radius: var(--rayon);
    background: var(--fond);
    border: 1px solid #e5e7eb;
}

.section:not(.section--blanche) .groupe {
    background: var(--blanc);
}

.groupe__titre {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 10px;
}

.groupe__nombre {
    flex-shrink: 0;
    min-width: 1.8em;
    padding: 0 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #4c1d95;
    font-size: 0.8rem;
    text-align: center;
}

.groupe__liste {
    list-style: none;
    margin: 0;
    padding: 0;
}

.groupe__liste li + li {
    border-top: 1px solid #eef0f3;
}

.groupe__liste a {
    position: relative;
    display: block;
    padding: 7px 1.4em 7px 0;
    color: var(--texte);
    text-decoration: none;
}

/* Flèche au survol, hors du flux pour ne jamais provoquer de retour à la ligne */
.groupe__liste a::after {
    content: "→";
    position: absolute;
    right: 0;
    top: 7px;
    color: var(--violet);
    opacity: 0;
    transition: opacity 0.15s;
}

.groupe__liste a:hover {
    color: var(--violet);
}

.groupe__liste a:hover::after {
    opacity: 1;
}

/* --- Sections de contenu ------------------------------------------------ */

.section--blanche {
    background: var(--blanc);
}

.section h2 {
    font-size: 2rem;
    margin: 0 0 12px;
}

.section__intro {
    color: var(--texte-doux);
    margin: 0 0 32px;
}

/* --- Fiche détaillée (métier, activité, compétence) --------------------- */

/* Bandeau des fiches : l'image large (1200×500) est posée en fond par style_bandeau(),
   sous un voile violet qui garde le texte lisible */
.bandeau--fiche {
    position: relative;
    background-size: cover;
    background-position: center;
}

.bandeau--fiche[style]::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(139, 23, 245, 0.96) 0%, rgba(139, 23, 245, 0.85) 45%, rgba(91, 59, 230, 0.2) 100%);
}

.bandeau--fiche > .conteneur {
    position: relative;
}

.fiche-entete {
    max-width: 44em;
}

.fiche-entete h1 {
    margin-bottom: 12px;
}

.fiche-entete__surtitre {
    display: inline-block;
    margin: 0 0 12px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.9rem;
}

.fiche-entete__appellations {
    margin: 0 0 20px;
    opacity: 0.85;
    font-style: italic;
}

.fiche-entete__raccourcis {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.fiche-entete__raccourcis a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--blanc);
    color: var(--indigo);
    font-weight: 600;
    text-decoration: none;
}

.fiche-entete__raccourcis a:hover {
    background: #ede9fe;
}

.fiche {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 48px;
    align-items: start;
}

.fiche__principal {
    max-width: 46em;
}

.fiche__principal h2 {
    margin-top: 0;
}

.fiche__principal h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 28px 0 6px;
}

.fiche__principal p {
    margin: 0 0 16px;
}

.fiche__principal h2 + p + h2,
.fiche__principal p + h2 {
    margin-top: 40px;
}

.fiche__vide {
    color: var(--texte-doux);
    font-style: italic;
}

.fiche__encart {
    background: var(--blanc);
    border-radius: var(--rayon);
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.fiche__encart h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 12px;
}

.fiche__encart * + h2 {
    margin-top: 28px;
}

.fiche__encart dl {
    margin: 0;
}

.fiche__encart dt {
    font-weight: 600;
    color: var(--encre);
    font-size: 0.9rem;
    margin-top: 14px;
}

.fiche__encart dd {
    margin: 4px 0 0;
    font-size: 0.9rem;
}

.fiche__encart a {
    color: var(--violet);
    font-weight: 600;
}

.pastilles {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pastilles li {
    padding: 2px 10px;
    border-radius: 999px;
    background: #ede9fe;
    color: #4c1d95;
    font-size: 0.85rem;
}

.pastilles--liens li {
    padding: 0;
}

.fiche__encart .pastilles--liens a {
    display: block;
    padding: 2px 10px;
    color: inherit;
    font-weight: 500;
    text-decoration: none;
}

.pastilles--liens li:hover {
    background: #ddd6fe;
}

/* Niveaux de maîtrise d'une compétence (1 à 6) */
.niveaux {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.niveaux__niveau {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
}

.niveaux__niveau:first-child {
    border-top: none;
    padding-top: 4px;
}

.niveaux__numero {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.2em;
    height: 2.2em;
    border-radius: 50%;
    background: var(--violet);
    color: var(--blanc);
    font-weight: 700;
}

.fiche__principal .niveaux__texte {
    margin: 0;
    color: var(--encre);
}

.fiche__principal .niveaux__exemple {
    margin: 6px 0 0;
    font-size: 0.92rem;
    color: var(--texte-doux);
}

@media (max-width: 900px) {
    .fiche {
        grid-template-columns: 1fr;
    }
}

/* --- Avancements métier (fiche métier) ---------------------------------- */

.parcours-titre {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 16px;
}

/* Paliers en escalier : la hauteur de chaque marche dépend de --marche (fourni par le PHP).
   Un clic sur une marche affiche sa description (élément details). */
.escalier {
    list-style: none;
    margin: 0 0 40px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

/* Le management démarre sous le palier Senior */
.escalier--management li:first-child {
    grid-column: 3;
}

.marche {
    min-height: calc(70px + var(--marche) * 40px);
    padding: 16px;
    border-radius: var(--rayon) var(--rayon) 0 0;
    color: var(--blanc);
    /* Violet de plus en plus soutenu au fil des marches */
    background: linear-gradient(180deg, hsl(272 91% calc(72% - var(--marche) * 5%)), hsl(262 77% calc(60% - var(--marche) * 4%)));
}

.escalier--management .marche {
    background: linear-gradient(180deg, #4f46e5, #312e81);
}

.marche summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.marche summary::-webkit-details-marker {
    display: none;
}

.marche__niveau {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}

.marche__titre {
    font-weight: 600;
    line-height: 1.25;
}

.marche__experience {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
}

.marche p {
    margin: 12px 0 0;
    font-size: 0.85rem;
}

/* Tableau « niveau attendu par compétence et par palier » */
.escalier + .niveaux-paliers__titre {
    margin-top: 48px;
}

.niveaux-paliers__legende {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 0.9rem;
    color: var(--texte-doux);
}

.niveaux-paliers__legende li {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Seul le tableau défile horizontalement sur petit écran, pas la page */
.niveaux-paliers__defilement {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: var(--rayon);
}

.niveaux-paliers {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.niveaux-paliers th,
.niveaux-paliers td {
    padding: 8px 12px;
    border-top: 1px solid #eef0f3;
}

.niveaux-paliers thead th {
    border-top: none;
    background: var(--fond);
    color: var(--encre);
    font-weight: 600;
    white-space: nowrap;
}

.niveaux-paliers thead tr:first-child th {
    padding-bottom: 0;
}

.niveaux-paliers__parcours {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--violet) !important;
}

.niveaux-paliers thead tr:first-child th:first-child {
    text-align: left;
    vertical-align: bottom;
}

.niveaux-paliers td,
.niveaux-paliers thead tr + tr th {
    text-align: center;
    min-width: 6.5em;
}

/* Séparation entre le parcours d'expertise et celui de management */
.niveaux-paliers__debut ~ .niveaux-paliers__debut {
    border-left: 2px solid #e5e7eb;
}

.niveaux-paliers__famille th {
    padding-top: 14px;
    background: #f5f3ff;
    color: #4c1d95;
    font-weight: 600;
    text-align: left;
}

/* Nom de la compétence, figé à gauche quand le tableau défile */
.niveaux-paliers tbody th[scope="row"] {
    position: sticky;
    left: 0;
    min-width: 14em;
    background: var(--blanc);
    font-weight: 400;
    text-align: left;
}

.niveaux-paliers tbody th a {
    color: var(--texte);
    text-decoration: none;
}

.niveaux-paliers tbody th a:hover {
    color: var(--violet);
    text-decoration: underline;
}

.niveaux-paliers tbody tr:not(.niveaux-paliers__famille):hover > * {
    background: #faf9ff;
}

.niveaux-paliers__vide {
    color: #c4c8cf;
}

/* Pastille de niveau : violet de plus en plus soutenu du niveau 1 au niveau 6 */
.niveau {
    display: inline-grid;
    place-items: center;
    width: 1.9em;
    height: 1.9em;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    color: #4c1d95;
    cursor: help;
}

.niveau--1 { background: color-mix(in srgb, var(--violet) 10%, var(--blanc)); }
.niveau--2 { background: color-mix(in srgb, var(--violet) 22%, var(--blanc)); }
.niveau--3 { background: color-mix(in srgb, var(--violet) 38%, var(--blanc)); }
.niveau--4 { background: color-mix(in srgb, var(--violet) 62%, var(--blanc)); color: var(--blanc); }
.niveau--5 { background: color-mix(in srgb, var(--violet) 82%, var(--blanc)); color: var(--blanc); }
.niveau--6 { background: #4c1d95; color: var(--blanc); }

.niveaux-paliers__legende .niveau {
    cursor: default;
}

@media (max-width: 600px) {
    .niveaux-paliers {
        font-size: 0.82rem;
    }

    .niveaux-paliers th,
    .niveaux-paliers td {
        padding: 6px 8px;
    }

    .niveaux-paliers td,
    .niveaux-paliers thead tr + tr th {
        min-width: 4.5em;
    }

    .niveaux-paliers tbody th[scope="row"] {
        min-width: 8em;
        max-width: 9em;
    }
}

/* Escalier sur petit écran : marches empilées et décalées vers la droite */
@media (max-width: 900px) {
    .escalier {
        grid-template-columns: 1fr;
    }

    .escalier--management li:first-child {
        grid-column: auto;
    }

    .marche {
        min-height: 0;
        margin-left: calc((var(--marche) - 1) * 16px);
        border-radius: var(--rayon);
    }
}

/* --- Fiche métier : chiffres clés, mission, conditions d'exercice ------ */

/* Bandeau allongé pour laisser les chiffres clés déborder dessus */
.bandeau--chiffres {
    padding-bottom: 104px;
}

.chiffres--fiche {
    position: relative;
    margin-top: -64px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
}

.chiffres--fiche .chiffres__element {
    padding: 20px;
    box-shadow: 0 8px 24px rgba(91, 59, 230, 0.15);
}

.chiffres--fiche span.chiffres__element:hover {
    transform: none;
}

/* Première phrase de la mission */
.accroche {
    margin: 8px 0 20px;
    padding: 8px 0 8px 28px;
    border-left: 4px solid var(--violet);
    font-size: 1.45rem;
    line-height: 1.45;
    color: var(--encre);
}

.section h2.conditions__titre {
    margin-top: 56px;
}

/* Tuiles dépliables : extrait de 3 lignes, texte complet au clic */
.tuiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    align-items: start;
}

.tuile {
    padding: 22px;
    border-radius: var(--rayon);
    background: var(--blanc);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.tuile summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    align-items: center;
}

.tuile summary::-webkit-details-marker {
    display: none;
}

.tuile__icone {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ede9fe;
    color: var(--violet);
}

.tuile__icone .icone {
    width: 26px;
    height: 26px;
}

.tuile__titre {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--encre);
}

.tuile__extrait {
    grid-column: 1 / -1;
    margin-top: 8px;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tuile__suite {
    grid-column: 1 / -1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--violet);
}

.tuile[open] .tuile__extrait,
.tuile[open] .tuile__suite {
    display: none;
}

.tuile p {
    margin: 12px 0 0;
    font-size: 0.92rem;
}

/* --- Fiche métier : profil de compétences (radar + jauges) ------------- */

.profil {
    display: grid;
    grid-template-columns: minmax(0, 520px) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.profil__radar {
    position: sticky;
    top: 24px;
    margin: 0;
    text-align: center;
    color: var(--texte-doux);
    font-size: 0.9rem;
}

.radar {
    width: 100%;
    height: auto;
}

.radar__grille,
.radar__axe {
    fill: none;
    stroke: #e5e7eb;
}

.radar__libelle {
    font-size: 12px;
    fill: var(--texte);
}

.radar__surface {
    fill: rgba(139, 23, 245, 0.25);
    stroke: var(--violet);
    stroke-width: 2;
}

.radar__point {
    fill: var(--violet);
}

.jauges h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #4c1d95;
}

.jauges ul {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.jauges li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 6px 0;
    border-top: 1px solid #eef0f3;
}

.jauges a {
    color: var(--texte);
    text-decoration: none;
}

.jauges a:hover {
    color: var(--violet);
}

/* Jauge de 6 cases, remplies jusqu'au niveau attendu */
.jauge {
    flex: none;
    display: flex;
    gap: 3px;
    cursor: help;
}

.jauge span {
    width: 22px;
    height: 10px;
    border-radius: 3px;
    background: #eef0f3;
}

.jauge .jauge__pleine {
    background: var(--violet);
}

/* --- Fiche métier : activités par famille, en cartes colorées ---------- */

.familles-cartes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    align-items: start;
}

.famille-carte {
    border-radius: var(--rayon);
    overflow: hidden;
    background: var(--blanc);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.famille-carte .carte__visuel {
    aspect-ratio: auto;
    min-height: 110px;
}

.famille-carte .carte__titre {
    margin: auto 0 0;
    color: var(--blanc);
}

.famille-carte .pastilles {
    margin: 0;
    padding: 16px;
}

.famille-carte .pastilles--liens a {
    display: block;
    padding: 2px 10px;
    color: inherit;
    text-decoration: none;
}

/* --- Fiche métier : parcours (provenance → métier → évolutions) -------- */

.parcours {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.parcours__colonne {
    flex: 0 1 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section .parcours h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--texte-doux);
    text-align: center;
}

.parcours__fleche {
    font-size: 2.5rem;
    color: var(--violet);
}

/* Vignette d'un métier : image (ou dégradé) avec le nom en blanc */
.vignette {
    position: relative;
    display: flex;
    align-items: flex-end;
    aspect-ratio: 300 / 110;
    padding: 10px 14px;
    border-radius: var(--rayon);
    overflow: hidden;
    color: var(--blanc);
    font-weight: 600;
    text-decoration: none;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(160deg, hsl(var(--teinte, 270) 70% 55%), hsl(calc(var(--teinte, 270) + 40) 65% 28%));
    transition: transform 0.15s;
}

a.vignette:hover {
    transform: translateY(-3px);
}

.vignette::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 70%);
}

.vignette span {
    position: relative;
    z-index: 1;
}

.parcours__actuel .vignette {
    aspect-ratio: 300 / 160;
    font-size: 1.25rem;
    outline: 4px solid var(--violet);
    outline-offset: 3px;
}

/* --- Bande de cartes défilante (métiers de la même famille) ------------ */

.grille--defilante {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 4px 4px 16px;
    scroll-snap-type: x mandatory;
}

.grille--defilante > li {
    flex: 0 0 260px;
    scroll-snap-align: start;
}

@media (max-width: 900px) {
    .profil {
        grid-template-columns: 1fr;
    }

    .profil__radar {
        position: static;
    }

    .parcours {
        flex-direction: column;
        align-items: stretch;
    }

    .parcours__colonne {
        flex-basis: auto;
    }

    .parcours__fleche {
        transform: rotate(90deg);
        align-self: center;
    }
}

@media (max-width: 600px) {
    /* Sélecteur renforcé : passe avant la marge générale des bandeaux sur mobile */
    .bandeau.bandeau--chiffres {
        padding-bottom: 88px;
    }

    .chiffres--fiche {
        margin-top: -56px;
        gap: 12px;
    }

    .chiffres--fiche .chiffres__element {
        padding: 14px 10px;
    }

    .chiffres--fiche .chiffres__nombre {
        font-size: 2rem;
    }

    .chiffres--fiche .chiffres__icone {
        width: 40px;
        height: 40px;
        margin-bottom: 6px;
    }

    .tuiles,
    .familles-cartes {
        grid-template-columns: 1fr;
    }

    .jauge span {
        width: 14px;
    }
}

/* --- Symboles (fonction icone() de includes/composants.php) ------------ */

.icone {
    flex: none;
    width: 1.1em;
    height: 1.1em;
}

/* Titre précédé d'un symbole dans une pastille carrée violet clair */
.titre-icone {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.titre-icone .icone {
    box-sizing: content-box;
    width: 0.9em;
    height: 0.9em;
    padding: 0.3em;
    border-radius: 0.35em;
    background: #ede9fe;
    color: var(--violet);
}

/* Sous-titre précédé d'un petit symbole violet */
.sous-titre-icone {
    display: flex;
    align-items: center;
    gap: 0.45em;
}

.sous-titre-icone .icone {
    color: var(--violet);
}

/* Sur le bandeau violet : pastille blanche translucide, symbole blanc */
.bandeau .titre-icone .icone {
    background: rgba(255, 255, 255, 0.18);
    color: var(--blanc);
    width: 0.7em;
    height: 0.7em;
    padding: 0.22em;
    border-radius: 0.25em;
}

.fiche-entete__surtitre .icone {
    width: 1em;
    height: 1em;
    margin-right: 6px;
    vertical-align: -0.15em;
}

/* --- Pied de page ------------------------------------------------------- */

.pied {
    background: var(--fond-sombre);
    color: #d1d5db;
    text-align: center;
    padding: 40px 0;
}

.pied p {
    margin: 0;
}

/* --- Petits écrans ------------------------------------------------------ */

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

    /* Menu sous le logo, sur toute la largeur */
    .barre__contenu {
        flex-wrap: wrap;
        gap: 4px;
        padding: 10px 16px;
    }

    .barre__menu {
        flex-wrap: wrap;
        gap: 4px;
        margin: 0 -10px;
    }

    .barre__menu a {
        padding: 6px 10px;
    }

    .bandeau,
    .bandeau--accueil {
        padding: 40px 0 48px;
    }

    /* Sur mobile le texte occupe toute la largeur : voile uniforme */
    .bandeau--fiche[style]::before,
    .bandeau--accueil.bandeau--fiche[style]::before {
        background: rgba(139, 23, 245, 0.88);
    }

    .partenaires__contenu {
        gap: 32px;
    }
}
