/* Homo Habilis — additions to the mockup stylesheet (style.css) for the real site */

/* Language switch: links to /fr/… and /en/… instead of the mockup's buttons */
.lang-switch a {
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
}
.lang-switch a[aria-current="true"] { background: var(--ink); color: var(--bg); }
html[data-style="territoire"] .lang-switch a { color: var(--dark-soft); font-family: var(--font-display); letter-spacing: 0.08em; }
html[data-style="territoire"] .lang-switch a[aria-current="true"] { background: var(--dark-ink); color: var(--dark); }

/* No more mockup style switch at the bottom of the page */
html:not(.is-shot) .footer-bottom { padding-bottom: 0; }

/* Project page without a gallery yet: the text block alone */
.project-body--text { grid-template-columns: minmax(0, 760px); }
.project-body--text .project-aside { position: static; }
.project-text p { margin: 0 0 1em; }

/* Contact form */
.form-alert { grid-column: 1 / -1; margin: 0; color: #a3341c; font-weight: 500; }
.field-error { margin: 6px 0 0; font-size: 0.85rem; color: #a3341c; }
.form--sent { align-content: start; }
.form--sent .form-msg { font-size: 1.15rem; }

/* Plain text pages (legal notice, privacy) */
.prose { max-width: 760px; font-size: 1.02rem; line-height: 1.65; }
.prose h2 { margin: 1.6em 0 0.5em; font-family: var(--font-display); font-weight: 500; }

/* Main image that is a plan or drawing: shown whole, on white */
.project-hero.is-plate { background: #fff; }
.project-hero.is-plate img { object-fit: contain; }

/* Agency page: two people with full bios, side by side (the logo's two hands) */
.team--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px); }
.team--duo .portrait { aspect-ratio: 16 / 9; }
html[data-style="territoire"] .team--duo .portrait .hand { width: auto; height: 74%; }
.member .bio { margin-top: 14px; max-width: 62ch; }
.member .bio p { margin: 0 0 0.9em; font-size: 0.98rem; line-height: 1.62; color: var(--ink-soft); }
@media (max-width: 760px) { .team--duo { grid-template-columns: 1fr; } }

/* Agency page: the approach in full, two steps per row */
.steps--full { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: clamp(36px, 5vw, 64px); }
.steps--full .step p { max-width: 60ch; font-size: 1rem; line-height: 1.62; }
.step p + p { margin-top: 0.8em; }
@media (max-width: 760px) { .steps--full { grid-template-columns: 1fr; } }

/* Links on the dark approach band */
html[data-style="territoire"] .section--steps .link-arrow { color: var(--accent-light); }
html[data-style="territoire"] .section--steps .link-arrow:hover { color: var(--dark-ink); }

/* Home: the agency's presentation, just under the photo; its last paragraph is the signature */
.home-intro-text { max-width: 48rem; }
.home-intro-text p {
  margin: 0;
  font-size: clamp(1.15rem, 1.9vw, 1.45rem);
  line-height: 1.55;
  color: var(--ink);
}
.home-intro-text p + p { margin-top: 0.85em; }
.home-intro-text p:last-child:not(:first-child) {
  margin-top: 1.3em;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent);
}

/* Approach steps: pictogram and title on one line (no step numbers) */
.step-head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.step-head .step-picto { flex: none; margin-bottom: 0; }
.step-head h3 { margin: 0; }

/* Agency page: a drawing is shown whole; multiply blends its white paper into the page */
.wide-image.is-drawing { aspect-ratio: auto; overflow: visible; border-radius: 0; background: none; }
.wide-image.is-drawing img { height: auto; object-fit: contain; mix-blend-mode: multiply; }
@media (max-width: 760px) { .wide-image.is-drawing { aspect-ratio: auto; } }

/* Logo redrawn by the agency with their own hand prints (2026-12-02): proportions of the
   new masks in static/img/logo/ (hands 735 × 420, wordmark 1365 × 120) */
.logo-hands { aspect-ratio: 735 / 420; }
.logo-word { aspect-ratio: 1365 / 120; }
html[data-style="territoire"] .cta-band::before { aspect-ratio: 735 / 420; }
html[data-style="territoire"] .portrait .hand { aspect-ratio: 367.5 / 420; }
@media (max-width: 760px) { html[data-style="territoire"] .nav::after { aspect-ratio: 735 / 420; } }

