/* ==========================================================================
   « Pour les entreprises » (SPEC.md §46.10) : page de présentation aux
   recruteurs. Mise en scène : halos animés et démonstration du sourcing IA
   dans l'en-tête, cartes qui se retournent, illustrations animées, blocs qui
   apparaissent au défilement (assets/js/pages/employers.js).
   Tout mouvement s'arrête si le visiteur demande moins d'animations.
   Les couleurs viennent de variables.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   En-tête
   -------------------------------------------------------------------------- */
.emp-hero {
    position: relative;
    overflow: hidden;
    padding-block: var(--space-7);
    background: var(--primary-deep);
    color: var(--on-deep-muted);
}

.emp-hero .container { position: relative; z-index: 1; }

.emp-hero__glow {
    position: absolute;
    width: 46vw;
    max-width: 620px;
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    animation: emp-drift 16s ease-in-out infinite alternate;
}

.emp-hero__glow--a { top: -18%; left: -8%; background: color-mix(in srgb, var(--primary) 70%, transparent); }
.emp-hero__glow--b { right: -10%; bottom: -30%; background: color-mix(in srgb, var(--accent) 38%, transparent); animation-delay: -6s; }

@keyframes emp-drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(6%, 8%, 0) scale(1.15); }
}

.emp-hero__eyebrow { color: var(--accent); }

.emp-hero__title {
    margin: 0 0 var(--space-4);
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.08;
    color: var(--on-primary);
}

.emp-hero__accent {
    display: block;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: emp-shine 6s linear infinite;
}

@keyframes emp-shine {
    to { background-position: 200% 0; }
}

.emp-hero__text { max-width: 34rem; margin: 0 0 var(--space-5); font-size: var(--text-lg); }
.emp-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-4); }
.emp-hero__actions .btn i { transition: transform var(--transition); }
.emp-hero__actions .btn:hover i { transform: translateX(4px); }
.emp-hero__note { margin: 0; font-size: var(--text-sm); }
.emp-hero__note i { color: var(--accent); }

/* Démonstration du sourcing IA */
.emp-demo {
    position: relative;
    padding: var(--space-4) var(--space-5) var(--space-5);
    border: 1px solid var(--deep-border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--deep-surface) 86%, transparent);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
    transition: transform .5s ease;
}

.emp-demo:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
.emp-demo__bar { display: flex; gap: 6px; margin-bottom: var(--space-4); }
.emp-demo__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--deep-border); }
.emp-demo__label { margin: 0 0 var(--space-2); font-size: var(--text-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.emp-demo__brief {
    min-height: 3.4em;
    margin: 0 0 var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--deep-border);
    border-radius: var(--radius);
    background: var(--primary-deep);
    font-size: var(--text-lg);
    color: var(--on-primary);
}

.emp-demo__caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; background: var(--accent); vertical-align: text-bottom; animation: emp-blink 1s steps(2) infinite; }

@keyframes emp-blink {
    50% { opacity: 0; }
}

.emp-demo__reading { margin: 0 0 var(--space-3); font-size: var(--text-sm); color: var(--accent); }
.emp-demo__results { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }

.emp-demo__result {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    transition: opacity .45s ease, transform .45s ease;
}

.emp-demo__result.is-hidden { opacity: 0; transform: translateY(14px); }
.emp-demo__name { margin: 0; font-weight: 700; color: var(--primary-deep); }
.emp-demo__name span { font-weight: 400; color: var(--text-secondary); }
.emp-demo__why { margin: 0; font-size: var(--text-sm); color: var(--text-secondary); }
.emp-demo__sample { margin: var(--space-3) 0 0; font-size: var(--text-xs); text-align: right; color: var(--on-deep-muted); }

/* --------------------------------------------------------------------------
   Chiffres
   -------------------------------------------------------------------------- */
