/* Cormorant Garamond (SIL Open Font License 1.1) — hébergée localement */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("assets/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #111;
  background: #F7F5EF;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 40px;
  border-bottom: 1px solid #e5e5e5;
  background: #F7F5EF;
}

.header__logo img {
  display: block;
  height: 40px;
  width: auto;
}

.header__nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
}

.header__nav a {
  color: #111;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.header__nav a:hover,
.header__nav a.active {
  border-bottom-color: #111;
}

/* Bouton Contact encadré */
/* Bouton Contact : plein noir pour qu'il ressorte */
.header__nav a.header__cta {
  background: #111;
  color: #fff;
  border: 1px solid #111;
  padding: 8px 18px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.header__nav a.header__cta:hover,
.header__nav a.header__cta.active {
  background: #44423D;
  border-color: #44423D;
  color: #fff;
}

.header__nav a {
  white-space: nowrap;
}

/* Écrans moyens : on resserre le menu pour qu'il tienne à côté du logo horizontal */
@media (min-width: 901px) and (max-width: 1100px) {
  .header__nav ul {
    gap: 20px;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 10px 16px;
  }

  .header__logo img {
    height: 32px;
  }
}


/* ===== Header transparent (page d'accueil) ===== */
.header--transparent {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom-color: transparent;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s ease;
}

/* Header caché quand on descend */
.header--transparent.is-hidden {
  transform: translateY(-100%);
}

/* Léger dégradé sombre pour que le texte blanc reste lisible sur les photos */
.header--transparent::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  transition: opacity 0.3s;
}

/* Logo et liens en blanc tant que le header est transparent */
.header--transparent .header__logo img {
  filter: invert(1);
  transition: filter 0.3s;
}

.header--transparent .header__nav a {
  color: #fff;
}

.header--transparent .header__nav a:hover,
.header--transparent .header__nav a.active {
  border-bottom-color: #fff;
}

.header--transparent .header__nav a.header__cta {
  color: #fff;
  border-color: #111;
}

.header--transparent .header__nav a.header__cta:hover {
  background: #44423D;
  border-color: #44423D;
  color: #fff;
}

/* Une fois qu'on a scrollé : header blanc normal */
.header--transparent.is-scrolled {
  background: rgba(247, 245, 239, 0.4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: transparent;
}

.header--transparent.is-scrolled::before {
  opacity: 0;
}

.header--transparent.is-scrolled .header__logo img {
  filter: none;
}

.header--transparent.is-scrolled .header__nav a {
  color: #111;
}

.header--transparent.is-scrolled .header__nav a:hover,
.header--transparent.is-scrolled .header__nav a.active {
  border-bottom-color: #111;
}

.header--transparent.is-scrolled .header__nav a.header__cta {
  color: #fff;
  border-color: #111;
}

.header--transparent.is-scrolled .header__nav a.header__cta:hover {
  background: #44423D;
  border-color: #44423D;
  color: #fff;
}

/* ===== Menu mobile : bouton 3 barres + panneau plein écran =====
   Le bouton est ajouté par header.js (classe has-burger sur le header) :
   sans JavaScript, le menu reste affiché normalement. */
.header__burger {
  display: none;
}

@media (max-width: 900px) {
  .header.has-burger .header__burger {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    margin-right: -10px; /* aligne les barres sur la marge du site */
    padding: 0 10px;
    border: none;
    background: none;
    cursor: pointer;
  }

  .header__burger span {
    display: block;
    height: 1.5px;
    background: #111;
    transition: transform 0.35s ease, opacity 0.2s ease, background-color 0.3s;
  }

  /* barres blanches sur le carrousel (accueil, avant de scroller) */
  .header--transparent:not(.is-scrolled):not(.is-menu-open) .header__burger span {
    background: #fff;
  }

  /* les 3 barres deviennent une croix */
  .header.is-menu-open .header__burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .header.is-menu-open .header__burger span:nth-child(2) { opacity: 0; }
  .header.is-menu-open .header__burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .header.has-burger .header__burger:focus-visible {
    outline: 2px solid #44423D;
    outline-offset: 2px;
  }

  /* Panneau : couvre tout l'écran, sous le logo et la croix */
  .header.has-burger .header__nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 96px 32px 48px;
    background: #F7F5EF;
    visibility: hidden;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.5s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s 0.5s;
  }

  .header.is-menu-open .header__nav {
    visibility: visible;
    clip-path: inset(0 0 0 0);
    transition: clip-path 0.5s cubic-bezier(0.7, 0, 0.2, 1), visibility 0s;
  }

  .header.has-burger .header__nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .header.has-burger .header__nav li {
    width: 100%;
    border-bottom: 1px solid rgba(68, 66, 61, 0.15);
    opacity: 0;
    translate: 0 12px;
    transition: opacity 0.4s ease, translate 0.4s ease;
  }

  .header.has-burger .header__nav li:last-child {
    border-bottom: none;
  }

  /* les liens arrivent l'un après l'autre */
  .header.is-menu-open .header__nav li {
    opacity: 1;
    translate: 0 0;
  }
  .header.is-menu-open .header__nav li:nth-child(1) { transition-delay: 0.15s; }
  .header.is-menu-open .header__nav li:nth-child(2) { transition-delay: 0.2s; }
  .header.is-menu-open .header__nav li:nth-child(3) { transition-delay: 0.25s; }
  .header.is-menu-open .header__nav li:nth-child(4) { transition-delay: 0.3s; }
  .header.is-menu-open .header__nav li:nth-child(5) { transition-delay: 0.35s; }
  .header.is-menu-open .header__nav li:nth-child(6) { transition-delay: 0.4s; }

  .header.has-burger .header__nav a,
  .header--transparent.has-burger .header__nav a,
  .header--transparent.is-scrolled.has-burger .header__nav a {
    display: inline-block;
    padding: 14px 0;
    border-bottom: none;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2rem;
    letter-spacing: 0;
    color: #111;
  }

  .header.has-burger .header__nav a.active {
    font-style: italic;
  }

  .header.has-burger .header__nav a.header__cta,
  .header--transparent.has-burger .header__nav a.header__cta,
  .header--transparent.is-scrolled.has-burger .header__nav a.header__cta {
    margin-top: 28px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-style: normal;
    color: #fff;
  }

  /* menu ouvert : header crème uni, logo foncé */
  .header--transparent.is-menu-open {
    background: #F7F5EF;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .header--transparent.is-menu-open::before {
    opacity: 0;
  }

  .header--transparent.is-menu-open .header__logo img {
    filter: none;
  }
}

/* ===== Carrousel ===== */
.carousel {
  position: relative;
  width: 100%;
  height: 90vh;
  min-height: 320px;
  overflow: hidden;
  background: #111;
}

.carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.carousel__slide.is-active {
  opacity: 1;
}

/* Dégradé sombre en bas pour la lisibilité du texte */
.carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 50%);
  pointer-events: none;
}