/* Project video (drone footage), above the photos */
.project-video { margin: 0; }
.project-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: #1f231c;
}

/* =========================================================
   Motion requested by the agency (2026-12-02): project slideshow, panoramas panned on
   hover, pictograms that sway. Everything stays still when the visitor's system asks for
   reduced motion.
   ========================================================= */

/* ---------- Project slideshow (replaces the photo grid) ---------- */
.project-media { display: grid; gap: var(--gap); min-width: 0; }
.slides {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-panel);
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 0s linear 1s;
}
.slide.is-active { opacity: 1; visibility: visible; transition: opacity 1s ease; }
.slide button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.slide button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide--pano img { object-position: 50% 50%; } /* panned by motion.js */
.slide--plate { background: #fff; }
.slide--plate img { box-sizing: border-box; padding: 3%; object-fit: contain; }

.slideshow-bar { display: flex; align-items: flex-start; gap: 18px; margin-top: 12px; }
.ss-caption { flex: 1; min-width: 0; margin: 4px 0 0; font-size: 0.86rem; line-height: 1.45; color: var(--ink-soft); }
.ss-controls { display: flex; align-items: center; gap: 6px; flex: none; }
.ss-controls > button {
  all: unset;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.ss-controls > button:hover { background: var(--bg-panel); color: var(--accent); }
.ss-controls > button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ss-controls svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ss-toggle .i-play { fill: currentColor; stroke: none; }
.ss-toggle .i-play, .ss-toggle[aria-pressed="true"] .i-pause { display: none; }
.ss-toggle[aria-pressed="true"] .i-play { display: block; }
.ss-dots { display: flex; gap: 5px; padding: 0 4px; }
.ss-dots button { all: unset; display: block; padding: 10px 0; cursor: pointer; }
.ss-dots span {
  position: relative;
  display: block;
  width: 22px;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.ss-dots i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.ss-dots [aria-current="true"] i { transform: scaleX(1); }
.ss-dots button:focus-visible span { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 560px) {
  .slideshow-bar { flex-direction: column; gap: 6px; }
  .ss-controls { align-self: flex-end; }
}

/* ---------- Pictograms: a gentle sway, like a sign painted on a moving branch ---------- */
@keyframes picto-sway {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-8deg); }
  75% { transform: rotate(8deg); }
}
.picto { transform-origin: 50% 65%; transition: color 0.35s ease; }
.tile a:hover .tile-picto .picto,
.domain:hover .domain-picto .picto,
.step:hover .step-picto .picto,
.tag:hover .picto,
.filter-btn:hover .picto,
.picto-legend li:hover .picto { animation: picto-sway 1.8s ease-in-out infinite; }
.tile-picto, .domain-picto, .picto-legend-sign { transition: background 0.35s ease, color 0.35s ease; }
html[data-style="territoire"] .tile a:hover .tile-picto,
html[data-style="territoire"] .domain:hover .domain-picto,
.picto-legend li:hover .picto-legend-sign { background: var(--accent-light); color: var(--dark); }
html[data-style="territoire"] .step:hover .step-picto { color: var(--dark-ink); }
html[data-style="territoire"] .filter-btn:hover .picto { color: var(--accent-light); }

/* ---------- Projects page: legend of the combined signs ---------- */
.picto-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin: 18px 0 4px; }
.picto-legend-title { margin: 0; font-size: 0.84rem; color: var(--ink-soft); }
.picto-legend ul { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.picto-legend li { display: flex; align-items: center; gap: 9px; font-size: 0.84rem; color: var(--ink); }
.picto-legend-sign {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--dark-ink);
}
.picto-legend-sign .picto { width: 19px; height: 19px; }

@media (prefers-reduced-motion: reduce) {
  .picto { animation: none !important; }
  .slide, .slide.is-active { transition: none; }
}

/* Phones: "all projects" on its own line, previous / next side by side below it
   (long project names no longer squeeze into narrow columns) */
@media (max-width: 560px) {
  .project-nav { grid-template-columns: 1fr 1fr; align-items: start; row-gap: 20px; }
  .project-nav .all { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .project-nav .prev, .project-nav .next { grid-row: 2; }
}
