/********************
 GENERAL
*********************/

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  position: relative;
}

html {
  --green-300: #9da583;
  --green: #848f60;
  --green-500: #667046;
  --red: #724646;
  --grey: #3c3c3b;
  --maroon: #684729;
  --white: #ffffff;
  --black: #0b0b0b;
  --ink: #181818;
  /* 1 unit = 1px of the 1920x1080 desktop mockups */
  --u: 1px; /* Large desktop, see the steps below */
  --burns: "Burns", sans-serif;
  --small-hmargin: 20px;
  --medium-hmargin: 40px;
  --large-hmargin: 80px;
  --xlarge-hmargin: 180px;
  --small-vmargin: 40px;
  --medium-vmargin: 80px;
  --large-vmargin: 120px;
  --xlarge-vmargin: 180px;
}

@media screen and (max-width: 1200px) {
  html {
    --small-hmargin: 20px;
    --medium-hmargin: 40px;
    --large-hmargin: 60px;
    --xlarge-hmargin: 120px;
    --small-vmargin: 40px;
    --medium-vmargin: 60px;
    --large-vmargin: 80px;
    --xlarge-vmargin: 120px;
  }
}

@media screen and (max-width: 1199px) {
  html {
    --small-hmargin: 20px;
    --medium-hmargin: 30px;
    --large-hmargin: 40px;
    --xlarge-hmargin: 80px;
    --small-vmargin: 20px;
    --medium-vmargin: 40px;
    --large-vmargin: 60px;
    --xlarge-vmargin: 80px;
  }
}

@media screen and (max-width: 500px) {
  html {
    --small-hmargin: 20px;
    --medium-hmargin: 20px;
    --large-hmargin: 20px;
    --xlarge-hmargin: 40px;
    --small-vmargin: 20px;
    --medium-vmargin: 20px;
    --large-vmargin: 40px;
    --xlarge-vmargin: 80px;
  }
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

a:active,
a.active {
  color: var(--green);
}

a.active {
  text-decoration: none;
}

.protect {
  pointer-events: none;
}

div {
  align-items: start;
}

.hidden-title {
  position: fixed;
  pointer-events: none;
  opacity: 0;
  right: 200vw;
  bottom: 200vh;
}

img {
  display: block;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-track-piece {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--green);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-300);
}

::-webkit-scrollbar-thumb:active {
  background: var(--green-500);
}

::-webkit-scrollbar-corner {
  background: var(--white);
}

/********************
 FONTS
*********************/

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Hairline.woff2") format("woff2");
  font-weight: 50;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Thin.woff2") format("woff2");
  font-weight: 100;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-ExtraLight.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Bold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-ExtraBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Black.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: fallback;
}