/* Texte sur le carrousel, en bas à gauche au-dessus des barres */
.carousel__text {
  position: absolute;
  left: 40px;
  bottom: 72px;
  z-index: 1;
  color: #fff;
  max-width: 700px;
}

/* Même police élégante que les titres de section */
.carousel__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
}

.carousel__tagline {
  margin-top: 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: 2rem;
  line-height: 1.2;
}

.carousel__intro {
  margin-top: 16px;
  max-width: 520px;
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* Boutons sur le carrousel */
.carousel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 1px solid #fff;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

/* Bouton plein : fond crème, texte foncé */
.btn--light {
  background: #F7F5EF;
  border-color: #F7F5EF;
  color: #111;
}

.btn--light:hover {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

/* Bouton contour : transparent, texte blanc */
.btn--outline {
  background: transparent;
  color: #fff;
}

.btn--outline:hover {
  background: #fff;
  color: #111;
}

.carousel__dots {
  z-index: 1;
  position: absolute;
  bottom: 28px;
  left: 40px;
  display: flex;
  gap: 12px;
}

/* Barres de progression */
.carousel__bar {
  position: relative;
  width: 60px;
  height: 2px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

/* Zone cliquable plus haute que la barre */
.carousel__bar::before {
  content: "";
  position: absolute;
  inset: -10px 0;
}

.carousel__fill {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.carousel__bar.is-done .carousel__fill {
  transform: scaleX(1);
}

.carousel__bar.is-active .carousel__fill {
  animation: carousel-fill var(--carousel-delay, 5000ms) linear forwards;
}

@keyframes carousel-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@media (max-width: 600px) {
  .carousel {
    height: 65vh;
  }

  .carousel__dots {
    left: 16px;
    bottom: 20px;
  }

  .carousel__text {
    left: 16px;
    right: 16px;
    bottom: 56px;
  }

  .carousel__title {
    font-size: 3rem;
  }

  .carousel__tagline {
    font-size: 1.4rem;
  }

  .carousel__intro {
    font-size: 0.9rem;
  }

  .carousel__actions {
    gap: 10px;
    margin-top: 20px;
  }

  .btn {
    padding: 12px 18px;
    font-size: 0.8rem;
  }
}

/* ===== Nos secteurs d'expertises ===== */
.expertises {
  padding: 80px 40px;
}

/* ===== Titres de section =====
   Petite ligne d'intro (numéro + thème) puis un grand titre
   en police élégante, avec un mot en italique. */
.section-head {
  max-width: 1300px; /* aligné sur le bord gauche des cartes */
  margin: 0 auto;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(17, 17, 17, 0.55);
  margin-bottom: 16px;
}

/* Petit trait avant le numéro */
.section-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.section-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.4rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
}

.expertises__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1300px;
  margin: 48px auto 0;
}

/* Lien "Voir toutes nos réalisations" */
.expertises__link {
  margin-top: 40px;
  text-align: center;
}

.expertises__link a {
  color: #111;
  text-decoration: none;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  padding-bottom: 4px;
  border-bottom: 1px solid #111;
  transition: opacity 0.2s;
}

.expertises__link a:hover {
  opacity: 0.6;
}

/* Carte : photo + titre en bas sur un dégradé sombre */
.card {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #111;
}

/* Forme arrondie : petit arrondi en haut à droite, grand arrondi en bas à droite */
.card--arrondi {
  border-radius: 0 5% 23% 0 / 0 4% 27% 0;
}

/* Même forme, en miroir : arrondis à gauche */
.card--arrondi-inverse {
  border-radius: 5% 0 0 23% / 4% 0 0 27%;
}

/* Titre aligné à droite sur la carte Immobilier de prestige */
.card--arrondi-inverse .card__content {
  left: auto;
  right: 24px;
  text-align: right;
}

/* Carte centrale : tous les coins arrondis, titre centré */
.card--centre {
  border-radius: 5% / 4%;
}

.card--centre .card__content {
  left: 24px;
  right: 24px;
  text-align: center;
}

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

/* Photo en paysage montrée moins zoomée : plus large que la carte, posée en bas,
   et le ciel prolongé au-dessus (l'image se fond dans le dégradé par le haut) */
.card--recul {
  background: var(--ciel, linear-gradient(180deg, #8494AE 0%, #A3B0C6 45%, #A9B6CB 100%));
}

/* Ciel bleu de la villa (Immobilier de prestige) */
.card--ciel-bleu {
  --ciel: linear-gradient(180deg, #3A72B3 0%, #4682C1 60%, #4884C3 100%);
  --recul-largeur: 160%;
}

.card--recul img {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--recul-largeur, 150%);
  height: auto;
  translate: -50% 0;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 50%);
  pointer-events: none;
}

/* Au survol : la carte se soulève et une ombre apparaît derrière.
   On utilise "translate" (et pas "transform") pour ne pas gêner
   l'animation d'apparition au scroll. */
.card {
  transition: translate 0.4s ease, box-shadow 0.4s ease;
}

.card:hover {
  translate: 0 -12px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.45);
}

/* Bloc texte en bas de la carte : titre */
.card__content {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 1;
  color: #fff;
}

.card__title {
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* Toute la carte est un lien vers les réalisations */
a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:focus-visible {
  outline: 2px solid #111;
  outline-offset: 4px;
}


@media (max-width: 900px) {
  .expertises__grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

@media (max-width: 600px) {
  .expertises {
    padding: 56px 16px;
  }

  .section-title {
    font-size: 2.4rem;
  }

  .section-eyebrow {
    font-size: 0.7rem;
    margin-bottom: 12px;
  }
}

/* ===== Galerie (4 photos) =====
   Mosaïque : grande + petite en haut, petite + grande en bas */
.galerie {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 480px;
  gap: 30px; /* même écart que entre le cadre clair et les photos (44 - 12 - 2) */
  margin-bottom: 100px; /* toute la largeur de l'écran */
  /* Fond gris chaud avec un fin cadre clair en retrait, comme un passe-partout */
  position: relative;
  background: #44423D;
  padding: 44px;
}

.galerie::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid #B8B0A8;
  pointer-events: none;
}

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

.galerie__img--1 { grid-column: span 8; }
.galerie__img--2 { grid-column: span 4; }
.galerie__img--3 { grid-column: span 4; }
.galerie__img--4 { grid-column: span 8; }

@media (max-width: 900px) {
  .galerie {
    grid-auto-rows: 320px;
    padding: 32px;
    gap: 20px;
  }

  .galerie::before {
    inset: 10px;
  }
}

@media (max-width: 600px) {
  .galerie {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
    margin-bottom: 64px;
    padding: 24px;
    gap: 15px;
  }

  .galerie::before {
    inset: 8px;
    border-width: 1px;
  }

  .galerie__img--1,
  .galerie__img--2,
  .galerie__img--3,
  .galerie__img--4 {
    grid-column: auto;
  }
}

/* ===== Galerie de 3 photos (entre "Notre mission" et les expertises) =====
   Même fond et même cadre que la grande galerie, 3 photos verticales */
.galerie--trio {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  margin-top: 72px;
  margin-bottom: 0;
}

.galerie--trio .galerie__img {
  aspect-ratio: 2 / 3;
  height: auto;
}

@media (max-width: 900px) {
  .galerie--trio {
    grid-auto-rows: auto;
    margin-top: 48px;
  }
}

@media (max-width: 600px) {
  .galerie--trio {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    margin-bottom: 0;
  }

  .galerie--trio .galerie__img {
    aspect-ratio: 4 / 5;
  }
}

/* ===== Nos agences ===== */
/* Titre au-dessus, cartes en dessous */
.agences {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

/* Le titre s'aligne sur le bord gauche des cartes d'agences */
.agences .section-head {
  max-width: none;
  margin: 0;
}

/* 4 cartes côte à côte, en quinconce (une haute, une basse)
   et qui se chevauchent un peu */
.agences__list {
  display: flex;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
  padding-bottom: 80px; /* place pour les cartes décalées vers le bas */
}

/* Carte d'agence — format carte de visite (85 × 55 mm, paysage) */
.agence {
  position: relative;
  flex: 1;
  min-width: 0;
  aspect-ratio: 85 / 55;
  background: #3D3A38 url("assets/textures/carte-visite.png") center / cover no-repeat;
  color: rgba(247, 245, 239, 0.75);
  padding: 26px 28px;
  border-radius: 6px;
  /* Plaque de marbre épaisse :
     - reflets sur l'arête haute et assombrissement du bas (biseau)
     - tranche visible en dessous (couches empilées de plus en plus sombres)
     - ombre portée au sol */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 1px 0 0 rgba(255, 255, 255, 0.08),
    inset 0 -3px 6px rgba(0, 0, 0, 0.45),
    0 1px 0 #2f2c2a,
    0 2px 0 #2c2927,
    0 3px 0 #2a2725,
    0 4px 0 #282523,
    0 5px 0 #262321,
    0 6px 0 #24211f,
    0 7px 0 #221f1d,
    0 8px 0 #1f1c1a,
    0 9px 0 #1c1a18,
    0 10px 2px rgba(0, 0, 0, 0.5),
    0 24px 30px rgba(0, 0, 0, 0.35),
    0 44px 70px rgba(0, 0, 0, 0.4);
}

/* Filet intérieur, comme une carte imprimée */
.agence::before {
  content: "";
  position: absolute;
  inset: 8px;
  /* Filet gravé : sillon sombre avec un reflet clair sur son bord bas */
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  pointer-events: none;
}

/* Texte gravé dans la pierre : ombre au-dessus, reflet en dessous */
.agence__city,
.agence__phone,
.agence__address {
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.75), 0 1px 0 rgba(255, 255, 255, 0.14);
}

.agence__body {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Petit logo en haut à droite */
.agence__logo {
  position: absolute;
  top: 0;
  right: 0;
  height: 20px;
  width: auto;
  filter: invert(1) drop-shadow(0 1px 0 rgba(0, 0, 0, 0.3)) drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.5));
  opacity: 0.85;
}

.agence__line {
  display: block;
  width: 40px;
  height: 1px;
  background: rgba(247, 245, 239, 0.5);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.12);
  margin: 10px 0 auto; /* pousse les coordonnées en bas de la carte */
}

/* Chevauchement : chaque carte recouvre un peu la précédente */
.agence + .agence {
  margin-left: -24px;
}

/* Quinconce : les cartes 2 et 4 sont décalées vers le bas */
.agence:nth-child(even) {
  margin-top: 80px;
}

.agence__city {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 500;
  line-height: 1.1;
  color: #F7F5EF;
  padding-right: 96px; /* laisse la place au logo */
}

.agence__phone,
.agence__address {
  font-size: 0.9rem;
  line-height: 1.6;
}

.agence__phone {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.agence__phone:hover {
  color: #F7F5EF;
}

.agence__address {
  font-style: normal;
}

/* Écrans moyens : titre au-dessus, 2 cartes par ligne */
@media (max-width: 1100px) {
  .agences {
    gap: 32px;
  }

  /* 2 cartes par ligne, quinconce conservé, sans chevauchement */
  .agences__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    padding-bottom: 40px;
  }

  .agence + .agence {
    margin-left: 0;
  }

  .agence:nth-child(even) {
    margin-top: 40px;
  }
}

/* Mobile : 1 carte par ligne */
@media (max-width: 600px) {
  .agences {
    padding: 24px 16px 56px;
  }

  /* 1 carte par ligne, sans décalage */
  .agences__list {
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .agence {
    padding: 24px 26px;
  }

  .agence:nth-child(even) {
    margin-top: 0;
  }
}

/* ===== Ils nous font confiance ===== */
.confiance {
  padding: 96px 0 100px;
  margin-bottom: 100px;
  background: #464340;
}

/* Titre en clair sur le fond foncé */
.confiance .section-title {
  color: #F7F5EF;
}

.confiance .section-eyebrow {
  color: rgba(247, 245, 239, 0.6);
}

.confiance .section-head {
  padding: 0 40px;
  box-sizing: content-box;
}

/* Bandeau défilant, couleur crème du fond du site */
.marquee {
  margin-top: 48px;
  overflow: hidden;
  padding: 32px 0;
  background: #F7F5EF;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}

.marquee__list {
  display: flex;
  list-style: none;
}

.marquee__list li {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  white-space: nowrap;
  color: #111;
}

/* Petit losange entre chaque nom */
.marquee__list li::after {
  content: "◆";
  font-size: 0.6rem;
  vertical-align: middle;
  margin: 0 48px;
  color: rgba(17, 17, 17, 0.35);
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (max-width: 600px) {
  .confiance {
    padding: 56px 0 64px;
    margin-bottom: 64px;
  }

  .confiance .section-head {
    padding: 0 16px;
  }

  .marquee {
    margin-top: 32px;
    padding: 24px 0;
  }

  .marquee__list li {
    font-size: 1.6rem;
  }

  .marquee__list li::after {
    margin: 0 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation-duration: 120s;
  }
}

/* ===== Nous contacter =====
   Bloc centré : intro, grand titre, phrase, bouton */
.contact-cta {
  padding: 0 40px 120px;
}

.contact-cta__inner {
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-cta .section-head {
  margin: 0;
}

/* Intro centrée avec un petit trait de chaque côté */
.contact-cta .section-eyebrow {
  justify-content: center;
}

.contact-cta .section-eyebrow::after {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.contact-cta .section-title {
  font-size: 4.5rem;
}

.contact-cta__side {
  max-width: 520px;
  margin-top: 24px;
}

.contact-cta__text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.7);
  margin-bottom: 36px;
}

/* Bouton foncé (sur fond clair) */
.btn--dark {
  background: #464340; /* même couleur que la section "Ils nous font confiance" */
  border-color: #464340;
  color: #F7F5EF;
}

.btn--dark:hover {
  background: transparent;
  color: #464340;
}

@media (max-width: 600px) {
  .contact-cta {
    padding: 0 16px 72px;
  }

  .contact-cta .section-title {
    font-size: 3rem;
  }
}

/* ===== Page Notre équipe ===== */
.team-intro {
  max-width: 1300px;
  margin: 0 auto;
  padding: 96px 40px 64px;
  box-sizing: content-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
}

.team-intro .section-head {
  margin: 0;
}

.team-intro .section-title {
  font-size: 4.5rem;
}

.team-intro__text {
  max-width: 440px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.7);
}

.team {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px 120px;
  box-sizing: content-box;
}

/* Une personne par bloc : texte dans un cadre fin,
   photo qui déborde du cadre (à droite puis à gauche, en alternance) */
.member {
  position: relative;
  padding-bottom: 80px; /* place pour la photo qui dépasse en bas */
}

.member + .member {
  margin-top: 120px;
}

.member__frame {
  position: relative;
  border: 1px solid rgba(17, 17, 17, 0.2);
  padding: 64px 96px 72px;
}

/* Équerres foncées sur deux coins du cadre :
   en haut côté photo, en bas du côté opposé */
.member__frame::before,
.member__frame::after {
  content: "";
  position: absolute;
  width: 190px;
  border: 0 solid #44423D;
  pointer-events: none;
}

.member__frame::before {
  top: -3px;
  height: 72px;
  border-top-width: 3px;
}

.member__frame::after {
  bottom: -3px;
  height: 140px;
  border-bottom-width: 3px;
}

.member--right .member__frame::before {
  right: -3px;
  border-right-width: 3px;
}

.member--right .member__frame::after {
  left: -3px;
  border-left-width: 3px;
}

.member--left .member__frame::before {
  left: -3px;
  border-left-width: 3px;
}

.member--left .member__frame::after {
  right: -3px;
  border-right-width: 3px;
}

/* Photo à droite : le cadre laisse la place à droite */
.member--right .member__frame {
  margin-right: 110px;
  padding-right: 190px;
}

/* Photo à gauche : le cadre laisse la place à gauche */
.member--left .member__frame {
  margin-left: 110px;
  padding-left: 190px;
}

.member__photo {
  position: absolute;
  top: 80px;
  width: 260px;
  aspect-ratio: 2 / 3;
  background: #464340;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
  z-index: 1; /* passe au-dessus des équerres */
}

.member--right .member__photo { right: 0; }
.member--left .member__photo { left: 0; }

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

.member__role {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(17, 17, 17, 0.55);
  margin-bottom: 28px;
}

.member__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.05;
}

.member__name em {
  font-style: inherit;
}

/* Petit trait sous le nom */
.member__line {
  display: block;
  width: 56px;
  height: 1px;
  background: #464340;
  margin: 32px 0;
}

.member__text {
  font-size: 1rem;
  line-height: 1.9;
  text-align: justify;
  color: rgba(17, 17, 17, 0.7);
}

/* Texte en plusieurs paragraphes */
.member__text + .member__text {
  margin-top: 1em;
}

@media (max-width: 900px) {
  .team-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  /* Tablette / mobile : photo au-dessus, cadre en dessous */
  .member {
    padding-bottom: 0;
  }

  .member__photo {
    position: relative;
    top: auto;
    left: auto !important;
    right: auto !important;
    width: min(260px, 60%);
    margin-bottom: -80px;
    z-index: 1;
  }

  .member--right .member__photo {
    margin-left: auto;
    margin-right: 24px;
  }

  .member--left .member__photo {
    margin-left: 24px;
  }

  .member--right .member__frame,
  .member--left .member__frame {
    margin: 0;
    padding: 128px 48px 64px;
    min-height: 0;
  }

  /* Photo au-dessus du cadre dans l'ordre d'affichage */
  .member {
    display: flex;
    flex-direction: column-reverse;
  }
}

@media (max-width: 600px) {
  .team-intro {
    padding: 56px 16px 40px;
  }

  .team-intro .section-title {
    font-size: 3rem;
  }

  .team {
    padding: 0 16px 72px;
  }

  .member + .member {
    margin-top: 72px;
  }

  .member--right .member__frame,
  .member--left .member__frame {
    padding: 112px 24px 48px;
  }

  .member__text {
    text-align: left;
  }

  .member__name {
    font-size: 2.6rem;
  }
}

/* TEXTE TEMPORAIRE des pages vides : à supprimer */
.placeholder-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 16px 100px;
  line-height: 1.7;
}

.placeholder-page h1 {
  margin-bottom: 32px;
}

.placeholder-page p + p {
  margin-top: 1.2em;
}

/* ===== Footer ===== */
.footer {
  background: #464340;
  color: rgba(247, 245, 239, 0.75);
  padding: 72px 40px 32px;
}

.footer__top,
.footer__grid,
.footer__bottom {
  max-width: 1300px;
  margin: 0 auto;
}

/* Logo + phrase d'accroche */
.footer__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(247, 245, 239, 0.15);
}

