@font-face {
  font-family: "Aboreto";
  src: url("../fonts/aboreto-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ========== 1. Variables ========== */
:root {
  color-scheme: light;
  --c-bg: #ffffff;
  --c-surface: #fff;
  --c-text: #111;
  --c-muted: #666;
  --c-border: #ddd;
  --c-media-bg: #eee;
  --c-dark: #000;
  --c-light: #fff;
  --c-btn-contrast-bg: #000;
  --c-btn-contrast-text: #fff;
  --c-btn-contrast-bg-hover: #fff;
  --c-btn-contrast-text-hover: #000;
  --c-warning: #b45309;
  --shadow-media: 0 8px 24px rgb(0 0 0 / 0.18);

  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --fs-body: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --fs-h1: clamp(2.25rem, 1.1rem + 4.5vw, 5rem);
  --font-title: "Aboreto", Georgia, serif;

  --space-s: clamp(0.5rem, 1vw, 0.75rem);
  --space-m: clamp(1rem, 2.5vw, 1.5rem);
  --space-l: clamp(2rem, 6vw, 4rem);

  --radius: clamp(16px, 3vw, 32px);
  --header-h: clamp(4.5rem, 3rem + 4vw, 6.5rem);

  /* Formats responsifs des images (du plus vertical au plus horizontal) */
  --ratio-mobile: 3 / 4;
  --ratio-tablet: 4 / 3;
  --ratio-desktop: 16 / 9;
  --ratio-wide: 21 / 9;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --c-bg: #111;
    --c-surface: #1b1b1b;
    --c-text: #f4f4f4;
    --c-muted: #b5b5b5;
    --c-border: #414141;
    --c-media-bg: #252525;
    --c-dark: #050505;
    --c-light: #fff;
    --c-btn-contrast-bg: #fff;
    --c-btn-contrast-text: #000;
    --c-btn-contrast-bg-hover: #000;
    --c-btn-contrast-text-hover: #fff;
    --c-warning: #fbbf24;
    --shadow-media: 0 8px 24px rgb(0 0 0 / 0.45);
  }

  .brand__logo,
  .virtual-brand img {
    filter: brightness(0) invert(1);
  }
}

/* ========== 2. Base ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}
html.menu-open {
  overflow: hidden;
} /* bloque le défilement quand le menu est ouvert */

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
h1 {
  font-weight: 300;
  font-size: var(--fs-h1);
  line-height: 1.1;
  margin: 0;
}

main {
  padding: var(--space-l) var(--space-m);
}

/* ========== 3. Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-m);
  background: var(--c-bg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  margin-left: clamp(0.75rem, 1.5vw, 1.25rem);
}
.brand__logo {
  width: 3.5rem;
  height: 3.5rem;
}

.brand__name {
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.2rem);
  line-height: 1;
}

/* Bouton burger */
.burger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0.75rem;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--c-text);
  transition: transform 0.25s;
}
.burger[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}
.burger[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Très petits écrans : évite que le burger chevauche le nom du site */
@media (max-width: 22.5em) {
  .brand {
    gap: var(--space-s);
    margin-left: 0.5rem;
  }
  .brand__logo {
    width: 3rem;
    height: 3rem;
  }
  .brand__name {
    font-size: 1.1rem;
  }
  .burger {
    padding: 0.5rem;
  }
}

/* Menu : sur mobile, un panneau plein écran sous le header */
.nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  gap: var(--space-m);
  padding: var(--space-m);
  overflow-y: auto;
  font-size: 1.75rem;
  background: var(--c-bg);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.25s,
    visibility 0.25s;
}
.nav.is-open {
  visibility: visible;
  opacity: 1;
}

/* Mobile et tablette : liens simples, sans apparence de bouton */
.nav a.btn {
  display: inline-block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  line-height: inherit;
  text-decoration: none;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

/* Barre qui glisse d'un lien à l'autre au survol (ajoutée par le JS) 
.nav__glider {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
    width 0.35s cubic-bezier(0.65, 0, 0.35, 1),
    opacity 0.2s ease;
}*/

/* ========== 4. Footer ========== */
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-l) var(--space-m);
  background: var(--c-dark);
  color: var(--c-light);
  text-align: center;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m);
  font-size: 0.9rem;
}