@font-face {
  font-family: "Burns";
  src: url("../fonts/TWKBurns-Ultra.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: fallback;
}

/* 1 unit = 1px of the 390px wide mobile mockups */
/* Fixed steps: sizes only change when crossing one of these limits.
   The heights keep the desktop pages within the screen. */
@media (max-width: 1919px), (max-height: 999px) {
  html {
    --u: 0.85px; /* Desktop */
  }
}

@media (max-width: 1439px), (max-height: 819px) {
  html {
    --u: 0.7px; /* Laptop */
  }
}

@media (max-height: 679px) {
  html {
    --u: 0.6px; /* Short laptop */
  }
}

@media (max-width: 1199px) {
  html {
    --u: 1.6px; /* Tablet */
  }
}

/* Mobile, and tablet sizes too short for the menu, like a phone held sideways */
@media (max-width: 767px), (max-width: 1199px) and (max-height: 599px) {
  html {
    --u: 1px;
  }
}

@media (max-width: 359px) {
  html {
    --u: 0.85px; /* Very small phones */
  }
}

/********************
 TITLES AND TEXTS
*********************/

body {
  font-family: var(--burns);
  font-size: 0.8rem;
  color: var(--ink);
}

p {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: normal;
}

h1,
.h1,
h1 p,
.h1 p {
}

h2,
.h2,
h2 p,
.h2 p {
}

h3,
.h3,
h3 p,
.h3 p {
}

@media screen and (max-width: 1500px) {
  h1,
  .h1,
  h1 p,
  .h1 p {
  }
}

@media screen and (max-width: 1200px) {
  h1,
  .h1,
  h1 p,
  .h1 p {
  }
}

@media screen and (max-width: 1199px) {
  h1,
  .h1,
  h1 p,
  .h1 p {
  }
}

@media screen and (max-width: 500px) {
  h1,
  .h1,
  h1 p,
  .h1 p {
  }
}

::selection {
  background: var(--green);
  color: var(--maroon);
}

/********************
 COMMONS
*********************/

/* BTN */
.btn {
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: max-content;
  white-space: nowrap;
  overflow: hidden;
  max-width: 100%;
  min-width: min(100%, 200px);
  text-overflow: ellipsis;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 9000px;
  background-color: var(--green);
  color: var(--white);
  border: 1px solid var(--green);
  padding: 12px 30px;
  font-size: inherit;
  line-height: inherit;
  outline: none;
  transition:
    background-color 0.2s ease-in-out,
    color 0.2s ease-in-out,
    border-color 0.2s ease-in-out,
    filter 0.2s ease-in-out;
}

.btn p {
  margin: 0 !important;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  width: max-content;
  text-overflow: ellipsis;
}

.btn.locked {
  pointer-events: none;
  filter: grayscale(1);
  opacity: 0.6;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: underline;
}

.btn:active {
  color: var(--white);
  background-color: var(--green-500);
  border-color: var(--green-500);
}

.btn.small {
  font-size: 0.8rem;
  min-width: unset;
  padding: 5px 10px;
}

.btn svg {
  display: inline-block;
  height: 0.9rem;
  width: auto;
}

.btn.small svg {
  height: 0.7rem;
}

.btn svg path {
  fill: currentColor;
  transition: fill 0.2s ease-in-out;
}

/* PRELOADER */

.preloader {
  display: block;
  height: 5px;
  width: 100%;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  margin-top: 20px;
}

.preloader > span {
  position: absolute;
  animation: none;
  width: 100%;
  height: 100%;
  left: -100%;
  border-radius: 3px;
  background-color: var(--green);
}

.preloader.active > span {
  animation: preloader 1s linear 0s infinite normal forwards;
}

@keyframes preloader {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* BOUNCE */

.bounce {
  animation-name: bounce;
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.4);
  animation-iteration-count: 1;
}

@keyframes bounce {
  0% {
    transform: scale(1);
  }
  20% {
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.2);
  }
  0% {
    transform: scale(1);
  }
}

/* WAVE */

.wave {
  animation-name: wave;
  animation-duration: 1.1s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes wave {
  0% {
    transform: translateY(-2px);
  }
  50% {
    transform: translateY(2px);
  }
  100% {
    transform: translateY(-2px);
  }
}

/********************
 HEADER
*********************/
#head {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(40 * var(--u)) calc(50 * var(--u)) calc(16 * var(--u));
  gap: calc(40 * var(--u));
  z-index: 100;
  font-weight: 600;
  background-color: var(--white);
}

#head > div {
  display: flex;
  align-items: center;
  gap: calc(25 * var(--u));
  font-size: calc(31 * var(--u));
  line-height: 1;
}

#head > a {
  font-size: calc(70.5 * var(--u));
  line-height: 1;
  letter-spacing: -0.02em;
}

#mobile_bar {
  display: none;
}

/********************
 MOBILE HEADER
*********************/
#burger {
  position: fixed;
  top: calc(23 * var(--u));
  right: calc(15 * var(--u));
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: calc(34 * var(--u));
  height: calc(28 * var(--u));
  z-index: 103;
  cursor: pointer;
}

/* A larger area to tap than the icon itself */
#burger::before {
  content: "";
  position: absolute;
  inset: calc(-10 * var(--u));
}

#burger > span {
  display: block;
  width: 100%;
  height: calc(3 * var(--u));
  background-color: var(--ink);
  transition:
    transform 0.2s ease-in-out,
    opacity 0.2s ease-in-out;
}

#burger.active > span:nth-child(1) {
  transform: translateY(calc(12.5 * var(--u))) rotate(45deg);
}

#burger.active > span:nth-child(2) {
  opacity: 0;
}

#burger.active > span:nth-child(3) {
  transform: translateY(calc(-12.5 * var(--u))) rotate(-45deg);
}

#head_mobile {
  display: none;
  background-color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  transition: transform 0.2s ease-in-out;
  pointer-events: none;
  transform: translateY(-100%);
  flex-direction: column;
  padding: calc(72 * var(--u)) calc(12 * var(--u)) calc(19 * var(--u));
  width: 100%;
  z-index: 101;
}

#head_mobile.active {
  transform: translateY(0);
  pointer-events: all;
  box-shadow: 0 calc(8 * var(--u)) calc(24 * var(--u)) rgba(0, 0, 0, 0.15);
}

