/* ==========================================================================
   Style — brunochanel.com
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
  padding-top: var(--header-height);
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}
h1 { color: var(--color-primary); font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { color: var(--color-primary); font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { color: var(--color-primary); font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { color: var(--color-primary); }
h5, h6 { color: var(--color-accent); }

a {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
}
a:hover, a:focus-visible { color: var(--color-primary); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }
.section h2 { text-align: center; margin-bottom: 2.5rem; }

/* --- En-tête fixe --- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: var(--color-header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.site-header__inner {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
}

.site-header__left {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}
.icon-button:hover, .icon-button:focus-visible { background: var(--color-surface); color: var(--color-primary); }
.icon-button svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; }

[data-theme-icon="dark"] { display: none; }
:root[data-theme="dark"] [data-theme-icon="light"] { display: none; }
:root[data-theme="dark"] [data-theme-icon="dark"] { display: inline-flex; }

/* Menu burger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--color-text);
  margin: 0 auto;
}

.site-nav {
  position: fixed;
  top: var(--header-height);
  right: 0;
  background: var(--color-bg);
  border-left: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  border-radius: 0 0 0 var(--radius-sm);
  padding: 1rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  max-width: 260px;
  width: 100%;
}
.site-nav.is-open { transform: translateX(0); }

.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { margin-bottom: 0.5rem; }
.site-nav a { display: block; padding: 0.4rem 0.25rem; }
.site-nav ul ul { padding-left: 1rem; margin-top: 0.25rem; }
.site-nav ul ul a { font-weight: 400; font-family: var(--font-body); font-size: 0.9rem; }

@media (min-width: 860px) {
  .site-nav {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    padding: 0;
    max-width: none;
  }
  .site-nav > ul { display: flex; gap: 1.5rem; }
  .site-nav > ul > li { margin: 0; position: relative; }
  .site-nav ul ul {
    position: absolute;
    top: 100%; left: 0;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    min-width: 200px;
    display: none;
  }
  .site-nav > ul > li:hover ul ul,
  .site-nav > ul > li:focus-within ul ul { display: block; }
  .nav-toggle { display: none; }
}

/* --- Bloc bento générique --- */

.bento {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  transition: background-color 0.25s ease;
}
.bento--photo { padding: 0; overflow: hidden; border-radius: var(--radius-lg); }
.bento--photo img { width: 100%; height: 100%; object-fit: cover; }

/* --- Apparition au défilement --- */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --- Accueil --- */

.hero { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.hero .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: var(--bento-gap);
}

/* La photo d'accueil et la photo "A propos" partagent exactement la même taille */
.hero__photo,
.about__photo {
  width: 220px;
  height: 220px;
  flex: 0 0 auto;
  margin: 0 auto;
}

/* Le bloc de texte a toujours la même hauteur que la photo, mais sa
   largeur est élastique (comme le bloc bio de la section A propos). */
.hero__content {
  height: 220px;
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.hero__content h1 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
.hero__content p { font-size: 1.1rem; color: var(--color-text-muted); }

@media (min-width: 700px) {
  .hero__photo,
  .about__photo {
    width: 260px;
    height: 260px;
  }
  .hero__content { height: 260px; flex-basis: 300px; }
}

/* --- Carrousel générique --- */

.carousel { position: relative; }
.carousel__viewport { overflow: hidden; }
.carousel__track {
  display: flex;
  align-items: stretch;
  gap: var(--bento-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.5rem 0.25rem;
  scrollbar-width: none;
  transition: height 0.3s ease;
}
.carousel__track::-webkit-scrollbar { display: none; }

.carousel__slide {
  flex: 0 0 85%;
  scroll-snap-align: center;
  transition: opacity 0.3s ease, box-shadow 0.3s ease;
  opacity: 0.55;
}
.carousel__slide.is-active { opacity: 1; }

/* Le calcul retire précisément la largeur des espacements pour garantir
   un nombre de cartes entièrement visibles, sans fragment supplémentaire. */
@media (min-width: 640px) {
  .carousel__slide { flex-basis: calc((100% - var(--bento-gap)) / 2); }
}
@media (min-width: 960px) {
  .carousel__slide { flex-basis: calc((100% - 2 * var(--bento-gap)) / 3); }
}

.carousel__prev, .carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--color-bg);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1;
  color: var(--color-text);
}
.carousel__prev { left: -0.5rem; }
.carousel__next { right: -0.5rem; }

.carousel__dots { display: flex; justify-content: center; gap: 0.5rem; margin-top: 1.25rem; }
.carousel__dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: none; background: var(--color-border); cursor: pointer; padding: 0; }
.carousel__dot.is-active { background: var(--color-primary); }