.emp-stats { border-bottom: 1px solid var(--border); background: var(--surface); }
.emp-stats__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); margin: 0; padding: var(--space-5) 0; list-style: none; text-align: center; }
.emp-stats__list strong { display: block; font-family: var(--font-heading); font-size: var(--text-3xl); font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.emp-stats__list span { font-size: var(--text-sm); color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Titres et apparition au défilement
   -------------------------------------------------------------------------- */
.emp-title { max-width: 44rem; margin: 0 0 var(--space-5); font-size: clamp(1.6rem, 3.2vw, 2.3rem); color: var(--primary-deep); }
.emp-title--on-deep { color: var(--on-primary); }
.emp-lead { max-width: 40rem; margin: calc(-1 * var(--space-3)) 0 var(--space-5); color: var(--text-secondary); }

.has-emp-motion [data-emp-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.has-emp-motion [data-emp-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Problèmes : la carte se retourne sur sa réponse
   -------------------------------------------------------------------------- */
.emp-problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.emp-problem { position: relative; min-height: 250px; perspective: 1200px; outline: none; }

.emp-problem__face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backface-visibility: hidden;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.emp-problem__face--front { background: var(--surface); }
.emp-problem__face--front h3 { margin: 0; font-size: var(--text-lg); color: var(--primary-deep); }
.emp-problem__face--back { border-color: var(--primary); background: var(--primary-softer); transform: rotateY(180deg); }
.emp-problem__face--back p { margin: 0; color: var(--text); }
.emp-problem:hover .emp-problem__face--front,
.emp-problem:focus .emp-problem__face--front,
.emp-problem.is-flipped .emp-problem__face--front { transform: rotateY(-180deg); }
.emp-problem:hover .emp-problem__face--back,
.emp-problem:focus .emp-problem__face--back,
.emp-problem.is-flipped .emp-problem__face--back { transform: rotateY(0); }
.emp-problem:focus-visible .emp-problem__face { box-shadow: var(--focus-ring); }

/* --------------------------------------------------------------------------
   Visite des fonctions
   -------------------------------------------------------------------------- */
.emp-feature { padding-block: var(--space-5); }
.emp-feature + .emp-feature { border-top: 1px solid var(--border); }
.emp-feature__title { margin: 0 0 var(--space-3); font-size: var(--text-2xl); color: var(--primary-deep); }
.emp-feature__text { margin: 0 0 var(--space-4); color: var(--text-secondary); }

.emp-visual {
    display: grid;
    gap: var(--space-4);
    align-content: center;
    min-height: 260px;
    padding: var(--space-5);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, var(--primary-softer), var(--surface));
    transition: transform .4s ease, box-shadow .4s ease;
}

.emp-visual:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px) rotate(-.6deg); }

.emp-lines { display: grid; flex: 1 1 auto; gap: 8px; }
.emp-lines span { height: 9px; border-radius: var(--radius-pill); background: var(--neutral-soft); }
.emp-lines span.is-short { width: 55%; }

/* Offre : étapes qui s'allument tour à tour */
.emp-steps-mock { display: flex; justify-content: space-between; }
.emp-steps-mock span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--neutral-soft); color: var(--text-muted); animation: emp-step 6s infinite; }
.emp-steps-mock span:nth-child(2) { animation-delay: 1s; }
.emp-steps-mock span:nth-child(3) { animation-delay: 2s; }
.emp-steps-mock span:nth-child(4) { animation-delay: 3s; }
.emp-steps-mock span:nth-child(5) { animation-delay: 4s; }
.emp-steps-mock span:nth-child(6) { animation-delay: 5s; }

@keyframes emp-step {
    0%, 16% { background: var(--primary); color: var(--on-primary); transform: scale(1.12); }
    17%, 100% { background: var(--primary-soft); color: var(--primary-dark); transform: none; }
}

/* CVthèque : compteurs qui se remplissent */
.emp-facets-mock { display: grid; gap: var(--space-2); }
.emp-facets-mock div { display: flex; align-items: center; gap: var(--space-2); }
.emp-facets-mock em { width: 2rem; font-size: var(--text-xs); font-style: normal; text-align: right; color: var(--text-muted); }
.emp-check { flex: 0 0 14px; height: 14px; border: 2px solid var(--primary); border-radius: 4px; }
.emp-facets-mock div:first-child .emp-check { background: var(--primary); }
.emp-bar { flex: 1 1 auto; height: 9px; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--primary) var(--w), var(--neutral-soft) 0); }
.emp-cards-mock { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.emp-cards-mock span { height: 54px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); animation: emp-pop 4s ease-in-out infinite; }
.emp-cards-mock span:nth-child(2) { animation-delay: .4s; }
.emp-cards-mock span:nth-child(3) { animation-delay: .8s; }
.emp-cards-mock span:nth-child(4) { animation-delay: 1.2s; }

@keyframes emp-pop {
    0%, 70%, 100% { transform: none; border-color: var(--border); }
    35% { transform: translateY(-6px); border-color: var(--primary); }
}

/* Sourcing IA : du besoin au classement */
.emp-flow { display: flex; align-items: center; justify-content: center; gap: var(--space-3); color: var(--text-muted); }
.emp-flow span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--primary); }
.emp-flow span.is-accent { background: var(--accent); color: var(--primary-deep); animation: emp-pulse 2.4s ease-in-out infinite; }

@keyframes emp-pulse {
    50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 22%, transparent); }
}