#head_mobile a {
  display: block;
  width: 100%;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  font-size: calc(32 * var(--u));
  line-height: calc(38 * var(--u));
  height: calc(38 * var(--u));
  border-bottom: calc(3 * var(--u)) solid var(--ink);
}

#head_mobile a:hover,
#head_mobile a.active {
  text-decoration: none;
}

#head_mobile a:active,
#head_mobile a.active {
  background-color: var(--green);
  color: var(--ink);
}

@media screen and (max-width: 1199px) {
  #head {
    display: none;
  }
  #mobile_bar {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: calc(16 * var(--u)) calc(20 * var(--u)) calc(8 * var(--u));
    background-color: var(--white);
    z-index: 102;
    font-weight: 600;
    font-size: calc(46.5 * var(--u));
    line-height: 1;
    letter-spacing: -0.02em;
  }
  #burger,
  #head_mobile {
    display: flex;
  }
}

/********************
 CALL TO ACTION (MOBILE)
*********************/
#cta {
  display: none;
}

@media screen and (max-width: 1199px) {
  #cta {
    display: block;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 90;
    padding: calc(15 * var(--u));
    background-color: var(--green);
    color: var(--white);
    text-align: center;
    font-weight: 500;
    font-size: calc(21 * var(--u));
    line-height: calc(26 * var(--u));
  }
  #cta:active {
    color: var(--white);
    background-color: var(--green-500);
  }
  .has-cta {
    padding-bottom: calc(56 * var(--u));
  }
}

/********************
 PAGE
*********************/
.page {
  min-height: 100vh;
  width: 100%;
}

.page-title {
  font-weight: 500;
  font-size: calc(64 * var(--u));
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
}

.mobile-only {
  display: none;
}

@media screen and (max-width: 1199px) {
  .mobile-only {
    display: block;
  }
  .desktop-only {
    display: none;
  }
  .page {
    max-width: 992px;
    margin-inline: auto;
  }
  /* Both: on body alone, it would apply to the viewport, and a phone would zoom out to show what is outside */
  html,
  body {
    overflow-x: clip;
  }
  .page-title {
    font-weight: 600;
    font-size: calc(26 * var(--u));
  }
}