.footer__logo img {
  display: block;
  height: 44px;
  width: auto;
  filter: invert(1); /* logo en clair */
  opacity: 0.9;
}

.footer__tagline {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1.15;
  color: #F7F5EF;
  text-align: right;
}

.footer__tagline em {
  font-style: italic;
  font-weight: 300;
}

/* Colonnes : navigation + 4 agences */
.footer__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding: 48px 0;
}

.footer__heading {
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(247, 245, 239, 0.5);
  margin-bottom: 20px;
}

.footer__nav {
  list-style: none;
}

.footer__link {
  display: inline-block;
  color: rgba(247, 245, 239, 0.75);
  text-decoration: none;
  line-height: 2;
  transition: color 0.2s;
}

.footer__link:hover {
  color: #F7F5EF;
}

.footer__address {
  font-style: normal;
  line-height: 1.8;
}

/* Copyright + mentions légales */
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(247, 245, 239, 0.15);
  font-size: 0.85rem;
}

.footer__bottom .footer__link {
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 40px;
  }
}

@media (max-width: 600px) {
  .footer {
    padding: 56px 16px 24px;
  }

  .footer__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__logo img {
    height: 34px;
  }

  .footer__tagline {
    font-size: 1.6rem;
    text-align: left;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Animation d'apparition au scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  /* l'ombre au survol garde sa propre durée, plus rapide */
  transition: opacity 1.4s ease, transform 1.4s ease, translate 0.4s ease, box-shadow 0.4s ease;
}

/* Carte de gauche : arrive depuis la gauche */
.reveal.card--arrondi {
  transform: translateX(-160px);
}

/* Carte de droite : arrive depuis la droite */
.reveal.card--arrondi-inverse {
  transform: translateX(160px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Évite une barre de scroll horizontale pendant l'animation */
.expertises {
  overflow-x: clip;
}

/* ===== Ce que fait PHB70 (après le carrousel) =====
   Titre à gauche, texte à droite pour occuper toute la largeur */
.apropos {
  padding: 96px 40px 24px;
}

.apropos__inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  max-width: 1300px;
  margin: 0 auto;
  align-items: start;
}

.apropos .section-head {
  margin: 0;
}

.apropos__body {
  padding-top: 34px; /* aligne le texte sous le surtitre, au niveau du titre */
}

.apropos__lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.3;
}

.apropos__text {
  margin-top: 24px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(17, 17, 17, 0.7);
}

@media (max-width: 900px) {
  .apropos__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .apropos__body {
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  .apropos {
    padding: 64px 16px 8px;
  }

  .apropos__lead {
    font-size: 1.4rem;
  }
}

/* ===== Page Notre méthode =====
   Intro, puis 5 étapes : image d'un côté, texte de l'autre, en alternance */
.method-intro {
  max-width: 1300px;
  margin: 0 auto;
  padding: 96px 40px 80px;
  box-sizing: content-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
}

.method-intro .section-head {
  margin: 0;
}

.method-intro .section-title {
  font-size: 4.5rem;
}

.method-intro__text {
  max-width: 440px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.7);
}

@media (max-width: 900px) {
  .method-intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .method-intro {
    padding: 64px 16px 48px;
  }

  .method-intro .section-title {
    font-size: 2.8rem;
  }
}

/* ===== Notre méthode : les 5 étapes =====
   Chaque étape est une "double page" : texte dans un cadre fin d'un côté,
   photo posée sur fond sombre de l'autre (côté qui alterne). */
.spreads {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 140px;
  box-sizing: content-box;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
  background: #F7F5EF;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.18), 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* Une étape sur deux : photo à gauche */
.spread:nth-child(even) .spread__media {
  order: -1;
}

/* Côté texte : fond crème et cadre fin en retrait */
.spread__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 64px;
  background: #F2EFE8;
}

.spread__text::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(68, 66, 61, 0.45);
  pointer-events: none;
}