.emp-ranks { display: grid; gap: var(--space-2); }
.emp-ranks > div { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.emp-ranks .talent-score { width: 44px; height: 44px; }
.emp-ranks .talent-score__value { width: 34px; height: 34px; font-size: var(--text-sm); }

/* Candidatures : une carte passe d'une colonne à l'autre */
.emp-board-mock { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.emp-board-mock > div { display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: var(--space-2); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.emp-board-mock strong { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; color: var(--primary-deep); }
.emp-board-mock span { height: 26px; border-radius: var(--radius-sm); background: var(--primary-soft); }
.emp-board-mock span.is-moving { background: var(--accent); animation: emp-move 5s ease-in-out infinite; }

@keyframes emp-move {
    0%, 20% { transform: none; }
    45%, 75% { transform: translateX(calc(100% + var(--space-2) + var(--space-4))) rotate(3deg); }
    100% { transform: none; }
}

/* Dossiers et exports */
.emp-folders-mock { display: flex; justify-content: center; gap: var(--space-4); font-size: 2.6rem; }
.emp-folders-mock span { color: var(--folder-color); transition: transform var(--transition); }
.emp-visual:hover .emp-folders-mock span:nth-child(odd) { transform: translateY(-8px) rotate(-6deg); }
.emp-visual:hover .emp-folders-mock span:nth-child(even) { transform: translateY(-4px) rotate(5deg); }
.emp-exports { display: flex; justify-content: center; gap: var(--space-2); }
.emp-exports span { padding: .25rem .7rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: var(--text-xs); font-weight: 700; color: var(--primary-deep); }

/* Équipe et droits */
.emp-team-mock { display: flex; justify-content: center; }
.emp-team-mock .avatar { margin-left: -10px; border: 3px solid var(--surface); }
.emp-team-mock .avatar:first-child { margin-left: 0; }
.emp-roles { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }

/* --------------------------------------------------------------------------
   Quatre étapes
   -------------------------------------------------------------------------- */
.emp-timeline { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-5); margin: 0; padding: 0; list-style: none; }
.emp-timeline li { position: relative; padding-top: var(--space-6); }
.emp-timeline li::before { content: ''; position: absolute; top: 20px; right: calc(-1 * var(--space-5)); left: 44px; height: 2px; background: linear-gradient(90deg, var(--primary), var(--primary-soft)); }
.emp-timeline li:last-child::before { display: none; }
.emp-timeline__number { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); font-family: var(--font-heading); font-weight: 800; color: var(--on-primary); }
.emp-timeline h3 { margin: 0 0 var(--space-2); font-size: var(--text-lg); color: var(--primary-deep); }
.emp-timeline p { margin: 0; color: var(--text-secondary); }

@media (max-width: 575.98px) {
    .emp-timeline li::before { display: none; }
}

/* --------------------------------------------------------------------------
   Règles
   -------------------------------------------------------------------------- */
.emp-trust { background: var(--primary-deep); color: var(--on-deep-muted); }
.emp-trust__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.emp-trust__grid article { padding: var(--space-4); border: 1px solid var(--deep-border); border-radius: var(--radius-lg); background: var(--deep-surface); transition: transform var(--transition), border-color var(--transition); }
.emp-trust__grid article:hover { border-color: var(--accent); transform: translateY(-4px); }
.emp-trust__grid h3 { margin: var(--space-3) 0 var(--space-2); font-size: var(--text-lg); color: var(--on-primary); }
.emp-trust__grid p { margin: 0; font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   Questions fréquentes
   -------------------------------------------------------------------------- */
.emp-faq { max-width: 820px; }
.emp-faq__item { border-bottom: 1px solid var(--border); }
.emp-faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) 0; font-family: var(--font-heading); font-weight: 700; color: var(--primary-deep); cursor: pointer; list-style: none; }
.emp-faq__item summary::-webkit-details-marker { display: none; }
.emp-faq__item summary i { flex: 0 0 auto; color: var(--primary); transition: transform var(--transition); }
.emp-faq__item[open] summary i { transform: rotate(45deg); }
.emp-faq__item p { margin: 0 0 var(--space-4); color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Moins de mouvement : tout est affiché, immobile
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .emp-hero__glow,
    .emp-hero__accent,
    .emp-demo__caret,
    .emp-steps-mock span,
    .emp-cards-mock span,
    .emp-flow span.is-accent,
    .emp-board-mock span.is-moving { animation: none; }

    .emp-demo,
    .emp-demo:hover,
    .emp-visual:hover { transform: none; }

    .emp-problem { min-height: 0; }
    .emp-problem__face { position: static; transform: none !important; }
    .emp-problem__face--back { margin-top: var(--space-2); }
}