.footer-identity {
  text-align: center;
}
.footer-name {
  margin: 0;
  font-family: "Aboreto", Georgia, serif;
  font-weight: normal;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.footer-role {
  margin: 0;
}

.footer-legal {
  margin: var(--space-l) 0 0;
  font-size: 0.75rem;
  opacity: 0.7;
}
.footer-legal a {
  text-decoration: underline;
}

.footer-logo {
  width: clamp(5rem, 12vw, 7.5rem);
  height: auto;
}
/* ========== 4b. Accueil : hero et carrousel ========== */
.hero {
  padding: var(--space-l) var(--space-m) var(--space-m);
}

.carousel {
  padding-bottom: var(--space-l);
}

.carousel__track {
  display: flex;
  gap: var(--space-m);
  padding-inline: var(--space-m);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space-m);
  scrollbar-width: none; /* cache la barre de défilement */
}
.carousel__track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 88%;
  scroll-snap-align: center;
}
.slide a {
  position: relative;
  display: block;
}

.slide__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden; /* coupe l'image aux coins arrondis */
  background: var(--c-media-bg) center / cover;
  box-shadow: var(--shadow-media);
}
.slide__media picture {
  display: block; /* rend le pourcentage de hauteur utilisable */
  width: 100%;
  height: 100%;
}
.slide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* remplit le cadre en recadrant si besoin */
}

.slide__title {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 3rem var(--space-m) var(--space-m);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 300;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  color: var(--c-light);
  background: linear-gradient(to top, rgb(0 0 0 / 0.65), transparent);
}