.spread__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(17, 17, 17, 0.5);
  margin-bottom: 14px;
}

.spread__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.05;
  margin-bottom: 24px;
}

.spread__title em {
  font-style: italic;
  font-weight: 300;
}

.spread__body {
  font-size: 1rem;
  line-height: 1.75;
  color: rgba(17, 17, 17, 0.65);
}

.spread__body + .spread__body {
  margin-top: 16px;
}

/* Côté photo : fond sombre du site, photo posée comme un tirage */
.spread__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  background: #44423D;
}

.spread__media img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
}

@media (max-width: 900px) {
  .spreads {
    gap: 32px;
  }

  .spread {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .spread:nth-child(even) .spread__media {
    order: 0;
  }

  .spread__text {
    padding: 56px 44px;
  }

  .spread__media {
    padding: 40px;
  }
}

@media (max-width: 600px) {
  .spreads {
    padding: 0 16px 80px;
  }

  .spread__text {
    padding: 44px 32px;
  }

  .spread__text::before {
    inset: 10px;
  }

  .spread__media {
    padding: 24px;
  }

  .spread__title {
    font-size: 2rem;
  }
}

/* =====================================================================
   ===== Page Réalisations : livres de projets =====
   ===================================================================== */

/* Conteneur des livres */
.books {
  width: min(1300px, calc(100% - 80px));
  margin: 0 auto 140px;
}

.books[hidden],
.book-item[hidden],
.viewer[hidden] {
  display: none !important;
}

/* Le livre est un bouton : on retire le style par défaut */
.book {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.book:focus-visible {
  outline: 2px solid #44423D;
  outline-offset: 8px;
}

.book__body {
  position: relative;
  display: block;
}

/* ----- Couverture (toile gris-brun, filet clair, photo, titre) ----- */
.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 3 / 4;
  min-height: 0; /* la couverture garde son format, quel que soit le contenu */
  overflow: hidden;
  padding: 12% 11% 10%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 4px),
    #44423D;
  color: #F7F5EF;
  text-align: center;
  border-radius: 2px 4px 4px 2px;
}

