/* ============================================
   PAGE /recrutement/ — Recrutement
   ============================================ */

/* ===== Hero : la marque reste sur une seule ligne ===== */

.nr-hero__brand {
  white-space: nowrap;
}

/* Sous 480px, le titre est réduit pour que « Iroise Aéro Formation. »
   tienne sur une ligne sans déborder de la gouttière. */
@media (max-width: 480px) {
  .nr-hero .page-hero__title {
    font-size: clamp(1.4rem, 6.8vw, 2rem);
    max-width: none;
  }
}


/* ===== Cartes « Pourquoi rejoindre Iroise Aéro Formation » ===== */

.nr-raisons-grid {
  list-style:  none;
  padding:     0;
  margin:      0;
  display:     grid;
  gap:         var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .nr-raisons-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nr-card {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-3);
  padding:        var(--space-6) var(--space-5);
  background:     var(--color-bg);
  border:         1px solid var(--color-border);
  border-radius:  var(--radius-lg, 16px);
  transition:     transform var(--duration-base) var(--ease-out),
                  border-color var(--duration-base) var(--ease-out),
                  box-shadow var(--duration-base) var(--ease-out);
}

.nr-card:hover {
  transform:    translateY(-3px);
  border-color: var(--color-iroise-cyan);
  box-shadow:   0 14px 32px rgba(0, 80, 168, 0.08);
}

.nr-card__icon {
  width:           56px;
  height:          56px;
  border-radius:   14px;
  display:         flex;
  align-items:     center;
  justify-content: center;
  background:      var(--color-iroise-blue-soft);
  color:           var(--color-iroise-blue);
  flex-shrink:     0;
}

.nr-card__title {
  font-family:    var(--font-display);
  font-size:      var(--fs-xl);
  font-weight:    var(--fw-bold);
  line-height:    var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color:          var(--color-iroise-blue);
  margin:         0;
}

.nr-card__lead {
  font-size:   var(--fs-md);
  line-height: var(--lh-relaxed);
  color:       var(--color-text);
  margin:      0;
}


/* ===== Liste « Nos métiers » ===== */

.nr-metiers-list {
  list-style: none;
  padding:    0;
  margin:     0 auto;
  max-width:  52rem;
  display:    grid;
  gap:        var(--space-4);
}

.nr-metier {
  display:               grid;
  grid-template-columns: auto 1fr;
  gap:                   var(--space-4);
  align-items:           start;
  padding:               var(--space-5);
  background:            var(--color-bg);
  border:                1px solid var(--color-border);
  border-radius:         var(--radius-lg, 16px);
}

.nr-metier__num {
  font-family:    var(--font-mono);
  font-size:      var(--fs-sm);
  letter-spacing: var(--tracking-wider);
  color:          var(--color-iroise-cyan);
  padding-top:    0.35em;
}

.nr-metier__title {
  font-family:    var(--font-display);
  font-size:      var(--fs-lg);
  font-weight:    var(--fw-bold);
  line-height:    var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color:          var(--color-iroise-blue);
  margin:         0 0 var(--space-2);
}

.nr-metier__lead {
  font-size:   var(--fs-md);
  line-height: var(--lh-relaxed);
  color:       var(--color-text);
  margin:      0;
}


/* ===== Postes ouverts ===== */

.nr-postes-empty {
  max-width:     40rem;
  margin:        0 auto;
  padding:       var(--space-6) var(--space-5);
  text-align:    center;
  border:        1px dashed var(--color-border);
  border-radius: var(--radius-lg, 16px);
  background:    var(--color-bg);
}

.nr-postes-empty__title {
  font-family:    var(--font-display);
  font-size:      var(--fs-lg);
  font-weight:    var(--fw-bold);
  letter-spacing: var(--tracking-tight);
  color:          var(--color-iroise-blue);
  margin:         0 0 var(--space-2);
}

.nr-postes-empty__lead {
  font-size:   var(--fs-md);
  line-height: var(--lh-relaxed);
  color:       var(--color-text-muted);
  margin:      0;
}