.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  margin-top: var(--space-m);
}
.carousel__btn {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.5rem;
  line-height: 1;
  border: 1px solid var(--c-border);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.carousel__dots {
  display: flex;
  gap: 0.75rem;
}
.carousel__dot {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 1px solid var(--c-text);
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.carousel__dot[aria-current="true"] {
  background: var(--c-text);
}

@media (prefers-reduced-motion: no-preference) {
  .carousel__track {
    scroll-behavior: smooth;
  }
}

/* ========== 4c. Effets de survol ========== */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* Liens du footer */
  .footer-nav a,
  .carousel__btn,
  .carousel__dot {
    transition:
      transform 0.25s ease,
      opacity 0.25s ease;
  }
  .footer-nav a:hover {
    transform: scale(1.1);
  }

  /* Les autres liens s'estompent */
  .footer-nav:hover a:not(:hover) {
    opacity: 0.4;
  }

  /* Flèches et points */
  .carousel__btn:hover,
  .carousel__dot:hover {
    transform: scale(1.2);
  }

  /* Diapositives : l'image zoome dans son cadre, les autres s'estompent */
  .slide {
    transition: opacity 0.3s ease;
  }
  .slide__media img {
    transition: transform 0.5s ease;
  }
  .slide:hover .slide__media img {
    transform: scale(1.05);
  }
  .carousel__track:hover .slide:not(:hover) {
    opacity: 0.55;
  }
}

/* Mobile/tablette : l'ancien effet de survol des liens simples */
@media (hover: hover) and (prefers-reduced-motion: no-preference) and (max-width: 63.999em) {
  .nav a:hover {
    transform: scale(1.1);
  }
  .nav:hover a:not(:hover) {
    opacity: 0.4;
  }
}

/* ========== 5. Desktop (à partir de 1024 px) ========== */
@media (min-width: 64em) {
  .burger {
    display: none;
  }
  .nav {
    position: relative; /* nécessaire pour positionner .nav__glider */
    inset: auto; /* annule le "inset" hérité de la version mobile (panneau plein écran) */
    flex-direction: row;
    gap: clamp(0.35rem, 0.8vw, 0.65rem);
    margin-right: clamp(0.75rem, 1.5vw, 1.5rem);
    padding: 0;
    overflow: visible;
    font-size: clamp(0.9rem, 0.82rem + 0.2vw, 1rem);
    visibility: visible;
    opacity: 1;
  }

  /* Boutons uniquement sur desktop : fond plein, sans contour */
  .nav a.btn {
    padding: 0.5em 0.85em;
    border-radius: 999px;
    background: var(--c-btn-contrast-bg);
    color: var(--c-btn-contrast-text);
    line-height: 1.2;
    transition:
      background-color 0.25s ease,
      color 0.25s ease;
  }

  /* Inversion au survol */
  .nav a.btn:hover {
    background: var(--c-btn-contrast-bg-hover);
    color: var(--c-btn-contrast-text-hover);
  }

  /* Focus clavier uniquement (indicateur d'accessibilité) */
  .nav a.btn:focus-visible {
    background: var(--c-btn-contrast-bg-hover);
    color: var(--c-btn-contrast-text-hover);
    outline: 2px solid var(--c-btn-contrast-bg);
    outline-offset: 2px;
  }

  /* Page active : couleurs inversées par rapport aux autres boutons */
  .nav a.btn[aria-current="page"] {
    background: var(--c-btn-contrast-bg-hover);
    color: var(--c-btn-contrast-text-hover);
  }

  .slide {
    flex-basis: 78%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav a.btn,
  .about-section__link {
    transition: none;
  }
}

/* ========== 5b. Formats responsifs des images ========== */
/* S'applique au carrousel de l'accueil ET aux photos de couverture des pages */
.slide__media,
.cover {
  aspect-ratio: var(--ratio-mobile); /* très vertical sur mobile */
}

@media (min-width: 48em) {
  .slide__media,
  .cover {
    aspect-ratio: var(--ratio-tablet);
  }
}

@media (min-width: 64em) {
  .slide__media,
  .cover {
    aspect-ratio: var(--ratio-desktop); /* horizontal sur desktop */
  }
}

@media (min-width: 90em) {
  .slide__media,
  .cover {
    aspect-ratio: var(--ratio-wide); /* très horizontal sur grand écran */
  }
}

/* ========== 4d. Pages d'univers ========== */
.block {
  max-width: 72rem;
  margin-inline: auto;
  padding: var(--space-l) var(--space-m);
}
.block__title {
  margin: 0 0 var(--space-m);
  font-family: var(--font-title);
  font-weight: normal;
  font-size: clamp(1.75rem, 1rem + 2.5vw, 3rem);
}

/* Présentation du photographe sur la page d'accueil */
.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(16rem, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.about-section--reverse {
  grid-template-columns: minmax(16rem, 0.95fr) minmax(0, 1.05fr);
}
.about-section--reverse .about-section__photo { grid-column: 1; grid-row: 1; }
.about-section--reverse .about-section__copy { grid-column: 2; grid-row: 1; }
.about-section__title {
  margin: 0 0 var(--space-m);
  font-family: var(--font-title);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.8rem);
  font-weight: normal;
  line-height: 1.2;
}
.about-section__copy > p:not(.page-hero__kicker) {
  max-width: 40rem;
}
.about-section__link {
  display: inline-block;
  margin-top: var(--space-s);
  padding: 0.75em 1.5em;
  border: 0;
  border-radius: 999px;
  background: var(--c-btn-contrast-bg);
  color: var(--c-btn-contrast-text);
  line-height: 1.2;
  text-decoration: none;
  transition:
    background-color 0.25s ease,
    color 0.25s ease;
}
.about-section__link:hover {
  background: var(--c-btn-contrast-bg-hover);
  color: var(--c-btn-contrast-text-hover);
}
.about-section__link:focus-visible {
  background: var(--c-btn-contrast-bg-hover);
  color: var(--c-btn-contrast-text-hover);
  outline: 2px solid var(--c-btn-contrast-bg);
  outline-offset: 2px;
}
.about-section__photo {
  width: 100%;
  max-width: 34rem;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  background: var(--c-media-bg);
}
.about-section__photo picture,
.about-section__photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.about-section__photo img {
  object-fit: cover;
}

@media (max-width: 47.999em) {
  .about-section,
  .about-section--reverse {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-m);
  }
  .about-section--reverse .about-section__photo,
  .about-section--reverse .about-section__copy {
    grid-column: 1;
    grid-row: auto;
  }
  .about-section__photo {
    max-width: none;
    margin-top: var(--space-s);
  }
}

/* Intro */
.page-hero { padding-bottom: 0; }
.page-hero__kicker {
  margin: 0 0 var(--space-s);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.page-hero__lead {
  max-width: 40rem;
  margin: var(--space-m) 0 0;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
}

/* Couverture : même cadre arrondi que le carrousel */
.cover {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-media-bg);
  box-shadow: var(--shadow-media);
}
.cover picture { display: block; width: 100%; height: 100%; }
.cover img,
.slide__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover-slide-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 650ms ease;
}
.cover-slide-layer.is-active { opacity: 1; }

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

.portfolio-section__link { margin: var(--space-m) 0 0; }

/* Section de couverture élargie : l'image occupe plus de place */
.cover-block {
  max-width: 88rem;
}

