/* =========================================================
 *  swaks.org — pages projets (/projects/*.html et /fr/projects/*.html)
 *  S'appuie sur assets/site.css (palette, polices, barre d'icônes).
 * ========================================================= */

html, body.page { background: var(--cream); }
body.page {
  min-height: 100vh;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  line-height: 1.75;
}

/* ---- Barre du haut ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  background: color-mix(in srgb, var(--cream) 86%, transparent);
  backdrop-filter: blur(8px);
}
.page #socials { position: static; }
.home-link {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe-text);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-smooth);
}
.home-link:hover { color: var(--mauve); }

/* ---- Contenu ---- */
.project { max-width: 760px; margin: 0 auto; padding: 4rem 1.6rem 4rem; }
.project > * { animation: rise 0.9s var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.kicker {
  margin-bottom: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe-text);
}
.project h1 {
  margin-bottom: 1.4rem;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(44px, 9vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.project h1 span { color: var(--mauve); }
.lead {
  max-width: 40em;
  margin-bottom: 1.8rem;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--muted);
}

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1.8rem; }
.chip {
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--mauve-soft);
  border-radius: 99px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mauve-text);
}
.meta .gh-stats { margin: 0 0 0 0.4rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 3rem; }
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-smooth), border-color var(--dur-micro) var(--ease-smooth),
              transform var(--dur-micro) var(--ease-smooth);
}
.btn:hover { color: var(--mauve); border-color: var(--mauve); transform: translateY(-2px); }
.btn.primary { background: var(--mauve); border-color: var(--mauve); color: var(--cream); }
.btn.primary:hover { color: var(--cream); }

.shot { margin-bottom: 3.5rem; }
.shot img, .gallery img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--parchment);
}

.project section { margin-bottom: 2.8rem; }
.project h2 {
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe-text);
}
.project section p,
.project section li { font-size: clamp(15px, 1.5vw, 17px); }
.project section p { margin-bottom: 0.9rem; }
.project section ul { list-style: none; }
.project section li { position: relative; margin-bottom: 0.7rem; padding-left: 1.3rem; }
.project section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mauve);
}

/* ---- Page « À propos » : expériences et formations ---- */
.entry { margin-bottom: 1.6rem; }
.entry h3 { font-size: clamp(15px, 1.5vw, 17px); font-weight: 700; line-height: 1.5; }
.entry-meta { margin: 0.1rem 0 0.5rem !important; font-size: 0.72rem !important; letter-spacing: 0.08em; text-transform: uppercase; color: var(--taupe-text); }
.org, .more { color: var(--mauve-text); text-decoration: none; transition: color var(--dur-micro) var(--ease-smooth); }
.org:hover, .more:hover { color: var(--mauve); text-decoration: underline; }
.btn.soon { border-style: dashed; color: var(--taupe-text); cursor: var(--default); }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 3.5rem; }
.gallery img { border-radius: 8px; }
.gallery img:last-child:nth-child(odd) { grid-column: 1 / -1; } /* nombre impair : la dernière prend toute la largeur */

/* ---- Navigation entre projets ---- */
.next {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.next a { color: var(--text); text-decoration: none; }
.next small {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe-text);
}
.next strong {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1;
  transition: color var(--dur-micro) var(--ease-smooth);
}
.next a:hover strong { color: var(--mauve); }
.next .to-next { text-align: right; }
.next .to-all strong { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; }

.page-footer {
  padding: 2.5rem 1rem 2.5rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--taupe-text);
}
.page-footer a { color: inherit; text-decoration: none; transition: color var(--dur-micro) var(--ease-smooth); }
.page-footer a:hover { color: var(--mauve); }

@media (max-width: 600px) {
  .topbar { padding: 1rem 1.2rem; }
  .project { padding: 2.5rem 1.2rem 3rem; }
  .gallery { grid-template-columns: 1fr; }
}

/* ---- Page d'installation (/kleaner/) : page produit, hero centré puis une colonne ---- */
.install { max-width: 880px; margin: 0 auto; padding: 2.5rem 1.6rem 4rem; }
.install > * { animation: rise 0.9s var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 90ms); }
.install h2 {
  margin-bottom: 1.2rem;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.1;
  color: var(--text);
  text-wrap: balance;
}

.i-hero { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; padding: 1rem 0 3rem; text-align: center; }
.i-logo {
  width: 84px;
  height: 84px;
  background: var(--mauve);
  -webkit-mask: url(/img/kleaner-logo.svg) center / contain no-repeat;
  mask: url(/img/kleaner-logo.svg) center / contain no-repeat;
}
.install h1 {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(56px, 11vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.i-kicker {
  display: block;
  margin-top: 0.9rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mauve-text);
}
.i-tagline { max-width: 28em; margin-bottom: 0.8rem; font-size: clamp(18px, 2.4vw, 23px); color: var(--muted); text-wrap: balance; }
.btn.dl-big { padding: 1rem 2rem; font-size: 1rem; }
.dl-meta { font-size: 0.8rem; letter-spacing: 0.02em; color: var(--taupe-text); font-variant-numeric: tabular-nums; }
.dl-alt { font-size: 0.85rem; color: var(--mauve-text); text-decoration: none; }
.dl-alt:hover { color: var(--mauve); text-decoration: underline; }

.install .shot { margin-bottom: 4rem; }

.i-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem 2.4rem; margin-bottom: 4rem; }
.i-point h3 { margin-bottom: 0.4rem; font-size: 1rem; font-weight: 700; color: var(--text); }
.i-point h3::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0.6rem 0.15em 0; border-radius: 50%; background: var(--mauve); }
.i-point p { font-size: 0.92rem; line-height: 1.65; color: var(--muted); }