/********************
 INDEX
*********************/
.index {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.index-back {
  text-align: center;
  color: var(--ink);
  opacity: 0.75;
  position: absolute;
  top: calc(50% + 16 * var(--u));
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 900;
  font-size: calc(401 * var(--u));
  line-height: 0.8;
  z-index: 1;
}

.index-image {
  position: absolute;
  object-fit: cover;
  transition:
    width 0.2s ease-in-out,
    height 0.2s ease-in-out;
}

.index-image-link:focus-visible .index-image {
  outline: calc(3 * var(--u)) solid var(--green);
}

.index-image-saw,
.index-image-axel {
  z-index: 1;
  width: calc(258 * var(--u));
  height: calc(387 * var(--u));
}

.index-image-bench {
  z-index: 3;
  width: calc(260 * var(--u));
  height: calc(390 * var(--u));
}

.index-image-saw {
  top: calc(50% - 243 * var(--u));
  left: calc(50 * var(--u));
}

.index-image-axel {
  top: calc(50% - 240 * var(--u));
  right: calc(52 * var(--u));
}

.index-image-bench {
  bottom: calc(50% - 437 * var(--u));
  right: calc(50% - 322 * var(--u));
}

@media (hover: hover) and (min-width: 1200px) {
  /* Each image goes with a menu link: hovering one highlights the other */
  .index-image-saw:hover,
  .index-image-axel:hover,
  .index-image-bench:hover,
  body:has(#head a[href="/prestations"]:hover) .index-image-saw,
  body:has(#head a[href="/realisations"]:hover) .index-image-bench,
  body:has(#head a[href="/a-propos"]:hover) .index-image-axel {
    /* The script in index.php changes these values while the image stays enlarged */
    width: calc(var(--enlarged-width, 420) * var(--u));
    height: calc(var(--enlarged-height, 630) * var(--u));
    z-index: 4;
  }
  body:has(.index-image-saw:hover) #head a[href="/prestations"],
  body:has(.index-image-bench:hover) #head a[href="/realisations"],
  body:has(.index-image-axel:hover) #head a[href="/a-propos"] {
    text-decoration: underline;
  }
}

.index-band {
  position: absolute;
  top: calc(50% + 40 * var(--u));
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  overflow: hidden;
  z-index: 2;
}

.band-track {
  display: flex;
  align-items: center;
  gap: calc(120 * var(--u));
  width: max-content;
}

.band-logo {
  text-align: center;
  font-weight: 900;
  font-size: calc(42 * var(--u));
  line-height: 0.8;
}

.band-strong {
  text-align: center;
  font-weight: 900;
  font-size: calc(48 * var(--u));
  line-height: 1;
}

.band-info {
  font-weight: 600;
  font-size: calc(21 * var(--u));
  line-height: 1;
}

.band-info span {
  font-size: 0.5em;
}

.index-link {
  position: absolute;
  width: calc(128 * var(--u));
  z-index: 2;
}

.index-link .page-title {
  display: block;
  white-space: nowrap;
  margin-bottom: calc(6 * var(--u));
}

.index-link img,
.index-link-dock {
  display: block;
  width: 100%;
  height: calc(207 * var(--u));
  object-fit: cover;
}

@media screen and (max-width: 1199px) {
  /* Its elements are placed for this width: a centered column */
  .index {
    max-width: calc(390 * var(--u));
    height: calc(1770 * var(--u));
    min-height: 0;
    margin-top: calc(-28 * var(--u));
    overflow: visible;
  }
  .index-back {
    top: calc(419 * var(--u));
    font-size: calc(192 * var(--u));
    /* --back-shift comes from the script in index.php: the letters scroll slower than the page */
    transform: translate(-50%, calc(-50% + var(--back-shift, 0px)));
  }
  /* The band stays on the screen, behind the content */
  .index-band {
    position: fixed;
    top: min(calc(404 * var(--u)), 55svh);
    left: 0;
    width: 100%;
  }
  .band-track {
    gap: calc(57 * var(--u));
  }
  .band-logo {
    font-size: calc(21 * var(--u));
  }
  .band-strong {
    font-size: calc(23 * var(--u));
  }
  .band-info {
    font-size: calc(9.5 * var(--u));
  }
  /* Their position while scrolling comes from the script in index.php */
  .index-image {
    transition: none;
  }
  .index-image-saw {
    top: calc(113 * var(--u));
    left: auto;
    right: calc(20 * var(--u));
    width: calc(128 * var(--u));
    height: calc(208 * var(--u));
    z-index: 3;
  }
  .index-image-axel {
    top: calc(549 * var(--u));
    right: auto;
    left: calc(20 * var(--u));
    width: calc(187 * var(--u));
    height: calc(249 * var(--u));
    z-index: 3;
  }
  .index-image-bench {
    display: none;
  }
  .index-link-prestations {
    top: calc(1010 * var(--u));
    right: calc(40 * var(--u));
  }
  /* Above the images passing by, unlike the 2 titles going under their own image */
  .index-link-realisations {
    top: calc(1162 * var(--u));
    left: calc(20 * var(--u));
    z-index: 4;
  }
  .index-link-apropos {
    top: calc(1334 * var(--u));
    right: calc(20 * var(--u));
    z-index: 4;
  }
  .index-link-contact {
    top: calc(1466 * var(--u));
    left: calc(20 * var(--u));
  }
}

/********************
 REVIEWS
*********************/
.reviews {
  position: absolute;
  z-index: 4;
  right: calc(52 * var(--u));
  bottom: calc(50% - 477 * var(--u));
  width: calc(417 * var(--u));
  font-size: max(11px, calc(12 * var(--u)));
  line-height: 1.25;
  /* Only the cards and arrows catch the mouse, not the empty space around a short card */
  pointer-events: none;
}

.review,
.reviews-link,
.reviews-nav {
  pointer-events: auto;
}

.review,
.reviews-link {
  background-color: var(--white);
  border-radius: calc(10 * var(--u));
  box-shadow: 0 calc(8 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, 0.12);
}

.reviews-link {
  display: block;
  padding: calc(16 * var(--u));
  text-align: center;
  font-weight: 500;
  font-size: calc(18 * var(--u));
}

/* The cards share one grid cell: the carousel keeps the height of the tallest one, and each card its own */
.reviews-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  touch-action: pan-y;
  user-select: none;
}

.reviews-track.can-drag .review {
  cursor: grab;
}

.reviews-track.dragging .review {
  cursor: grabbing;
}

.review {
  grid-area: 1 / 1;
  align-self: center;
  display: flex;
  gap: calc(16 * var(--u));
  /* Keeps the text clear of the arrows */
  padding: calc(16 * var(--u)) calc(22 * var(--u));
  opacity: 0;
  visibility: hidden;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease,
    visibility 0.4s;
}

.review:first-child {
  opacity: 1;
  visibility: visible;
}

.reviews-track.dragging .review {
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .review {
    transition: none;
  }
}

.review-main {
  flex: 1;
  min-width: 0;
}

.review-head {
  display: flex;
  align-items: center;
  gap: calc(8 * var(--u));
}

.review-avatar {
  flex: none;
  width: calc(28 * var(--u));
  height: calc(28 * var(--u));
  border-radius: 50%;
  object-fit: cover;
}

.review-author {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-author strong {
  font-weight: 600;
}

.review-date {
  color: #757575;
}

.review-google {
  flex: none;
}

.review-google img {
  width: calc(24 * var(--u));
  height: calc(24 * var(--u));
}

.review-stars {
  color: #fbbc04;
  font-size: calc(17 * var(--u));
  line-height: 1;
  letter-spacing: 0.08em;
  margin: calc(8 * var(--u)) 0;
}

.review-stars-empty {
  color: #dadce0;
}

.review-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.review-more {
  display: inline-block;
  margin-top: calc(4 * var(--u));
  font-weight: 500;
}

.review-more[hidden] {
  display: none;
}

.reviews-nav {
  position: absolute;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(36 * var(--u));
  height: calc(36 * var(--u));
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 calc(2 * var(--u)) calc(8 * var(--u)) rgba(0, 0, 0, 0.2);
  transition: background-color 0.15s ease;
}

/* Only with a mouse: on a touch screen the hover state would stay after the tap */
@media (hover: hover) {
  .reviews-nav:hover {
    background-color: #dcdcdc;
  }
}

.reviews-nav svg {
  width: 65%;
  height: 65%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.reviews-nav:active {
  color: var(--green);
}

.reviews-prev {
  left: calc(-18 * var(--u));
}

.reviews-next {
  right: calc(-18 * var(--u));
}

@media screen and (max-width: 1199px) {
  .reviews {
    right: calc(20 * var(--u));
    bottom: auto;
    top: calc(814 * var(--u));
    left: calc(20 * var(--u));
    width: auto;
  }
  .review {
    padding-left: calc(28 * var(--u));
    padding-right: calc(28 * var(--u));
  }
  .reviews-prev {
    left: calc(-12 * var(--u));
  }
  .reviews-next {
    right: calc(-12 * var(--u));
  }
}

/********************
 SPLIT PAGES (PRESTATIONS, ABOUT)
*********************/
.split {
  /* Square image: half of the width at most, and no taller than the space under the header.
     Below 280px, the page scrolls. */
  --split-image: max(
    280px,
    min(calc(100vh - 194 * var(--u)), calc((100vw - 150 * var(--u)) / 2))
  );
  display: grid;
  min-height: 0;
  column-gap: calc(50 * var(--u));
  padding: calc(144 * var(--u)) calc(50 * var(--u)) calc(50 * var(--u));
}

.split-image {
  grid-area: image;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.prestations {
  grid-template-columns: var(--split-image) 1fr;
  grid-template-areas:
    "image title"
    "image list"
    "image action";
  grid-template-rows: auto 1fr auto;
}

.prestations .page-title {
  grid-area: title;
  margin-bottom: calc(46 * var(--u));
}

.prestation-list {
  grid-area: list;
}

.prestation:not(.editable_model) + .prestation {
  margin-top: calc(40 * var(--u));
}

.prestation h2 {
  font-weight: 500;
  font-size: calc(64 * var(--u));
  line-height: calc(65 * var(--u));
}

/* Direct child: the page editor writes a paragraph inside the title it edits */
.prestation > p {
  margin-top: calc(6 * var(--u));
  font-weight: 500;
  font-size: calc(20 * var(--u));
  line-height: 1.1;
  text-transform: uppercase;
}

.prestations-action {
  grid-area: action;
  justify-self: center;
  font-weight: 500;
  font-size: calc(48 * var(--u));
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
}

.about {
  grid-template-columns: 1fr var(--split-image);
  grid-template-areas:
    "text image"
    "values image"
    "credits image";
  grid-template-rows: 1fr auto auto;
}

.about-text {
  grid-area: text;
}

.ruled {
  --line: calc(27 * var(--u));
  margin: 0 0 var(--line);
  font-weight: 500;
  font-size: calc(32 * var(--u));
  line-height: var(--line);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(var(--line) - 2 * var(--u)),
    var(--ink) calc(var(--line) - 2 * var(--u)),
    var(--ink) var(--line),
    transparent var(--line),
    transparent var(--line)
  );
}

.about-values {
  grid-area: values;
}

.about-value:not(.editable_model) + .about-value {
  margin-top: calc(26 * var(--u));
}

.about-value h2 {
  font-weight: 500;
  font-size: calc(32 * var(--u));
  line-height: calc(30 * var(--u));
}

/* Direct child: the page editor writes a paragraph inside the title it edits */
.about-value > p {
  max-width: calc(740 * var(--u));
  font-weight: 500;
  font-size: calc(24 * var(--u));
  line-height: calc(20 * var(--u));
}

.about-credits {
  grid-area: credits;
  display: flex;
  justify-content: space-between;
  gap: calc(20 * var(--u));
  margin-top: calc(120 * var(--u));
  font-size: calc(15 * var(--u));
  line-height: 1;
}

@media screen and (max-width: 1199px) {
  .split {
    grid-template-columns: 1fr;
    padding: calc(80 * var(--u)) calc(20 * var(--u)) calc(76 * var(--u));
  }
  .split-image {
    margin-bottom: calc(30 * var(--u));
  }
  /* The image takes the height left by the texts, down to the call to action.
     Below 280px for the image, the page scrolls. */
  .prestations {
    height: max(100svh, calc(465 * var(--u) + 280px));
    grid-template-areas:
      "title"
      "image"
      "list";
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .prestations .split-image {
    height: calc(100% - 30 * var(--u));
    aspect-ratio: auto;
  }
  .prestations .page-title,
  .about .page-title {
    margin-bottom: calc(14 * var(--u));
  }
  .prestation:not(.editable_model) + .prestation {
    margin-top: calc(26 * var(--u));
  }
  .prestation h2 {
    font-size: calc(26 * var(--u));
    line-height: calc(23 * var(--u));
  }
  .prestation > p {
    margin-top: calc(3 * var(--u));
    font-size: calc(9.5 * var(--u));
  }
  .prestations-action {
    display: none;
  }
  .about {
    grid-template-areas:
      "title"
      "image"
      "text"
      "values"
      "credits";
    grid-template-rows: none;
  }
  .about .page-title {
    grid-area: title;
    position: static;
    opacity: 1;
    pointer-events: auto;
  }
  .ruled {
    --line: calc(15 * var(--u));
    font-size: calc(16.2 * var(--u));
  }
  .ruled {
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent calc(var(--line) - 1 * var(--u)),
      var(--ink) calc(var(--line) - 1 * var(--u)),
      var(--ink) var(--line),
      transparent var(--line),
      transparent var(--line)
    );
  }
  .about .split-image {
    min-height: 280px;
    max-height: 55svh;
  }
  .about-values {
    margin-top: calc(30 * var(--u));
  }
  .about-value:not(.editable_model) + .about-value {
    margin-top: calc(22 * var(--u));
  }
  .about-value h2 {
    font-size: calc(18 * var(--u));
    line-height: calc(17 * var(--u));
  }
  .about-value > p {
    max-width: none;
    font-size: calc(13 * var(--u));
    line-height: calc(12 * var(--u));
  }
  .about-credits {
    margin-top: calc(40 * var(--u));
    font-size: calc(10 * var(--u));
  }
}

/********************
 REALISATIONS
*********************/
.realisations {
  padding: calc(254 * var(--u)) calc(50 * var(--u)) calc(50 * var(--u));
}

.filters {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.25em;
  margin-bottom: calc(43 * var(--u));
  font-weight: 500;
  font-size: calc(47 * var(--u));
  line-height: calc(48 * var(--u));
}

.filter,
.filters-clear {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.filter:hover,
.filters-clear:hover {
  text-decoration: underline;
}

.filter:active,
.filter.active,
.filters-clear:active {
  color: var(--green);
}

.filter.active {
  text-decoration: none;
}

.filter-item:not(:last-of-type)::after {
  content: " —";
}

/* Hidden without collapsing, so the grid does not jump when a filter is selected */
.filters-clear {
  margin-left: auto;
  visibility: hidden;
}

.filters-clear.visible {
  visibility: visible;
}

.works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(50 * var(--u));
}

.work {
  aspect-ratio: 418 / 294;
  background-color: #d9d9d9;
}

.work.hidden {
  display: none;
}

.work-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  outline: none;
  cursor: zoom-in;
}

.work img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The page behind stays where it is */
html:has(.lightbox[open]) {
  overflow: hidden;
}

/* No display here: a closed dialog has to stay hidden */
.lightbox {
  --lightbox-button: calc(72 * var(--u));
  --lightbox-margin-x: calc(120 * var(--u));
  --lightbox-margin-y: calc(40 * var(--u));
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background-color: rgba(11, 11, 11, 0.85);
}

.lightbox-content {
  position: absolute;
  inset: var(--lightbox-margin-y) var(--lightbox-margin-x);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Its size comes from the script in realisations.php */
.lightbox-image {
  flex: none;
}

.lightbox-caption {
  flex: none;
  max-width: 100%;
  padding: calc(12 * var(--u)) calc(16 * var(--u)) 0;
  color: var(--white);
  text-align: center;
  font-size: max(13px, calc(16 * var(--u)));
  line-height: 1.25;
}

.lightbox-button {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--lightbox-button);
  height: var(--lightbox-button);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(11, 11, 11, 0.5);
  color: var(--white);
  outline: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.lightbox-button svg {
  width: 70%;
  height: 70%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.lightbox-button[aria-disabled="true"] {
  color: #6b6b6b;
  cursor: default;
}

/* Only with a mouse: on a touch screen the hover state would stay after the tap */
@media (hover: hover) {
  .lightbox-button:not([aria-disabled="true"]):hover {
    background-color: var(--green-500);
  }
}

.lightbox-button:not([aria-disabled="true"]):active {
  background-color: var(--green);
}

.lightbox-prev,
.lightbox-next {
  top: calc(50% - var(--lightbox-button) / 2);
}

.lightbox-prev {
  left: calc(24 * var(--u));
}

.lightbox-next {
  right: calc(24 * var(--u));
}

.lightbox-close {
  top: calc(20 * var(--u));
  right: calc(24 * var(--u));
}

@media screen and (max-width: 1199px) {
  /* The image takes the whole width, under the arrows */
  .lightbox {
    --lightbox-button: calc(52 * var(--u));
    --lightbox-margin-x: 0px;
    --lightbox-margin-y: calc(72 * var(--u));
  }
  .lightbox-prev {
    left: calc(8 * var(--u));
  }
  .lightbox-next {
    right: calc(8 * var(--u));
  }
  .lightbox-close {
    top: calc(10 * var(--u));
    right: calc(8 * var(--u));
  }
}

/* Hidden without collapsing: the page keeps its height, which the script in realisations.php compares to the screen */
.back-to-top {
  margin-top: calc(24 * var(--u));
  text-align: right;
  font-weight: 500;
  font-size: calc(18 * var(--u));
  visibility: hidden;
}

.back-to-top.visible {
  visibility: visible;
}

@media screen and (max-width: 1199px) {
  .realisations {
    padding: calc(80 * var(--u)) calc(20 * var(--u)) calc(76 * var(--u));
  }
  .realisations .page-title {
    margin-bottom: calc(12 * var(--u));
  }
  .filters {
    margin-bottom: calc(26 * var(--u));
    font-size: calc(24 * var(--u));
    line-height: calc(24 * var(--u));
  }
  .filters-clear {
    width: 100%;
    margin-top: calc(10 * var(--u));
    text-align: right;
    font-size: calc(17 * var(--u));
    line-height: 1;
  }
  .works {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(19 * var(--u)) calc(22 * var(--u));
    padding: 0 calc(16 * var(--u));
  }
  .work {
    aspect-ratio: 148 / 172;
  }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1199px) {
  .works {
    grid-template-columns: repeat(3, 1fr);
  }
}

/********************
 CONTACT
*********************/
.contact {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: max(100vh, 600px);
  padding: calc(130 * var(--u)) calc(50 * var(--u)) calc(20 * var(--u));
  text-align: center;
  font-weight: 600;
  /* Size of the lines: the title and 4 lines take 6.04 times it in height, and the widest about 10 times it in width */
  container-type: size;
  --contact-size: min(calc(100cqh / 6.04), calc(100cqw / 10.2));
}

.contact h1 {
  flex: none;
  width: calc(9.74 * var(--contact-size));
  margin-bottom: calc(0.15 * var(--contact-size));
  font-weight: 900;
}

.contact h1 svg {
  display: block;
  width: 100%;
  height: auto;
}

.contact h1 text {
  fill: currentColor;
}

/* Takes the height left under the title: on a narrow screen the lines spread out to reach the bottom */
.contact-details {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 0;
  width: 100%;
}

.contact-details > * {
  font-size: var(--contact-size);
  line-height: 1.026;
}

.contact p {
  margin: 0;
}

/* Exception: contact links turn green on hover instead of being underlined */
.contact a:hover {
  color: var(--green);
  text-decoration: none;
}

.contact p span {
  font-size: 0.36em;
}

/* In em, to follow the size of the lines */
.contact-image {
  position: absolute;
  bottom: 0;
  left: calc(50% + 3.9em);
  width: 1.16em;
  height: 1.74em;
}

.contact-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The script in contact.php shows them one after the other */
.contact-image img:not(.current) {
  display: none;
}

@media screen and (max-width: 1199px) {
  /* The texts follow the width, within 55% of the height, and the image takes the height left.
     Below its minimum height, the page scrolls. */
  .contact {
    height: auto;
    min-height: 100svh;
    padding: calc(75 * var(--u)) calc(20 * var(--u)) calc(20 * var(--u));
    container-type: inline-size;
    --contact-size: min(calc(100cqw / 10.2), calc(55svh / 6.04));
  }
  .contact h1 {
    order: -1;
    margin-top: calc(14 * var(--u));
    margin-bottom: calc(5 * var(--u));
  }
  .contact-details {
    display: contents;
  }
  .contact-image {
    position: relative;
    bottom: auto;
    left: auto;
    order: -2;
    flex: 1 0 280px;
    width: 100%;
    height: auto;
  }
  /* Out of the flow, so that the size of the photo does not stretch the page.
     A wide crop keeps the top of the photo, where the head is. */
  .contact-image img {
    position: absolute;
    inset: 0;
    object-position: center 20%;
  }
}

/********************
 404
*********************/
.p404 {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: max(100vh, 600px);
  padding: calc(130 * var(--u)) calc(50 * var(--u)) calc(20 * var(--u));
  text-align: center;
  font-weight: 600;
  /* The title and the 2 lines take 3.9 times it in height, and the title 10 times it in width */
  container-type: size;
  --p404-size: min(calc(100cqh / 3.9), calc(100cqw / 10.2));
  --p404-line: calc(0.55 * var(--p404-size));
}

.p404 h1 {
  flex: none;
  width: calc(10 * var(--p404-size));
  margin-bottom: calc(0.15 * var(--p404-size));
  font-weight: 900;
}

.p404 h1 svg {
  display: block;
  width: 100%;
  height: auto;
}

.p404 h1 text {
  fill: currentColor;
}

.p404-details {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.p404-details p {
  font-size: var(--p404-line);
  line-height: 1.026;
}

.p404-details a {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.08em;
}

.p404-details a:hover {
  color: var(--green);
}

/* Over the end of the title, like the photos over the letters of the home page */
.p404-image {
  position: absolute;
  right: calc(50 * var(--u));
  bottom: calc(20 * var(--u));
  width: calc(1.5 * var(--p404-size));
  height: calc(2.25 * var(--p404-size));
  object-fit: cover;
}

@media screen and (max-width: 1199px) {
  /* As on the contact page: the texts follow the width, within 55% of the height, and the image takes the height left.
     Below its minimum height, the page scrolls. */
  .p404 {
    height: auto;
    min-height: 100svh;
    padding: calc(75 * var(--u)) calc(20 * var(--u)) calc(20 * var(--u));
    container-type: inline-size;
    --p404-size: min(calc(100cqw / 10.2), calc(55svh / 3.9));
    --p404-line: calc(0.8 * var(--p404-size));
  }
  .p404 h1 {
    order: -1;
    margin-top: calc(14 * var(--u));
    margin-bottom: calc(10 * var(--u));
  }
  .p404-details {
    flex: none;
  }
  .p404-image {
    position: static;
    order: -2;
    flex: 1 0 280px;
    width: 100%;
    height: auto;
    min-height: 0;
    object-position: center 20%;
  }
}

/********************
 PAGE EDITOR OF SMOOTHEE
*********************/
/* The model of a new block of an editable list, kept in the file */
.editable_model {
  display: none;
}

/* The rules would repeat under the border of the editor, showing one more above the text */
.front-editor .ruled {
  background-clip: padding-box;
}

/* The editor writes a paragraph inside the link it edits: in an inline element, it would take 3 lines */
.front-editor .contact-details a.editable {
  display: inline-block;
}

/* All the images of the carousel at once, under the texts, to reach them */
.front-editor .contact {
  height: auto;
  min-height: 100vh;
  overflow: visible;
  container-type: inline-size;
  --contact-size: min(calc(75vh / 6.04), calc(100cqw / 10.2));
}

.front-editor .contact-image {
  position: static;
  order: 0;
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: auto;
  margin-top: 30px;
}

.front-editor .contact-image img:not(.editable_model) {
  position: static;
  display: block;
  width: 160px;
  height: 240px;
}