/* Offres : cartes qui se répartissent toutes seules */
.offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-m);
}
.offer {
  padding: var(--space-m);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.offer h3 { margin: 0 0 var(--space-s); font-weight: 400; }
.offer p { margin: 0; color: var(--c-muted); }

/* Grille portfolio */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-m);
}
.gallery figure {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-media-bg);
}
.gallery figure.is-hidden {
  display: none;
}
.gallery img,
.gallery video { width: 100%; height: 100%; object-fit: cover; }

/* Visite virtuelle et plans pour l'immobilier */
.virtual-services {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.virtual-services__copy { text-align: center; }
.virtual-services__copy p { max-width: 42rem; margin-inline: auto; color: var(--c-muted); }
.virtual-services__brands {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-m);
}
.virtual-brand {
  min-height: 9rem;
  margin: 0;
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-m);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: var(--radius);
  text-align: center;
}
.virtual-brand img {
  width: auto;
  max-width: min(100%, 8rem);
  max-height: 3rem;
  object-fit: contain;
}
.virtual-brand figcaption { color: var(--c-muted); font-size: 0.95em; }

@media (max-width: 47.999em) {
  .virtual-services { grid-template-columns: minmax(0, 1fr); }
  .virtual-services__brands { grid-template-columns: minmax(0, 1fr); }
  .virtual-brand { min-height: 8rem; }
}

/* Appel à l'action */
.cta { text-align: center; }
.btn {
  display: inline-block;
  padding: 0.9em 2em;
  border: 1px solid var(--c-text);
  border-radius: 999px;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--c-text); color: var(--c-bg); }
button.btn {
  font: inherit;
  background: none;
  cursor: pointer;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: scale(1.05); }
}


/* ========== 4e. Page Contact ========== */
.contact-grid {
  display: grid;
  gap: var(--space-l);
}
.contact-column { min-width: 0; }
.contact-info {
  grid-column: 1 / -1;
  width: min(100%, 58rem);
  justify-self: center;
  padding: var(--space-l) var(--space-m);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  text-align: center;
}
.contact-info .block__title { margin-bottom: var(--space-m); }
.contact-info ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-m) var(--space-l);
}
.contact-info li { flex: 1 1 12rem; }
.contact-info a { text-decoration: underline; }

.contact-photo {
  width: 100%;
  max-width: 28rem;
  aspect-ratio: 2 / 3;
  margin: 0;
  justify-self: center;
  align-self: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-media-bg);
}
.contact-photo picture,
.contact-photo img {
  display: block;
  width: 100%;
  height: 100%;
}
.contact-photo img { object-fit: cover; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  padding: 0.7em 1em;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-bg);
  color: var(--c-text);
}
.contact-form .btn {
  align-self: flex-start;
}

@media (min-width: 64em) {
  .contact-grid { grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.9fr); }
}

@media (max-width: 47.999em) {
  .contact-info li { flex-basis: 100%; }
}

/* ========== 4f. Page Galerie (filtres) ========== */

/* ========== Filtres ========== */

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin-bottom: var(--space-m);
}
.filter-tabs button {
  font: inherit;
  padding: 0.5em 1.2em;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.filter-tabs button[aria-pressed="true"] {
  background: var(--c-text);
  color: var(--c-bg);
  border-color: var(--c-text);
}

.gallery-link {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}
.gallery-link__media {
  aspect-ratio: 4 / 3;
  background: var(--c-media-bg);
}
.gallery-link__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-link__name {
  position: absolute;
  inset: auto 0 0 0;
  margin: 0;
  padding: 2.5rem var(--space-m) var(--space-m);
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--c-light);
  background: linear-gradient(to top, rgb(0 0 0 / 0.65), transparent);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gallery-link__media img { transition: transform 0.5s ease; }
  .gallery-link:hover .gallery-link__media img { transform: scale(1.05); }
}

/* ========== 4g. Page Mentions légales ========== */
.legal-section {
  max-width: 46rem;
}
.legal-section + .legal-section {
  margin-top: var(--space-l);
}
.legal-section h3 {
  margin: 0 0 var(--space-s);
  font-family: var(--font-title);
  font-weight: normal;
  font-size: 1.25rem;
}
.legal-section p,
.legal-section li {
  color: var(--c-muted);
}
.legal-section a {
  text-decoration: underline;
  color: var(--c-text);
}
.legal-section ul {
  margin: 0;
  padding-left: 1.2em;
}
.legal-placeholder {
  color: var(--c-warning);
  font-weight: 600;
}