/* Cartes "Comment puis-je vous aider ?" */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  height: 100%;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card__tag { font-family: var(--font-heading); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-primary); font-weight: 600; margin: 0 0 0.5rem; }
.card__text { margin: 0; }

/* --- Services : grille bento en croix --- */

.service { margin-bottom: 3.5rem; }
.service:last-child { margin-bottom: 0; }

.service__intro { text-align: center; margin-bottom: 1.5rem; }
.service__intro h3 { margin-bottom: 0.5rem; font-size: clamp(1.75rem, 3.5vw, 2.25rem); }
.service__intro p { max-width: 640px; margin: 0 auto; color: var(--color-text-muted); }

.service__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--bento-gap);
  margin-bottom: 1.5rem;
}

.service__visual {
  order: -1;
  grid-column: 1 / -1;
  aspect-ratio: 2.2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.service__visual img { max-width: 40%; max-height: 80%; object-fit: contain; }

.service__point {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.service__point h4 { margin-bottom: 0.4rem; }
.service__point p { margin: 0; font-size: 0.95rem; }

.service__note {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.service__note img { max-width: 160px; }
.service__note p { margin: 0; flex: 1 1 240px; font-size: 0.9rem; color: var(--color-text-muted); }

@media (min-width: 700px) {
  .service__grid {
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .service__visual { order: 0; grid-column: 2; grid-row: 1 / span 2; aspect-ratio: auto; }
  .service__visual img { max-width: 70%; }
  .service__point:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .service__point:nth-of-type(2) { grid-column: 1; grid-row: 2; }
  .service__point:nth-of-type(3) { grid-column: 3; grid-row: 1; }
  .service__point:nth-of-type(4) { grid-column: 3; grid-row: 2; }
}

/* --- Témoignages --- */

.testimonials__grid { display: grid; grid-template-columns: 1fr; gap: var(--bento-gap); }
.testimonials__photo { aspect-ratio: 1 / 1; width: 140px; margin: 0 auto; }
.testimonials__carousel .carousel__slide { flex-basis: 100%; }
.testimonials__carousel .carousel__track {
  padding: 0;
  /* Chaque carte garde sa propre hauteur (pas d'étirement sur la plus
     grande) : le JS mesure ensuite la carte active et applique cette
     hauteur au carrousel, pour ne jamais laisser de vide. */
  align-items: flex-start;
}
.testimonial {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  height: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
}
.testimonial__quote { margin: 0; font-style: italic; font-size: 1.1rem; }
.testimonial__auteur { margin: 0; color: var(--color-text-muted); font-family: var(--font-heading); }

@media (min-width: 700px) {
  .testimonials__grid { grid-template-columns: 180px 1fr; align-items: start; }
  .testimonials__photo { width: 180px; }
}

/* --- J'ai rendez-vous avec vous --- */

.rendezvous {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.rendezvous__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.rendezvous__veil { position: absolute; inset: 0; background: var(--color-overlay); z-index: 1; }
.rendezvous__content {
  position: relative;
  z-index: 2;
  margin: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-sm);
  background: var(--color-overlay);
  backdrop-filter: blur(4px);
  color: #fff;
  max-width: 480px;
}
.rendezvous__content h2 { color: #cfe8fa; text-align: center; margin-bottom: 0.75rem; }
.rendezvous__content p { margin: 0.25rem 0; }
.rendezvous__content a { color: #cfe8fa; }

/* --- A propos --- */

.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--bento-gap);
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
  justify-items: center;
}
.about__bio { font-size: 0.95rem; }
.about__bio p { margin: 0 0 1em; }
.about__bio ul { margin: 0 0 1em; padding-left: 1.2em; }
.about__bio p:last-child, .about__bio ul:last-child { margin-bottom: 0; }
.about__badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--bento-gap); width: 100%; }
.about__badge { flex: 1 1 140px; text-align: center; font-size: 0.85rem; padding: 1rem; }

@media (min-width: 700px) {
  .about__grid { grid-template-columns: 260px 1fr; justify-items: stretch; }
}

/* --- Pied de page --- */

.site-footer { padding: 2rem 0; text-align: center; border-top: 1px solid var(--color-border); }
.site-footer a { color: var(--color-text-muted); font-weight: 400; font-family: var(--font-body); }
.site-footer a:hover { color: var(--color-primary); }
.site-footer__credit { font-size: 0.8rem; color: var(--color-text-muted); margin: 0 0 0.75rem; }

/* --- Pages légales --- */

.legal { padding: 3rem 0; max-width: 760px; margin: 0 auto; }
.legal h2 { text-align: left; }
.legal section { margin-bottom: 2.5rem; }