/* Filet clair en retrait, comme le cadre de la galerie */
.cover::before {
  content: "";
  position: absolute;
  inset: 5%;
  border: 1px solid rgba(184, 176, 168, 0.7);
  pointer-events: none;
}

/* Pli de la reliure côté gauche */
.cover::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3.5%;
  width: 2px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.08));
}

.cover__eyebrow {
  font-size: 0.62em;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(247, 245, 239, 0.65);
}

.cover__photo {
  display: block;
  width: 100%;
  flex: 1 1 0; /* la photo prend la place restante */
  min-height: 0;
  margin: 10% 0 9%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

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

.cover__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55em;
  line-height: 1.05;
}

.cover__place {
  margin-top: 6%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 0.95em;
  color: rgba(247, 245, 239, 0.7);
}

/* ----- Couverture crème (un livre sur deux) ----- */
.cover--creme {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0.05)),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.012) 0 2px, transparent 2px 4px),
    #EDE8DF;
  color: #2b2926;
}

.cover--creme::before {
  border-color: rgba(68, 66, 61, 0.4);
}

.cover--creme::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.12), rgba(255, 255, 255, 0.4));
}

.cover--creme .cover__eyebrow,
.cover--creme .cover__place {
  color: rgba(43, 41, 38, 0.6);
}

