/* Café Delyssa · page Carrières
 * Une suite de sections à fonds différents, reliées par des fondus et le filet doré de l'accueil.
 * Mobile d'abord ; deux colonnes à partir de 900 px. Les champs du formulaire viennent de contact.css. */

.carrieres-page { overflow: hidden; }
.carrieres-section { position: relative; padding: clamp(40px, 5vw, 64px) 0; }
.carrieres-section h2 { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.1; }
.carrieres-section .accent, .carrieres-hero .accent { color: var(--or-clair); }

/* ===== Héros : marbre noir, titre en capitales, deux actions ===== */
.carrieres-hero { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--hauteur-nav) + clamp(40px, 6vw, 88px)) 0 clamp(40px, 5vw, 64px); background: var(--noir); }
.carrieres-marbre { position: absolute; inset: 0; z-index: -1; background: url("../images/marbre-vip-QxB5gSA.webp") 70% 50% / cover no-repeat; opacity: .32; filter: brightness(1.2) saturate(.8); -webkit-mask-image: var(--fondu-masque); mask-image: var(--fondu-masque); }
.carrieres-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 9, 6, .92) 0%, rgba(11, 9, 6, .55) 100%), var(--fondu-voile); }
/* Le conteneur garde l'alignement commun aux sections ; seuls les textes sont bornés en largeur */
.carrieres-hero-contenu > * { max-width: 720px; }
.carrieres-hero-grille { display: grid; gap: 40px; align-items: center; }
/* Médaillon à droite du héros : même traitement que l'accueil (halo chocolat, emblème doré qui respire) */
.carrieres-medaillon { position: relative; display: grid; place-items: center; justify-self: center; width: min(360px, 70vw); aspect-ratio: 1; }
.carrieres-medaillon::before {
  content: ""; position: absolute; inset: -18%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(81, 47, 24, .6) 0%, rgba(81, 47, 24, .2) 42%, transparent 70%);
  animation: respiration 9s ease-in-out infinite;
}
.carrieres-medaillon img { position: relative; width: 100%; height: auto; opacity: .92; filter: drop-shadow(0 0 28px rgba(240, 210, 137, .18)); }
@media (min-width: 900px) {
  .carrieres-hero-grille { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; }
  .carrieres-medaillon { width: min(440px, 100%); justify-self: end; }
}
/* Marbre de l'accueil, en fond de section, fondu sur les bords */
.carrieres-section-marbre { isolation: isolate; overflow: hidden; background: var(--noir); }
.carrieres-section-marbre::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../images/marbre-vip-QxB5gSA.webp") center / cover; opacity: .3; filter: brightness(1.2) saturate(.8); -webkit-mask-image: var(--fondu-masque); mask-image: var(--fondu-masque); }
.carrieres-section-marbre::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fondu-voile); }
.carrieres-hero h1 { font-size: clamp(40px, 7vw, 84px); line-height: 1; font-weight: 700; text-transform: uppercase; letter-spacing: -0.015em; margin: 18px 0 24px; text-wrap: balance; }
.carrieres-accroche { font-size: clamp(17px, 2vw, 21px); color: var(--or-pale); max-width: 46ch; }
.carrieres-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ===== Postes : index éditorial numéroté, comme la carte de l'accueil ===== */
.carrieres-titre { margin-bottom: clamp(28px, 4vw, 48px); }
.carrieres-titre h2 { margin-top: 12px; }
.carrieres-vide { color: var(--or-pale); max-width: 60ch; }
/* Sans poste publié : pas de grand bloc vide, seulement la phrase d'accueil */
.carrieres-section-vide { padding-bottom: 0; }
.carrieres-section-vide .carrieres-vide { text-align: center; margin-inline: auto; }
.postes-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ligne); }
.poste-ligne {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 3vw, 40px);
  padding: clamp(24px, 3.5vw, 36px) 0; border-bottom: 1px solid var(--ligne); transition: background .3s;
}
.poste-numero { font: 500 13px/1 var(--police-texte); letter-spacing: .1em; color: var(--or); align-self: start; padding-top: 10px; }
.poste-type { font: 500 11px/1 var(--police-texte); letter-spacing: .2em; text-transform: uppercase; color: var(--or); margin-bottom: 10px; }
.poste-corps h3 { font: 600 clamp(22px, 2.8vw, 30px)/1.2 var(--police-titre); color: var(--creme); margin-bottom: 10px; }
.poste-description { color: var(--or-pale); font-size: 15px; max-width: 62ch; }
.poste-action {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; color: var(--creme);
  font: 600 13px/1 var(--police-texte); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  border-bottom: 1px solid var(--ligne-forte); transition: color .3s, border-color .3s, gap .3s var(--courbe);
}
.poste-ligne:hover .poste-action, .poste-action:focus-visible { color: var(--or-clair); border-color: var(--or-clair); gap: 14px; }
.poste-action:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 4px; }

