/* ==================================================================
   ACCUEIL
   ================================================================== */
/* ==================================================================
   ACCUEIL — HERO
   ================================================================== */
.hero { position: relative; padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem); overflow: hidden; }
/* grille de papier calque, discrète, uniquement derrière le hero */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(var(--cabinet) 1px, transparent 1px),
    linear-gradient(90deg, var(--cabinet) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 92%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,.65), transparent 92%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: var(--fs-hero); margin-bottom: 1.5rem; }
.hero h1 .line { display: block; }
.hero-role { font-size: var(--fs-lg); font-weight: 600; margin-bottom: .75rem; font-stretch: 105%; }
.hero-pitch { color: var(--ink-2); max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-status {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.75rem;
  padding: .35rem .8rem .35rem .55rem; border: 1px solid var(--rule); border-radius: 99px; background: var(--sheet);
  font-size: var(--fs-sm); font-weight: 500;
}
.led { width: 10px; height: 10px; border-radius: 50%; background: var(--run); box-shadow: 0 0 0 3px var(--run-soft); flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .led--blink { animation: led 2.4s steps(1) infinite; }
  @keyframes led { 0%, 70% { opacity: 1; } 71%, 100% { opacity: .35; } }
}

.hero-grafcet {
  margin: 0;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg);
  padding: 1.5rem 1.5rem 1.25rem; box-shadow: var(--shadow-lift);
}
.hero-grafcet figcaption { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 1.1rem; }
.hero-grafcet figcaption strong { color: var(--ink); font-weight: 650; font-size: var(--fs-sm); }

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

/* ==================================================================
   CARROUSEL
   ================================================================== */
.slideshow { position: relative; }
.slides {
  position: relative; aspect-ratio: 16 / 7; overflow: hidden;
  border-radius: var(--r-lg); background: var(--cabinet);
}
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility .9s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: no-preference) {
  .slide img { transform: scale(1.04); transition: transform 6s linear; }
  .slide.is-active img { transform: scale(1); }
}
.slide figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  background: var(--sheet); border-radius: var(--r-md); padding: .5rem .85rem;
  font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lift);
}
.slide figcaption span { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }

.slide-controls { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.slide-btn {
  width: 42px; height: 42px; display: grid; place-items: center; flex: none;
  border: var(--line) solid var(--ink); border-radius: 50%; background: var(--sheet); cursor: pointer;
}
.slide-btn:hover { background: var(--ink); color: var(--sheet); }
.slide-btn svg { width: 18px; height: 18px; }
.slide-dots { display: flex; gap: 6px; flex: 1; }
.slide-dot {
  position: relative; flex: 1; height: 22px; padding: 0; border: 0; background: none; cursor: pointer;
}
.slide-dot::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--rule); border-radius: 2px; }
.slide-dot i { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; width: 0; background: var(--ink); border-radius: 2px; }
.slide-dot.is-past i { width: 100%; }
.slide-dot.is-active i { width: 100%; background: var(--signal); }
.slideshow.is-playing .slide-dot.is-active i { animation: fill var(--slide-ms, 5000ms) linear forwards; background: var(--ink); }
@keyframes fill { from { width: 0; } to { width: 100%; } }
.slide-count { font-size: var(--fs-sm); color: var(--ink-2); min-width: 4.5ch; text-align: right; }
.slide-toggle { width: 42px; height: 42px; }

@media (max-width: 700px) {
  .slides { aspect-ratio: 4 / 3; }
  .slide-dots { display: none; }
  .slide-controls { justify-content: space-between; }
}

/* ==================================================================
   ACCUEIL — compétences (bornier) et projets
   ================================================================== */
.terminal {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden;
}
.terminal-cell { position: relative; padding: 1.75rem 1.5rem 1.5rem; border-left: 1px solid var(--rule); display: flex; flex-direction: column; text-decoration: none; transition: background-color .15s; }
.terminal-cell:first-child { border-left: 0; }
.terminal-cell:hover { background: var(--cabinet-2); }
.terminal-cell h3 { font-size: var(--fs-xl); font-stretch: 118%; font-weight: 750; margin-bottom: .6rem; }
.terminal-cell p { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: 1.5rem; }
.terminal-cell .meter { margin-top: auto; flex-direction: column; align-items: flex-start; gap: .45rem; }
.meter { display: flex; align-items: center; gap: .75rem; font-size: var(--fs-xs); color: var(--ink-2); }
.meter-cells { display: flex; gap: 3px; }
.meter-cells i { width: 10px; height: 14px; border: 1px solid var(--ink-3); border-radius: 1px; background: var(--sheet); }
.meter-cells i.on { background: var(--signal); border-color: var(--ink); }
.meter-cells i.next { background: repeating-linear-gradient(135deg, var(--cabinet) 0 2px, var(--sheet) 2px 4px); }
@media (max-width: 960px) {
  .terminal { grid-template-columns: repeat(2, 1fr); }
  .terminal-cell:nth-child(3) { border-left: 0; }
  .terminal-cell:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 560px) {
  .terminal { grid-template-columns: 1fr; }
  .terminal-cell { border-left: 0; }
  .terminal-cell + .terminal-cell { border-top: 1px solid var(--rule); }
}