.nr-postes-grid {
  list-style:  none;
  padding:     0;
  margin:      0;
  display:     grid;
  gap:         var(--space-5);
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .nr-postes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nr-poste {
  display:        flex;
  flex-direction: column;
  gap:            var(--space-3);
  padding:        var(--space-6) var(--space-5);
  background:     var(--color-bg);
  border:         1px solid var(--color-border);
  border-top:     3px solid var(--color-iroise-cyan);
  border-radius:  var(--radius-lg, 16px);
}

.nr-poste__meta {
  font-family:    var(--font-mono);
  font-size:      var(--fs-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color:          var(--color-text-muted);
  margin:         0;
}

.nr-poste__title {
  font-family:    var(--font-display);
  font-size:      var(--fs-xl);
  font-weight:    var(--fw-bold);
  line-height:    var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color:          var(--color-iroise-blue);
  margin:         0;
}

.nr-poste__lead {
  font-size:   var(--fs-md);
  line-height: var(--lh-relaxed);
  color:       var(--color-text);
  margin:      0;
}

.nr-poste__btn {
  align-self: flex-start;
  margin-top: var(--space-2);
}

/* Un seul poste : carte centrée, largeur lisible. */
.nr-postes-grid--single {
  grid-template-columns: 1fr;
  max-width: 44rem;
  margin: 0 auto;
}


/* ===== Formulaire de candidature : fenêtre modale (#postuler) ===== */

.nr-modal {
  border:     0;
  padding:    0;
  background: transparent;
  width:      min(44rem, calc(100vw - 2rem));
  max-width:  none;
  max-height: none;
  margin:     auto;
  color:      var(--color-text);
}

.nr-modal::backdrop {
  background: rgba(10, 30, 70, 0.62);
}

.nr-modal__box {
  position:      relative;
  background:    var(--color-bg);
  border-radius: var(--radius-lg, 16px);
  padding:       var(--space-7) var(--space-5) var(--space-6);
  max-height:    calc(100vh - 2rem);
  max-height:    calc(100dvh - 2rem);
  overflow-y:    auto;
  box-shadow:    0 30px 80px rgba(0, 20, 60, 0.35);
}

@media (min-width: 640px) {
  .nr-modal__box {
    padding: var(--space-7) var(--space-7) var(--space-7);
  }
}

.nr-modal[open] {
  animation: nr-modal-in 260ms var(--ease-out) both;
}

@keyframes nr-modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.nr-modal__close {
  position:        absolute;
  top:             var(--space-4);
  right:           var(--space-4);
  width:           40px;
  height:          40px;
  display:         inline-flex;
  align-items:     center;
  justify-content: center;
  border:          1px solid var(--color-border);
  border-radius:   999px;
  background:      var(--color-bg);
  color:           var(--color-iroise-blue);
  cursor:          pointer;
  transition:      background var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.nr-modal__close:hover,
.nr-modal__close:focus-visible {
  background:   var(--color-iroise-blue-soft);
  border-color: var(--color-iroise-blue);
}

.nr-modal__header {
  margin-bottom: var(--space-5);
  padding-right: var(--space-8);
}

.nr-modal__title {
  font-family:    var(--font-display);
  font-size:      clamp(1.5rem, 4vw, var(--fs-2xl));
  font-weight:    var(--fw-bold);
  line-height:    var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color:          var(--color-iroise-blue);
  margin:         0 0 var(--space-3);
}

.nr-modal__lead {
  font-size:   var(--fs-md);
  line-height: var(--lh-relaxed);
  color:       var(--color-text);
  margin:      0;
}

.nr-candidature__notice {
  font-size:     var(--fs-sm);
  line-height:   var(--lh-relaxed);
  color:         var(--color-text);
  margin:        0 0 var(--space-4);
  padding:       var(--space-4) var(--space-5);
  background:    var(--color-iroise-blue-soft);
  border-left:   3px solid var(--color-iroise-cyan);
  border-radius: var(--radius-md, 0.5rem);
}

.nr-modal .btn:disabled,
.nr-modal .btn[aria-busy="true"] {
  opacity:    0.55;
  cursor:     not-allowed;
  transform:  none;
  box-shadow: none;
}

.nr-modal .iroise-form-status[hidden] {
  display: none;
}

.nr-modal .iroise-form-status {
  margin-bottom: var(--space-5);
}

/* Page figée pendant que la fenêtre est ouverte (posé par le JS). */
body.nr-modal-open {
  overflow: hidden;
}

/* Sans JS : l'ancre #postuler affiche la fenêtre dans le flux de la page. */
.nr-modal:target:not([open]) {
  display: block;
  position: static;
  margin:   var(--space-6) auto;
}

@media (prefers-reduced-motion: reduce) {
  .nr-modal[open] { animation: none; }
}


/* ===== Galerie ===== */

.nr-galerie-grid {
  list-style:  none;
  padding:     0;
  margin:      0;
  display:     grid;
  gap:         var(--space-4);
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .nr-galerie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap:                   var(--space-5);
  }
}

@media (min-width: 1024px) {
  .nr-galerie-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nr-galerie-item picture {
  display:       block;
  aspect-ratio:  3 / 2;
  overflow:      hidden;
  border-radius: var(--radius-lg, 16px);
  background:    var(--color-iroise-blue-soft);
}

.nr-galerie-img {
  display:    block;
  width:      100%;
  height:     100%;
  object-fit: cover;
  transition: transform var(--duration-slow, 0.6s) var(--ease-out);
}

.nr-galerie-item:hover .nr-galerie-img {
  transform: scale(1.04);
}


/* ===== Stagger des reveals ===== */

.nr-raisons-grid  > .reveal:nth-child(1),
.nr-metiers-list  > .reveal:nth-child(1),
.nr-postes-grid   > .reveal:nth-child(1),
.nr-galerie-grid  > .reveal:nth-child(1) { --reveal-delay:   0ms; }
.nr-raisons-grid  > .reveal:nth-child(2),
.nr-metiers-list  > .reveal:nth-child(2),
.nr-postes-grid   > .reveal:nth-child(2),
.nr-galerie-grid  > .reveal:nth-child(2) { --reveal-delay:  80ms; }
.nr-raisons-grid  > .reveal:nth-child(3),
.nr-metiers-list  > .reveal:nth-child(3),
.nr-postes-grid   > .reveal:nth-child(3),
.nr-galerie-grid  > .reveal:nth-child(3) { --reveal-delay: 160ms; }
.nr-postes-grid   > .reveal:nth-child(4),
.nr-galerie-grid  > .reveal:nth-child(4) { --reveal-delay: 240ms; }
.nr-galerie-grid  > .reveal:nth-child(5) { --reveal-delay: 320ms; }
.nr-galerie-grid  > .reveal:nth-child(6) { --reveal-delay: 400ms; }
.nr-galerie-grid  > .reveal:nth-child(7) { --reveal-delay: 480ms; }
.nr-galerie-grid  > .reveal:nth-child(8) { --reveal-delay: 560ms; }
.nr-galerie-grid  > .reveal:nth-child(9) { --reveal-delay: 640ms; }


/* ===== Reduced motion ===== */

@media (prefers-reduced-motion: reduce) {
  .nr-card,
  .nr-galerie-img {
    transition: none;
  }
  .nr-card:hover {
    transform: none;
  }
  .nr-galerie-item:hover .nr-galerie-img {
    transform: none;
  }
}