.i-cleans { margin-bottom: 3.5rem; }
.i-cleans ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem 2.4rem; list-style: none; }
.i-cleans li { position: relative; padding-left: 1.3rem; font-size: 0.95rem; color: var(--muted); }
.i-cleans li::before { content: '✓'; position: absolute; left: 0; font-weight: 700; color: var(--mauve-text); }

.i-steps { margin-bottom: 3.5rem; }
.i-steps ol { display: grid; gap: 1rem; list-style: none; counter-reset: step; }
.i-steps li { display: grid; grid-template-columns: 2.4rem 1fr; align-items: baseline; counter-increment: step; font-size: 1rem; }
.i-steps li::before {
  content: counter(step);
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--mauve);
}

.i-faq { margin-bottom: 3.5rem; }
.i-faq details + details { margin-top: 0.2rem; }
.i-faq summary { padding: 0.6rem 0; font-weight: 600; cursor: var(--pointer); }
.i-faq summary:hover { color: var(--mauve); }
.i-faq details p { padding: 0 0 1rem; font-size: 0.95rem; line-height: 1.65; color: var(--muted); }

.i-feedback { margin-bottom: 3.5rem; scroll-margin-top: 7rem; } /* sous la barre du haut, qui reste fixe */
.i-sub { margin: -0.4rem 0 1.4rem; color: var(--muted); }
.i-bye {
  margin: -0.2rem 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  background: var(--mauve-soft);
  color: var(--text);
}
.i-form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 620px; }
.i-types { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; border: 0; }
.i-types legend { float: left; margin-right: 0.4rem; font-size: 0.85rem; color: var(--taupe-text); }
.i-types label { cursor: var(--pointer); }
.i-types input { position: absolute; opacity: 0; pointer-events: none; }
.i-types span {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color var(--dur-micro) var(--ease-smooth), border-color var(--dur-micro) var(--ease-smooth);
}
.i-types label:hover span { border-color: var(--mauve); }
.i-types input:checked + span { border-color: var(--mauve); background: var(--mauve-soft); color: var(--text); font-weight: 600; }
.i-types input:focus-visible + span { outline: 2px solid var(--mauve); outline-offset: 2px; }
.i-form .field { display: flex; flex-direction: column; }
.i-form textarea, .i-form input[type="email"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--parchment);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: box-shadow var(--dur-micro) var(--ease-smooth), background var(--dur-micro) var(--ease-smooth);
}
.i-form textarea::placeholder, .i-form input::placeholder { color: var(--faint); }
.i-form textarea:focus, .i-form input[type="email"]:focus { background: var(--field-focus); box-shadow: 0 0 0 2px var(--mauve-soft); }
.i-form .invalid { box-shadow: 0 0 0 2px var(--mauve); }
.i-form .field-error { height: 0; overflow: hidden; opacity: 0; font-size: 0.75rem; color: var(--mauve-text); transition: opacity var(--dur-micro); }
.i-form .field-error.visible { height: auto; margin-top: 0.35rem; opacity: 1; }
.i-form .btn { align-self: flex-start; cursor: var(--pointer); font-family: inherit; }
.i-form .btn:disabled { opacity: 0.7; cursor: var(--default, default); transform: none; }
.i-github { margin-top: 1.2rem; font-size: 0.88rem; color: var(--muted); }
.i-github a { color: var(--mauve-text); text-decoration: none; }
.i-github a:hover { text-decoration: underline; }

.i-versions summary { width: fit-content; font-size: 0.88rem; color: var(--mauve-text); cursor: var(--pointer); }
.i-versions summary:hover { color: var(--mauve); }
.i-versions ul { margin-top: 0.6rem; list-style: none; }
.i-versions li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
  padding: 0.55rem 0;
  font-size: 0.85rem;
}
.i-versions a { color: var(--mauve-text); text-decoration: none; }
.i-versions a:hover { text-decoration: underline; }
.dl-tag { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.dl-badge {
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--mauve-soft);
  border-radius: 99px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mauve-text);
}
.dl-badge.pre { border-color: var(--border); color: var(--taupe-text); }
.dl-date { color: var(--taupe-text); font-variant-numeric: tabular-nums; }
.dl-links { display: flex; gap: 0.9rem; margin-left: auto; }
.i-more { margin-top: 2.5rem; font-size: 0.85rem; }
.i-more a { color: var(--taupe-text); text-decoration: none; }
.i-more a:hover { color: var(--mauve); }

@media (max-width: 700px) {
  .i-points, .i-cleans ul { grid-template-columns: 1fr; gap: 1.4rem; }
  .i-cleans ul { gap: 0.6rem; }
}
@media (max-width: 600px) {
  .install { padding: 1.5rem 1.2rem 3rem; }
  .dl-links { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .install > * { animation: none; }
}
