/* Accueil uniquement : vitrine des réalisations (.hp-) sur téléphone. Toutes les cartes se parcourent en faisant défiler
   la page ; les filtres sont gérés par home-projects.js. */

/* Ordinateur et tablette : l'animation épinglée « featured-scroll » présente
   les mêmes projets ; cette grille filtrable la remplace sous 761px. */
@media (max-width: 760px) { .featured-scroll-section { display: none !important; } }
@media (min-width: 761px) { body.home-page .home-projects { display: none; } }
body.home-page .hp-anchor { scroll-margin-top: 80px; }

/* Animation épinglée étendue à neuf projets. */
@media (min-width: 761px) {
  body.home-page .featured-scroll-section { min-height: 780vh; }
  body.home-page .featured-slide:not(.is-active) { pointer-events: none; }
  body.home-page .featured-scroll-progress { gap: 8px; }
  body.home-page .featured-scroll-progress span { height: 22px; }
  body.home-page .featured-scroll-progress span.is-active { height: 40px; }
  body.home-page .slide-meta h3 { font-size: clamp(2.4rem, 4.6vw, 5.2rem); line-height: 0.95; letter-spacing: -0.06em; }
  body.home-page .slide-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 14px;
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.4);
    text-underline-offset: 5px;
  }
  body.home-page .slide-link:hover { text-decoration-color: var(--cyan); }
  body.home-page .slide-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
}

body.home-page .home-projects {
  position: relative;
  padding: clamp(72px, 8vw, 120px) clamp(20px, 5vw, 80px);
  color: var(--white);
  background:
    radial-gradient(circle at 82% 6%, rgba(88, 80, 255, 0.16), transparent 34%),
    radial-gradient(circle at 8% 88%, rgba(28, 198, 237, 0.07), transparent 30%),
    linear-gradient(180deg, #030307 0%, #060610 55%, #030307 100%);
}
body.home-page .hp-layout { max-width: 1280px; margin: 0 auto; display: grid; gap: 34px; }
body.home-page .hp-head { min-width: 0; }
body.home-page .hp-head .section-title {
  margin: 10px 0 0;
  font-size: clamp(1.9rem, 3.4vw, 3rem) !important;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
body.home-page .hp-intro { color: var(--muted); line-height: 1.65; margin: 18px 0 0; max-width: 56ch; }

body.home-page .hp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
body.home-page .hp-filter {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
body.home-page .hp-filter:hover { border-color: rgba(255, 255, 255, 0.4); }
body.home-page .hp-filter[aria-pressed="true"] {
  background: linear-gradient(135deg, #5850ff, #7c74ff);
  border-color: transparent;
  color: #fff;
}
body.home-page .hp-filter:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
body.home-page .hp-status-line { margin: 14px 0 0; min-height: 1.4em; color: var(--muted); font-size: 0.85rem; }

body.home-page .hp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
body.home-page .hp-card[hidden],
body.home-page .hp-note[hidden] { display: none !important; }
body.home-page .hp-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
}
body.home-page .hp-card:hover { border-color: rgba(124, 116, 255, 0.55); }
body.home-page .hp-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, rgba(124, 92, 255, 0.16), rgba(10, 8, 28, 0.92) 70%);
}
body.home-page .hp-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 5%;
  box-sizing: border-box;
  transition: transform 0.7s var(--ease-out, ease);
}
body.home-page .hp-card:hover .hp-media img { transform: scale(1.04); }
body.home-page .hp-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 16px; }
body.home-page .hp-meta { display: flex; align-items: baseline; gap: 12px; margin: 0; }
body.home-page .hp-num { color: var(--logada2); font-weight: 800; font-size: 0.85rem; }
body.home-page .hp-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}
body.home-page .hp-card h3,
body.home-page .hp-note h3 { margin: 10px 0 0; font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.01em; }
body.home-page .hp-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.8rem;
  font-weight: 600;
}
body.home-page .hp-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
}
body.home-page .hp-text { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; line-height: 1.6; }
body.home-page .hp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 44px;
  margin-top: auto;
  padding-top: 8px;
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
body.home-page .hp-link span { transition: transform 0.25s var(--ease-out, ease); }
body.home-page .hp-link:hover span { transform: translateX(4px); }
body.home-page .hp-link:hover { color: var(--logada2); }
body.home-page .hp-link:focus-visible,
body.home-page .hp-media:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

body.home-page .hp-note {
  grid-column: 1 / -1;
  border: 1px solid rgba(124, 116, 255, 0.5);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(88, 80, 255, 0.2), rgba(255, 255, 255, 0.04) 62%);
  padding: 28px;
}
body.home-page .hp-note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 22px; }
body.home-page .hp-note-actions .hp-link { margin-top: 0; padding-top: 0; align-self: center; }

body.home-page .hp-in { animation: hp-in 0.45s var(--ease-out, ease) both; }
@keyframes hp-in { from { opacity: 0; } to { opacity: 1; } }

body.home-page .hp-outro-wrap { padding: clamp(56px, 7vw, 96px) clamp(20px, 5vw, 80px); background: #030307; color: var(--white); }
body.home-page .hp-outro { max-width: 720px; margin: 0 auto; text-align: center; }
body.home-page .hp-outro h3 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.02em; }
body.home-page .hp-outro p { margin: 14px auto 26px; color: var(--muted); line-height: 1.6; max-width: 52ch; }

@media (max-width: 760px) {
  body.home-page .home-projects { padding: 64px 20px 72px; }
  body.home-page .hp-layout { gap: 26px; }
  body.home-page .hp-intro { font-size: 0.95rem; line-height: 1.55; }
  body.home-page .hp-filters { margin-top: 20px; }
  body.home-page .hp-filter { padding: 0 15px; }
  body.home-page .hp-media { aspect-ratio: 4 / 3; }
  body.home-page .hp-body { padding: 18px 18px 12px; }
  body.home-page .hp-note { padding: 22px 20px; }
  body.home-page .hp-note-actions .btn { width: 100%; justify-content: center; text-align: center; }
  body.home-page .home-projects { padding-bottom: 8px; }
  body.home-page .hp-outro-wrap { padding: 40px 20px 72px; }
  body.home-page .hp-outro .btn { width: 100%; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  body.home-page .hp-in { animation: none; }
  body.home-page .hp-media img,
  body.home-page .hp-link span { transition: none; }
  body.home-page .hp-card:hover .hp-media img { transform: none; }
}