/* Liste de projets (lignes, pas de cartes) */
.index-list { list-style: none; border-top: var(--line) solid var(--ink); }
.index-item a {
  display: grid; grid-template-columns: 9rem minmax(0,1fr) auto; gap: 1.5rem; align-items: center;
  padding: 1.25rem .25rem; border-bottom: 1px solid var(--rule); text-decoration: none;
  transition: background-color .15s, padding .2s var(--ease);
}
.index-item a:hover { background: var(--sheet); padding-inline: .75rem; }
.index-ctx { font-size: var(--fs-sm); color: var(--ink-3); }
.index-title { font-size: var(--fs-lg); font-weight: 650; font-stretch: 108%; }
.index-title small { display: block; font-size: var(--fs-sm); font-weight: 400; color: var(--ink-2); font-stretch: 100%; margin-top: .15rem; }
.index-arrow { width: 22px; height: 22px; transition: transform .2s var(--ease); }
.index-item a:hover .index-arrow { transform: translateX(4px); }
@media (max-width: 700px) {
  .index-item a { grid-template-columns: 1fr auto; gap: .25rem 1rem; }
  .index-ctx { grid-column: 1; }
  .index-title { grid-column: 1; }
  .index-arrow { grid-row: 1 / span 2; grid-column: 2; }
}

/* Bloc mis en avant (stage) */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden;
}
.feature-media { position: relative; min-height: 320px; background: var(--cabinet); }
.feature-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: clamp(1.75rem, 4vw, 3rem); display: flex; flex-direction: column; gap: 1rem; }
.feature-body h3 { font-size: clamp(1.6rem, 1.1rem + 1.3vw, 2.1rem); font-stretch: 112%; font-weight: 750; line-height: 1.1; }
.feature-body p { color: var(--ink-2); margin: 0; }
.feature-body .btn { align-self: flex-start; margin-top: .5rem; }
.week-strip { display: flex; gap: 4px; margin-top: .25rem; }
.week-strip span { flex: 1; height: 8px; border-radius: 2px; background: var(--cabinet); position: relative; }
.week-strip span.on { background: var(--ink); }
.week-strip span.last { background: var(--signal); }
@media (max-width: 800px) { .feature { grid-template-columns: 1fr; } .feature-media { min-height: 220px; } }

.links-row { display: flex; flex-wrap: wrap; gap: .75rem 2rem; }


/* ---------- Bloc « stage recherché » ---------- */
a.hero-status { text-decoration: none; transition: border-color .15s, background-color .15s; }
a.hero-status:hover { border-color: var(--ink-3); }
a.hero-status svg { width: 15px; height: 15px; color: var(--ink-3); transition: transform .2s var(--ease); }
a.hero-status:hover svg { transform: translateY(2px); color: var(--ink); }

.hero + .section#stage-recherche { padding-top: 0; }
#stage-recherche + .section { padding-top: clamp(3.5rem, 8vw, 6.5rem); }
.recruit {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border: var(--line) solid var(--ink); border-radius: var(--r-lg); background: var(--sheet); overflow: hidden;
  box-shadow: 8px 8px 0 var(--signal);
}
.recruit-main { padding: clamp(1.5rem, 3.5vw, 2.5rem); display: flex; flex-direction: column; gap: 1rem; }
.recruit-kicker { display: inline-flex; align-items: center; gap: .55rem; margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--run-ink); }
.recruit h2 { font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem); font-stretch: 115%; font-weight: 780; letter-spacing: -.02em; line-height: 1.08; max-width: 18ch; }
.recruit-main > p { margin: 0; color: var(--ink-2); max-width: 54ch; }
.recruit-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }
.recruit-actions [hidden] { display: none; }
.recruit-specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; border-left: 1px solid var(--rule); background: var(--paper); }
.recruit-specs > div { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--rule); }
.recruit-specs > div:nth-child(2) { border-left: 1px solid var(--rule); }
.recruit-specs > div.wide { grid-column: 1 / -1; }
.recruit-specs > div:last-child { border-bottom: 0; }
.recruit-specs dt { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: .3rem; }
.recruit-specs dd { margin: 0; font-weight: 650; font-size: var(--fs-md); }
.recruit-specs dd.tags { gap: .35rem; font-weight: 600; }
@media (max-width: 860px) {
  .recruit { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--signal); }
  .recruit-specs { border-left: 0; border-top: 1px solid var(--rule); }
}
