/* Réalisations : ce qui n'appartient qu'à cette page. Le socle (lockpit.css)
   et pilier.css fournissent le reste. Ici : le héros éditorial et ses filtres,
   le bento des projets avec leur barre de navigateur, la tuile d'appel, les
   trois familles. */

/* ---------- HÉROS ÉDITORIAL ---------- */
.hero-travaux {
  position: relative;
  overflow: clip;
  padding: 150px max(20px, calc((100vw - 1240px) / 2)) 40px;
}
.hero-travaux .titre-masque {
  max-width: 11em;
}
.hero-travaux .lead {
  max-width: 34em;
}
.hero-travaux .halo {
  inset: -30% -10% auto auto;
  width: 60%;
  height: 120%;
  opacity: 0.6;
}

/* Les filtres : des pilules, une seule active */
.filtres {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
}
.filtres button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font: 600 15px "DM Sans";
  cursor: pointer;
  transition: background 0.4s var(--ressort), color 0.4s var(--ressort), border-color 0.4s var(--ressort), transform 0.4s var(--ressort);
}
.filtres button small {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.07);
  font: 600 12px "JetBrains Mono";
  transition: background 0.4s var(--ressort);
}
.filtres button:hover {
  border-color: var(--ink);
}
.filtres button:active {
  transform: scale(0.97);
}
.filtres button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.filtres button[aria-pressed="true"] small {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- LE BENTO DES PROJETS ---------- */
.projets-section {
  padding-top: 40px;
}
.projets {
  display: grid;
  gap: 40px 22px;
}
.projet {
  margin: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.7s var(--ressort), opacity 0.6s var(--ressort);
}
.projet:hover {
  transform: translateY(-8px);
}
.projet.efface {
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}
.projet[hidden] {
  display: none;
}
.projet .cadre {
  --rayon: 26px;
  --bord: 7px;
}
.projet .coeur {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 10;
}
.projet .coeur img,
.projet .coeur picture {
  flex: 1;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.projet .coeur picture img {
  width: 100%;
}
.projet .ouvrir {
  display: block;
  color: inherit;
  text-decoration: none;
}
/* La barre de navigateur, dessinée : trois points, l'adresse en mono */
.barre {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: linear-gradient(#fbfaf7, #f2f0eb);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}
.barre i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.14);
}
.barre span {
  flex: 1;
  margin-left: 8px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(17, 24, 39, 0.05);
  color: var(--muted);
  font: 500 11px "JetBrains Mono";
  letter-spacing: 0.02em;
  text-align: center;
}
.barre.appli span {
  background: none;
  text-align: left;
  margin-left: 4px;
}
.projet figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 18px;
}
.projet figcaption .pill {
  align-self: flex-start;
  margin-bottom: 8px;
}
.projet figcaption b {
  font: 700 clamp(22px, 2.2vw, 28px) "Bricolage Grotesque";
  letter-spacing: -0.03em;
}
.projet figcaption small {
  color: var(--muted);
  font-size: 14px;
}
.projet figcaption p {
  margin: 8px 0 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 16px;
}

/* Le téléphone : un portrait posé sur un fond doux */
.projet.portrait .coeur {
  align-items: center;
  justify-content: flex-end;
  padding: 26px 0 0;
  background: linear-gradient(160deg, #e9eeff, #f6f7fb);
}
.projet.portrait .coeur img {
  flex: none;
  width: 42%;
  height: auto;
  max-height: 92%;
  object-fit: cover;
  object-position: top;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px -10px rgba(17, 24, 39, 0.3);
}

/* La tuile d'appel, en encre */
.projet-appel {
  --rayon: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 18px;
  min-height: 320px;
  padding: 36px;
  border-radius: var(--rayon);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  transition: background 0.5s var(--ressort), transform 0.7s var(--ressort);
}
.projet-appel:hover {
  background: var(--blue);
  transform: translateY(-8px);
}
.projet-appel b {
  max-width: 10em;
  font: 700 clamp(30px, 3.2vw, 44px) / 1 "Bricolage Grotesque";
  letter-spacing: -0.04em;
}
.projet-appel span {
  max-width: 26em;
  color: rgba(248, 246, 241, 0.7);
}
.projet-appel i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-style: normal;
  font-size: 20px;
  transition: transform 0.5s var(--ressort);
}
.projet-appel:hover i {
  transform: rotate(-45deg);
}
.projets-vide {
  display: none;
  margin: 0;
  color: var(--muted);
}
.projets.vide + .projets-vide {
  display: block;
}

/* ---------- TROIS FAMILLES ---------- */
.familles {
  display: grid;
  gap: 18px;
}
.famille {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 30px 30px 28px;
  border-radius: 26px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06), var(--ombre-douce);
  transition: transform 0.7s var(--ressort), box-shadow 0.7s var(--ressort);
}
.famille:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08), var(--ombre-portee);
}
.famille .pill {
  align-self: flex-start;
}
.famille b {
  margin-top: 8px;
  font: 700 clamp(24px, 2.4vw, 30px) / 1.05 "Bricolage Grotesque";
  letter-spacing: -0.035em;
}
.famille p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.famille i {
  position: absolute;
  right: 22px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.06);
  font-style: normal;
  transition: background 0.5s var(--ressort), color 0.5s var(--ressort), transform 0.5s var(--ressort);
}
.famille:hover i {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-45deg);
}

/* ---------- Réactif ---------- */
@media (min-width: 700px) {
  .projets {
    grid-template-columns: repeat(12, 1fr);
  }
  .p-7 { grid-column: span 7; }
  .p-6 { grid-column: span 6; }
  .p-5 { grid-column: span 5; }
  .p-4 { grid-column: span 4; }
  .familles {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 980px) {
  .hero-travaux {
    padding-top: 170px;
  }
}
@media (max-width: 699px) {
  .projet.portrait .coeur img {
    width: 56%;
  }
  .projet-appel {
    min-height: 240px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .projet,
  .projet-appel,
  .projet-appel i,
  .famille,
  .famille i,
  .filtres button {
    transition: none;
  }
}