/* ----- Bibliothèque (photo du meuble : noyer, marbre et textile taupe) -----
   Le meuble est une photo (1636 × 1226 px) avec 6 cases : 3 colonnes, 2 rangées.
   Chaque livre est placé dans sa case par realisations.js (--x : centre de la case,
   --y : hauteur de l'étagère, tous deux en % de la photo). */
.cabinet {
  position: relative;
  width: min(1240px, calc(100% - 80px));
  aspect-ratio: 1636 / 1226;
  margin: 0 auto 160px;
  background: url("assets/realisations/bibliotheque-taupe.jpg") center / 100% 100% no-repeat;
  container-type: inline-size;
}

.cabinet .books--cabinet {
  position: absolute;
  inset: 0;
  width: auto;
  margin: 0;
}

/* Un livre debout sur son étagère, posé au fond de la case */
.books--cabinet .book-item {
  position: absolute;
  left: calc(var(--x, 50%) - 7.75%);
  bottom: var(--y, 26%);
  width: 15.5%; /* ~ 340px de haut dans une case de ~395px */
  isolation: isolate; /* l'ombre de contact reste juste derrière le livre */
}

/* Ombre de contact sur l'étagère, sous le livre */
.books--cabinet .book-item::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -10%;
  bottom: -3px;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(15, 10, 6, 0.75) 0%, rgba(15, 10, 6, 0.35) 45%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.books--cabinet .book {
  position: relative;
  font-size: 0.93cqw; /* le texte de la couverture suit la taille du meuble */
  transition: translate 0.35s ease;
}

.books--cabinet .book:hover,
.books--cabinet .book:focus-visible {
  translate: 0 -4%; /* le livre se soulève de l'étagère */
}

/* La couverture prend la lumière chaude de la LED du haut de la case */
.books--cabinet .cover {
  filter: brightness(0.9) sepia(0.12) saturate(0.95);
  box-shadow:
    1px 0 0 #E9E4DA, 2px 0 0 #DDD7CB, 3px 0 0 #E9E4DA, 4px 0 0 #D6CFC2,
    5px 0 0 #E4DED3, 6px 0 0 #CFC8BA,
    /* ombre portée sur le textile du fond (lumière venant du haut) */
    0 10px 18px -4px rgba(20, 13, 8, 0.55),
    0 2px 30px rgba(20, 13, 8, 0.35);
}

/* Dégradé de lumière : haut éclairé, bas plus sombre près de l'étagère */
.books--cabinet .book__body::after {
  content: "";
  position: absolute;
  inset: 0 -6px 0 0;
  background: linear-gradient(180deg,
    rgba(255, 236, 205, 0.16) 0%,
    rgba(255, 236, 205, 0) 30%,
    rgba(25, 16, 10, 0) 60%,
    rgba(25, 16, 10, 0.22) 100%);
  border-radius: 2px 4px 4px 2px;
  pointer-events: none;
}

/* Téléphone : pas d'étagère, les livres les uns sous les autres */
@media (max-width: 600px) {
  .cabinet {
    width: calc(100% - 48px);
    aspect-ratio: auto;
    margin: 8px auto 88px;
    background: none;
  }

  .cabinet .books--cabinet {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
  }

  .books--cabinet .book-item {
    position: static;
    width: min(300px, 100%);
  }

  .books--cabinet .book {
    font-size: 15px;
  }

  .books--cabinet .book:hover,
  .books--cabinet .book:focus-visible {
    translate: none;
  }

  /* hors du meuble : pas d'éclairage ni d'ombre d'étagère */
  .books--cabinet .book-item::after,
  .books--cabinet .book__body::after {
    content: none;
  }

  .books--cabinet .cover {
    filter: none;
  }
}

/* ===== Visionneuse (livre ouvert en grand) ===== */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(36, 34, 31, 0.97);
  color: #F7F5EF;
  /* taille d'une page : tient dans l'écran en largeur (2 pages) et en hauteur */
  --pw: min(620px, calc((100vw - 32px) / 2), calc((100vh - 170px) * 0.75)); /* livre ouvert en grand, limité par la hauteur de l écran */
  --ph: calc(var(--pw) * 4 / 3);
}

.viewer__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
}

.viewer__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
}

.viewer__close {
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: 1px solid rgba(247, 245, 239, 0.35);
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
}

.viewer__close:hover {
  border-color: #F7F5EF;
}

.viewer__stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2400px;
}

.viewer__controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  padding: 20px 0 28px;
}

.viewer__nav {
  width: 48px;
  height: 48px;
  font-size: 1.3rem;
  background: none;
  border: 1px solid rgba(247, 245, 239, 0.35);
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.2s, opacity 0.2s;
}

.viewer__nav:hover:not(:disabled) {
  border-color: #F7F5EF;
}

.viewer__nav:disabled {
  opacity: 0.25;
  cursor: default;
}

.viewer__count {
  min-width: 150px;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(247, 245, 239, 0.7);
}

/* Le livre : deux pages côte à côte, les feuilles pivotent autour de la reliure */
.flipbook {
  position: relative;
  flex-shrink: 0; /* garde ses deux pages même si l'écran est plus étroit (téléphone) */
  width: calc(var(--pw) * 2);
  height: var(--ph);
  transform-style: preserve-3d;
  transition: transform 0.9s ease;
}