/* Séparation entre sections : le filet doré de l'accueil, dans un conteneur qui ne le contraint pas */
.carrieres-separation { display: grid; margin-block: -16px; }

/* ===== Confirmation : carte de succès centrée, pastille dorée qui s'anime une fois ===== */
.carrieres-merci-page { min-height: min(100svh, 760px); display: grid; align-items: center; padding-top: calc(var(--hauteur-nav) + 24px); }
.carrieres-succes {
  position: relative; max-width: 640px; margin: 0 auto; text-align: center;
  padding: clamp(36px, 6vw, 64px) clamp(22px, 6vw, 64px); border: 1px solid rgba(224, 193, 81, .38); border-radius: var(--rayon-carte, 6px);
  background: rgba(21, 17, 8, .6);
}
.carrieres-succes::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(224, 193, 81, .14); border-radius: inherit; pointer-events: none; }
.succes-pastille {
  display: inline-grid; place-items: center; width: 84px; height: 84px; margin-bottom: 20px; border-radius: 50%;
  color: var(--or-clair); border: 1px solid var(--ligne-forte); background: radial-gradient(circle, rgba(240, 210, 137, .14), transparent 70%);
  animation: succes-entree .8s var(--courbe) both;
}
.succes-pastille path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: succes-trace .7s .4s ease-out forwards; }
.carrieres-succes h1 { font-size: clamp(36px, 6vw, 56px); margin: 10px 0 14px; }
.succes-texte { color: var(--or-pale); max-width: 44ch; margin: 0 auto; }
.succes-reference { margin-top: 20px; font: 500 13px/1 var(--police-texte); letter-spacing: .16em; text-transform: uppercase; color: var(--or-pale); }
.succes-reference strong { color: var(--or-clair); font-weight: 600; }
.succes-etapes { list-style: none; margin: 28px auto 16px; padding: 0; display: grid; gap: 12px; max-width: 360px; text-align: left; }
.succes-etapes li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: center; color: var(--creme); }
.succes-etapes span { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--ligne-forte); border-radius: 50%; font: 600 13px/1 var(--police-texte); color: var(--or-clair); }
.carrieres-succes .carrieres-actions { justify-content: center; }
@keyframes succes-entree { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: none; } }
@keyframes succes-trace { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) { .carrieres-succes .carrieres-actions .bouton { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .succes-pastille, .succes-pastille path { animation: none; stroke-dashoffset: 0; } }

/* ===== Animations : entrée du héros au chargement, puis apparition au défilement ===== */
@keyframes carrieres-entree { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes carrieres-apparition { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.carrieres-hero .surtitre, .carrieres-hero h1, .carrieres-accroche, .carrieres-actions { animation: carrieres-entree .9s var(--courbe) both; }
.carrieres-hero h1 { animation-delay: .1s; }
.carrieres-accroche { animation-delay: .2s; }
.carrieres-actions { animation-delay: .3s; }
/* Les blocs qui entrent dans l'écran montent doucement ; sans prise en charge, ils restent visibles */
@supports (animation-timeline: view()) {
  .carrieres-titre, .poste-ligne, .carrieres-ecrin, .carrieres-etapes, .carrieres-formulaire-bloc {
    animation: carrieres-apparition linear both; animation-timeline: view(); animation-range: entry 0% cover 35%;
  }
  .poste-ligne:nth-child(2) { animation-range: entry 4% cover 40%; }
  .poste-ligne:nth-child(3) { animation-range: entry 8% cover 42%; }
  .poste-ligne:nth-child(n+4) { animation-range: entry 10% cover 45%; }
}
/* Le survol et le focus des postes restent immédiats */
@media (prefers-reduced-motion: reduce) {
  .carrieres-hero .surtitre, .carrieres-hero h1, .carrieres-accroche, .carrieres-actions,
  .carrieres-titre, .poste-ligne, .carrieres-ecrin, .carrieres-etapes, .carrieres-formulaire-bloc { animation: none; }
}

/* ===== Candidature spontanée : écrin à double filet, centré ===== */
.carrieres-ecrin {
  position: relative; max-width: 880px; margin: 0 auto; text-align: center;
  padding: clamp(40px, 6vw, 72px) clamp(22px, 6vw, 80px); border: 1px solid rgba(224, 193, 81, .38); border-radius: var(--rayon-carte, 6px);
}
.carrieres-ecrin::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(224, 193, 81, .14); border-radius: inherit; pointer-events: none; }
.carrieres-ecrin h2 { margin: 14px 0 16px; text-wrap: balance; }
.carrieres-ecrin p { color: var(--or-pale); max-width: 52ch; margin: 0 auto 28px; }

/* ===== Formulaire : étapes à gauche, champs à droite (une colonne sur mobile) ===== */
.carrieres-candidature { background: linear-gradient(180deg, var(--noir), var(--noir-veine) 18%, var(--noir-veine) 82%, var(--noir)); }
.carrieres-grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); }
/* Rien ne doit sortir de l'écran sur téléphone : champs et fichiers se calent sur la largeur disponible */
.carrieres-page input, .carrieres-page select, .carrieres-page textarea { max-width: 100%; min-width: 0; }
.carrieres-etapes h2 { margin-bottom: 24px; font-size: clamp(24px, 3vw, 32px); }
.carrieres-etapes ol { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 18px; }
.carrieres-etapes li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; color: var(--or-pale); }
.carrieres-etapes li span {
  display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--ligne-forte); border-radius: 50%;
  font: 600 14px/1 var(--police-texte); color: var(--or-clair);
}
.carrieres-formulaire-bloc { min-width: 0; }
.carrieres-formulaire-bloc h2 { margin-bottom: 24px; font-size: clamp(24px, 3vw, 32px); }
.carrieres-page .carrieres-champs > div.champs-deux { display: grid; grid-template-columns: 1fr; gap: 0 18px; margin: 0; }
.carrieres-page .carrieres-champs > div.champs-deux > .champ-moitie { margin-bottom: 18px; }
.carrieres-page .carrieres-champs > div.champ-consentement { display: flex; align-items: flex-start; gap: 12px; }
.carrieres-champs .champ-consentement input[type="checkbox"] { order: -1; flex: 0 0 auto; width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--or); cursor: pointer; }
.carrieres-champs .champ-consentement label { font-size: 15px; font-weight: 400; line-height: 1.5; cursor: pointer; }
.carrieres-champs input[type="file"] { color: var(--or-pale); font-size: 14px; padding: 12px 0; min-height: 44px; }
.carrieres-champs input[type="file"]::file-selector-button {
  margin-right: 14px; padding: 10px 16px; min-height: 44px; border: 1px solid var(--ligne-forte); border-radius: 6px;
  background: transparent; color: var(--or-clair); cursor: pointer; font: inherit;
}
.carrieres-champs input[type="file"]:focus-visible { outline: 2px solid var(--or-clair); outline-offset: 4px; }
.carrieres-champs .actions-etape { margin-top: 8px; }
.carrieres-champs .actions-etape .bouton { width: 100%; justify-content: center; min-height: 52px; }
/* Lisibilité des champs sur fond noir veiné */
.carrieres-champs input:not([type="checkbox"]):not([type="file"]), .carrieres-champs select, .carrieres-champs textarea { min-height: 48px; }

/* ===== Écrans moyens et grands ===== */
@media (min-width: 720px) {
  .carrieres-page .carrieres-champs > div.champs-deux { grid-template-columns: 1fr 1fr; }
  .carrieres-page .carrieres-champs > div.champs-deux > .champ-moitie:last-child { grid-column: 1 / -1; max-width: 50%; }
}
@media (min-width: 900px) {
  .carrieres-grille { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
  .carrieres-etapes { position: sticky; top: calc(var(--hauteur-nav) + 32px); }
  .carrieres-page .carrieres-champs > div.champs-deux > .champ-moitie:last-child { max-width: none; grid-column: auto; }
}

/* ===== Téléphone : index des postes en pile, actions pleine largeur ===== */
@media (max-width: 640px) {
  .poste-ligne { grid-template-columns: 1fr; gap: 14px; }
  .poste-numero { padding-top: 0; }
  .poste-action { justify-content: flex-start; }
  .carrieres-actions .bouton { width: 100%; justify-content: center; }
  .carrieres-ecrin .bouton { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .poste-action { transition: none; }
}