/* Livre fermé : centré sur la couverture, ou sur la 4e de couverture à la fin */
.flipbook.is-closed-front { transform: translateX(calc(var(--pw) * -0.5)); }
.flipbook.is-closed-back { transform: translateX(calc(var(--pw) * 0.5)); }

/* Pas d'animation quand on remet le livre fermé avant de l'ouvrir */
.flipbook.no-anim { transition: none; }

/* Une seule ombre pour tout le livre (et non une par feuille, qui s'empilaient
   et débordaient sur la page d'en face). Elle couvre les deux pages quand le
   livre est ouvert, une seule page quand il est fermé. */
.flipbook::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transform: translateZ(-2px); /* derrière les feuilles */
  pointer-events: none;
  transition: left 0.9s ease, right 0.9s ease;
}

.flipbook.is-closed-front::before { left: 50%; }
.flipbook.is-closed-back::before { right: 50%; }
.flipbook.no-anim::before { transition: none; }

.leaf {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.45, 0.05, 0.25, 1);
}

.leaf.is-flipped {
  transform: rotateY(-180deg);
}

.leaf__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  cursor: pointer;
}

.leaf__back {
  transform: rotateY(180deg);
}

/* ----- Pages ----- */
.page {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #F7F5EF;
  color: #111;
}

/* Ombre de la reliure : à gauche sur les pages de droite, à droite sur celles de gauche */
.leaf__front .page::after,
.leaf__back .page::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14%;
  pointer-events: none;
}

.leaf__front .page::after {
  left: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent);
}

.leaf__back .page::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(0, 0, 0, 0.18), transparent);
}

.page--cover {
  background: none;
}

.page--cover .cover {
  height: 100%;
  aspect-ratio: auto;
  font-size: calc(var(--pw) / 20);
  border-radius: 0 4px 4px 0;
}

.page--back {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #44423D;
}

.page--back img {
  width: 50%;
  filter: invert(1);
  opacity: 0.8;
}

.page--intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14% 13%;
  font-size: calc(var(--pw) / 28);
}

.page__eyebrow {
  font-size: 0.8em;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.5);
}

.page__title {
  margin-top: 0.6em;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.6em;
  font-weight: 400;
  line-height: 1.05;
}

.page__place {
  margin-top: 0.3em;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 1.3em;
  color: rgba(17, 17, 17, 0.6);
}

.page__line {
  display: block;
  width: 40px;
  height: 1px;
  background: rgba(17, 17, 17, 0.4);
  margin: 1.6em 0;
}

.page__text {
  font-size: 1em;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.7);
}

.page--photo {
  padding: 10% 9% 14%;
}

.page--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain; /* photo seule : affichée en entier, sans être recadrée */
}

/* Deux photos sur la même page, l'une au-dessus de l'autre */
.page--photo-2 {
  display: flex;
  flex-direction: column;
  gap: 5%;
}

.page--photo-2 img {
  object-fit: cover;
  height: auto;
  flex: 1 1 0;
  min-height: 0;
}

/* Deux photos décalées : la première en haut à gauche, la seconde en bas à droite */
.page--photo-decale img {
  position: absolute;
  width: 52%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.page--photo-decale img:first-of-type {
  top: 6%;
  left: 9%;
}

.page--photo-decale img:last-of-type {
  bottom: 12%;
  right: 6%;
}

.page__num {
  position: absolute;
  bottom: 4.5%;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: calc(var(--pw) / 30);
  color: rgba(17, 17, 17, 0.45);
}

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

@media (max-width: 600px) {
  .viewer__top {
    padding: 14px 16px;
  }

  .viewer__title {
    font-size: 1.05rem;
  }

  /* Une seule page, la plus grande possible : toute la largeur de l'écran */
  .viewer {
    --pw: min(calc(100vw - 32px), calc((100vh - 150px) * 0.75), calc((100dvh - 150px) * 0.75));
  }

  .viewer__stage {
    overflow: hidden; /* la page de gauche (vide) reste hors de l'écran */
  }
}

/* Page seule (téléphone) : le livre reste cadré sur la page de droite */
.flipbook.flipbook--page-seule {
  transform: translateX(calc(var(--pw) * -0.5));
}

.flipbook.flipbook--page-seule::before {
  left: 50%;
}

/* =====================================================================
   ===== Page Sur Mesure : pièces personnalisées =====
   ===================================================================== */

/* ----- Éléments communs ----- */
.sm-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(17, 17, 17, 0.5);
  margin-bottom: 14px;
}

.sm-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.05;
}

/* Nuancier : pastilles des matériaux choisis */
.sm-swatches {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 24px;
  font-size: 0.85rem;
  color: rgba(17, 17, 17, 0.7);
}

.sm-swatches li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sm-swatches__chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), 0 0 0 3px #F7F5EF, 0 0 0 4px rgba(17, 17, 17, 0.15);
}

/* ----- Triptyque -----
   Grande photo de face à gauche ; à droite, la vue de dos et le détail
   l'un au-dessus de l'autre. Le titre et le texte sont en dessous. */
.sm-triptyque {
  width: min(980px, calc(100% - 80px));
  margin: 0 auto;
}

.sm-trip {
  margin-bottom: 140px;
}

/* Les photos s'affichent en entier (pas de recadrage).
   La largeur exacte des colonnes est recalculée en JS d'après le format des photos
   (voir fitTrip dans sur-mesure.js) ; la valeur ci-dessous sert en attendant. */
.sm-trip__images {
  display: grid;
  grid-template-columns: 2.13fr 1fr;
  gap: 16px;
  align-items: start;
}

.sm-trip__fig {
  margin: 0;
  background: #ece8df;
}

.sm-trip__fig img {
  width: 100%;
  height: auto;
  display: block;
}

.sm-trip__col {
  display: grid;
  gap: 16px;
}

.sm-trip__text {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  margin-top: 48px;
}

.sm-trip__text .sm-case__text {
  margin: 0;
  max-width: 620px;
}

/* Tablette / mobile : la pièce en grand, puis vue de dos et détail côte à côte */
@media (max-width: 900px) {
  .sm-trip__images {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sm-trip__col {
    grid-template-columns: 1fr 1fr; /* proportions exactes recalculées en JS */
    gap: 12px;
  }

  .sm-trip__text {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
  }
}

/* Texte de présentation */
.sm-case__text {
  margin: 22px 0 32px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: rgba(17, 17, 17, 0.72);
}

/* ----- Appel à l'action ----- */
.sm-cta {
  width: min(1300px, calc(100% - 80px));
  margin: 0 auto 140px;
  padding-top: 80px;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
  text-align: center;
}

.sm-cta .section-eyebrow {
  justify-content: center;
}

.sm-cta__title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.15;
}

.sm-cta__link {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 32px;
  border: 1px solid #111;
  color: #111;
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  transition: background 0.25s, color 0.25s;
}

.sm-cta__link:hover {
  background: #111;
  color: #F7F5EF;
}

/* ----- Mobile ----- */
@media (max-width: 600px) {
  .sm-triptyque,
  .sm-cta {
    width: calc(100% - 32px);
  }

  .sm-title,
  .sm-cta__title {
    font-size: 2rem;
  }

}

/* =====================================================================
   ===== Page Contact : aux couleurs du site (crème, anthracite, noyer) =====
   ===================================================================== */

.contact-page {
  --accent: #44423D;   /* anthracite du site (bouton Contact, filtres) */
  --noyer: #6b4a33;    /* brun noyer de la bibliothèque */
  background: #F7F5EF;
  color: #111;
}

.contact {
  width: min(1150px, calc(100% - 80px));
  margin: 0 auto;
  padding: 88px 0 110px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: stretch; /* la photo prend la hauteur du formulaire */
}

.contact__eyebrow {
  margin-bottom: 32px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1.05;
  color: var(--accent);
}

/* ----- Formulaire ----- */
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(17, 17, 17, 0.6);
}

/* Champs encadrés, fond un peu plus clair que la page */
.field__input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 0;
  background: #fbfaf6;
  font: inherit;
  font-size: 0.94rem;
  color: #111;
  transition: border-color 0.25s, background 0.25s;
}

.field__input::placeholder {
  color: rgba(17, 17, 17, 0.38);
}

.field__input:hover {
  border-color: rgba(17, 17, 17, 0.32);
}

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
}

select.field__input {
  appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2344423D' stroke-width='1.2'/%3E%3C/svg%3E") right 16px center no-repeat,
    #fbfaf6;
}

select.field__input option {
  background: #fbfaf6;
  color: #111;
}

/* Zone de message : hauteur fixe, pas de poignée ;
   au-delà, une barre de défilement apparaît dans la zone */
.field__input--area {
  resize: none;
  height: 180px;
  overflow-y: auto;
  line-height: 1.55;
}

.field.is-invalid .field__input {
  border-color: #a33a2a;
}

.field.is-invalid .field__label {
  color: #a33a2a;
}

/* Consentement */
.consent {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 2px 0 22px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(17, 17, 17, 0.6);
  cursor: pointer;
}

.consent input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.consent.is-invalid {
  color: #a33a2a;
}

/* Bouton anthracite avec flèche, comme le bouton Contact du menu */
.contact-form__submit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 15px 32px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #F7F5EF;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.contact-form__submit span {
  transition: transform 0.25s;
}

.contact-form__submit:hover {
  background: transparent;
  color: var(--accent);
}

.contact-form__submit:hover span {
  transform: translateX(4px);
}

.contact-form__submit:disabled {
  opacity: 0.5;
  cursor: wait;
}

.contact-form__status {
  margin-top: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.contact-form__status.is-error {
  color: #a33a2a;
}

.contact-form__status.is-success {
  color: #3d5a3a;
}

/* ----- Photo ----- */
.contact__photo {
  position: relative; /* la photo remplit le cadre sans imposer sa propre hauteur */
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.45);
}

.contact__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 56px;
    padding: 96px 0 110px;
  }

  .contact__photo {
    aspect-ratio: 4 / 3;
    order: -1;
  }
}

@media (max-width: 600px) {
  .contact {
    width: calc(100% - 32px);
    padding: 56px 0 88px;
    gap: 44px;
  }

  .contact__eyebrow {
    font-size: 2.3rem;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form__submit {
    width: 100%;
    justify-content: center;
  }
}

/* Pas d'espace réservé tant qu'il n'y a pas de message : la photo s'arrête au niveau du bouton */
.contact-form__status:empty {
  display: none;
}

/* Mention d'information RGPD sous le formulaire */
.contact-form__rgpd {
  margin-top: 28px;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(17, 17, 17, 0.55);
}

.contact-form__rgpd a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ===== Liens légaux du footer ===== */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

/* ===== Pages légales (mentions légales, confidentialité) ===== */
.legal {
  padding: 96px 40px 140px;
}

.legal__head {
  max-width: 820px;
  margin: 0 auto 72px;
}

.legal__intro {
  margin-top: 28px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(17, 17, 17, 0.7);
}

.legal__body {
  max-width: 820px;
  margin: 0 auto;
  font-size: 0.98rem;
  line-height: 1.75;
  color: rgba(17, 17, 17, 0.8);
}

.legal__body section {
  padding: 40px 0;
  border-top: 1px solid rgba(17, 17, 17, 0.12);
}

.legal__body h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.9rem;
  font-weight: 400;
  line-height: 1.15;
  color: #111;
  margin-bottom: 20px;
}

.legal__body p + p,
.legal__body p + ul,
.legal__body ul + p,
.legal__body .legal__table-wrap + p {
  margin-top: 14px;
}

.legal__body ul {
  padding-left: 1.2em;
}

.legal__body li + li {
  margin-top: 8px;
}

.legal__body a {
  color: #111;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal__body strong {
  font-weight: 500;
  color: #111;
}

/* Liste intitulé / valeur */
.legal__list {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px 32px;
}

.legal__list dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(17, 17, 17, 0.5);
  padding-top: 5px;
}

.legal__table-wrap {
  overflow-x: auto;
}

.legal__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.legal__table th,
.legal__table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.legal__table th {
  font-size: 0.72rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(17, 17, 17, 0.5);
}

@media (max-width: 600px) {
  .legal {
    padding: 64px 16px 96px;
  }

  .legal__head {
    margin-bottom: 48px;
  }

  .legal__head .section-title {
    font-size: 2.6rem;
  }

  .legal__list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .legal__list dd {
    margin-bottom: 14px;
  }
}

/* ===== Crédit agence (footer) ===== */
.footer__credit-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
