/* ====== Variables (palette finale) ====== */
:root {
  /* Couleurs */
  --title-color: #2A241B;   /* Titres */
  --text-color:  #5B4F3E;   /* Texte / paragraphe */

  --btn-bg:      #C2A875;   /* Bouton fond */
  --btn-bg-hover:#A98F5C;   /* Bouton hover */
  --btn-text:    #0F0F0F;   /* Texte bouton */

  /* Overlay (améliore la lisibilité sur les buildings) */
  --overlay-top: 0.10;
  --overlay-mid: 0.15;
  --overlay-bot: 0.28;

  /* Image hero */
  --hero-image: url("./assets/_DSF6546.jpg");
}

/* ====== Base ====== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: #ffffff;
}

/* Cache le honeypot Netlify (anti-spam) */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* fléche retour vers le haut */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;

  width: 44px;
  height: 44px;
  border-radius: 50%;

  background-color: var(--btn-bg);
  color: var(--btn-text);

  border: none;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);

  transition: opacity 200ms ease, transform 200ms ease;
  z-index: 100;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--btn-bg-hover);
  transform: translateY(-2px);
}


.back-to-top svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Petite animation au hover (optionnelle mais élégante) */
.back-to-top:hover svg {
  transform: translateY(-2px);
  transition: transform 160ms ease;
}

/* ====== Hero / Landing ====== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: flex-start; /* contenu en haut */
  justify-content: center;

  padding-top: clamp(80px, 12vh, 160px);
  padding-left: clamp(24px, 4vw, 64px);
  padding-right: clamp(24px, 4vw, 64px);

  position: relative;
  isolation: isolate;

  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay léger (pas une ombre texte) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, var(--overlay-top)) 0%,
    rgba(0, 0, 0, var(--overlay-mid)) 45%,
    rgba(0, 0, 0, var(--overlay-bot)) 100%
  );
}

/* Contenu */
.hero__content {
  text-align: center;
  max-width: 900px;

  display: flex;
  flex-direction: column;
  align-items: center; /* clé du centrage vertical */
}

/* ====== Titre ====== */
.hero__title {
  margin-bottom: 40px;
  color: var(--title-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
}

/* ====== Paragraphe ====== */
.hero__subtitle {
  margin-top: 0;
  margin-bottom: 48px;
  max-width: 52ch;

  color: var(--text-color);
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.55;

  text-wrap: balance;
}

/* ====== Bouton ====== */
.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 24px;
  border-radius: 999px;
  margin-top: 0px;

  background-color: var(--btn-bg);
  color: var(--btn-text);

  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;

  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 160ms ease, transform 160ms ease;
}

.hero__btn:hover {
  background-color: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.hero__btn:active {
  transform: translateY(0);
}

.hero__btn:focus-visible {
  outline: 3px solid rgba(194, 168, 117, 0.55);
  outline-offset: 4px;
}

/* ====== Bouton positionné plus bas dans l'écran ====== */
.hero__btn--fixed {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);

  bottom: clamp(48px, 8vh, 96px); /* distance du bas de l'écran */

  z-index: 10;
}

/* Fix spécifique quand le bouton est en mode "plus bas" (absolute centré) */
.hero__btn--fixed:hover {
  background-color: var(--btn-bg-hover);
  transform: translateX(-50%) translateY(-1px);
}

.hero__btn--fixed:active {
  transform: translateX(-50%) translateY(0);
}

/* Wave divider */
.custom-shape-divider-top-1770404141 {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 2;
  transform: rotate(180deg);
}

.custom-shape-divider-top-1770404141 svg {
  display: block;
  width: calc(100% + 1.3px);
  height: clamp(36px, 5vw, 72px);
}

.custom-shape-divider-top-1770404141 .shape-fill {
  fill: #ffffff;
}

/* ====== Section À propos ====== */
.about {
  background: #ffffff;
  padding: 80px clamp(24px, 4vw, 80px);
}

.about__wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr; /* photo un peu plus petite que le texte */
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

/* Colonne photo : ne prend pas tout le côté gauche */
.about__media {
  width: 100%;
  max-width: 520px;            
  aspect-ratio: 2 / 3;          
  border-radius: 18px;
  overflow: hidden;

  background-image: url("./assets/portrait.jpg"); 
  background-size: cover;
  background-position: center 20%; 
  background-repeat: no-repeat;

  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

/* Sous-titre "Je me / présente" */
.about__subtitle {
  margin: 0 0 56px 0;
  color: var(--title-color);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  font-size: clamp(28px, 3.2vw, 44px);
  text-shadow: 0 4px 0 rgba(15, 15, 15, 0.18);
}

/* Décalage de "présente" pour que le P arrive sous le "me"
   Indent ≈ largeur de "Je " (3 caractères) -> 3ch */
.about__line2 {
  display: inline-block;
  padding-left: 3ch;
}

/* Texte à droite */
.about__content {
  display: flex;
  flex-direction: column;
  margin: 0 auto; 
}

.about__text {
  margin: 0 0 14px 0;
  color: var(--text-color);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  max-width: 62ch;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ===== Instagram ===== */
.about__instagram {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--title-color);
  justify-content: center;
}

.about__instagram svg {
  width: 30px;
  height: 30px;
  display: block;

  transition: transform 320ms ease;
  transform-origin: center;
}

.about__instagram:hover svg {
  transform: rotate(12deg);
}

.about__instagram-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--text-color);
  position: relative;
}

.about__instagram-name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.about__instagram:hover .about__instagram-name::after {
  transform: scaleX(1);
}

/* ====== Section Automobile ====== */
.auto {
  background: #ffffff;
  padding: 50px clamp(24px, 4vw, 80px) 60px;
}

.auto__wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.auto__header {
  text-align: center;
  margin-bottom: 34px;
}

.auto__title {
  margin: 0 0 16px 0;
  color: var(--title-color);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: clamp(22px, 2.4vw, 34px);
}

.auto__lead {
  margin: 0;
  color: var(--text-color);
  font-size: clamp(14px, 1.2vw, 16px);
  letter-spacing: 0.04em;
}

/* Grille masonry */
.auto__grid {
  columns: 3;
  column-gap: 18px;
}

/* Carte image + légende */
.auto__card {
  break-inside: avoid;
  margin: 0 0 18px 0;
  position: relative;
  z-index: 1;
}

/* La carte passe au-dessus des autres */
.auto__card:hover {
  z-index: 20;
}

.auto__img {
  width: 100%;
  height: auto;        
  display: block;
  border-radius: 16px;
  background: #e6e6e6;
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
  transform-origin: center top; /* centre horizontal + top */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.auto__caption {
  margin-top: 10px;
  color: var(--text-color);
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: opacity 200ms ease;
}

/* CTA */
.auto__cta {
  margin-top: 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.auto__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;

  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.auto__btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.auto__btn--primary:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

.auto__btn--secondary {
  background: transparent;
  color: var(--title-color);
  border: 1px solid rgba(42, 36, 27, 0.22);
}

.auto__btn--secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 36, 27, 0.35);
}

/* ====== Prestations ====== */
.services {
  background: #ffffff;
  padding: 50px clamp(24px, 4vw, 80px);
}

.services__wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.services__header {
  text-align: center;
  margin-bottom: 34px;
}

.services__title {
  margin: 0 0 30px 0;
  color: var(--title-color);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: clamp(22px, 2.4vw, 34px);
}

.services__intro {
  margin: 0 auto 22px auto;
  max-width: 70ch;
  color: var(--text-color);
  line-height: 1.6;
  font-size: clamp(14px, 1.2vw, 16px);
}

.services__from {
  margin: 40px auto 10px auto;
  max-width: 80ch;
  color: var(--text-color);
  line-height: 1.6;
  font-size: clamp(14px, 1.2vw, 16px);
}

.services__from-label {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.services__from-price {
  color: var(--title-color);
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 6px;
}

.services__from-note {
  opacity: 0.9;
}

.services__switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  margin-top: 20px;
  border-radius: 999px;
  background: rgba(42, 36, 27, 0.06);
}

.services__switch-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.services__switch-btn.is-active {
  background: #ffffff;
  color: var(--title-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.services__switch-btn:hover {
  transform: translateY(-1px);
}

/* Grille de blocs */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 46px;
}

.services__card {
  border: 1px solid rgba(42, 36, 27, 0.12);
  border-radius: 18px;
  padding: 26px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
}

.services__card-title {
  margin: 0 0 18px 0;
  color: var(--title-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 14px;
}

.services__list {
  margin: 0;
  margin-bottom: 15px;
  padding-left: 18px;
  color: var(--text-color);
  font-size: 15px;
  line-height: 1.65; 
}

.services__list li {
  margin-bottom: 6px; 
}

.services__list li:last-child {
  margin-bottom: 0;
}

.services__text {
  margin: 0 0 12px 0;
  color: var(--text-color);
  line-height: 1.7;
  font-size: 15px;
}

.services__price {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(42, 36, 27, 0.12);
  font-size: 15px;
  font-weight: 700;
  color: var(--title-color);
}

/* CTA */
.services__cta {
  margin-top: 52px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.services__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;

  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.services__btn--primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.services__btn--primary:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

/* ====== Contact / Devis ====== */
.contact {
  background: #ffffff;
  padding: 60px clamp(24px, 4vw, 80px);
}

.contact__wrap {
  max-width: 760px;
  margin: 0 auto;
}

.contact__header {
  text-align: center;
  margin-bottom: 34px;
}

.contact__title {
  margin: 0 0 18px 0;
  color: var(--title-color);
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-size: clamp(22px, 2.4vw, 34px);
}

.contact__intro {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--text-color);
  font-size: 15px;
  line-height: 1.6;
}

/* Sélecteur */
.contact__type {
  margin-bottom: 32px;
}

.contact__label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--title-color);
}

.contact__select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(42, 36, 27, 0.25);
  font-size: 15px;
  background: #fff;
}

/* Messages */
.form__message {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
}

.form__message--success {
  background: #e8f8f1;
  color: #1a7f5a;
  border: 1px solid #b6e5d2;
}

.form__message--error {
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5c2c7;
}

/* Formulaires */
.contact__form {
  margin-top: 24px;
}

.contact__form.is-hidden {
  display: none;
}

/* Grille */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--title-color);
}

.field input,
.field textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(42, 36, 27, 0.25);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--btn-bg);
}

/* Checkbox */
.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

/* Erreurs */
.field__error {
  margin-top: 4px;
  font-size: 12px;
  color: #a13535;
  min-height: 14px;
}

/* Bouton */
.contact__btn {
  margin-top: 28px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid rgba(0,0,0,0.08);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.contact__btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-1px);
}

/* ====== Footer ====== */
.footer {
  background: #ffffff;
  padding: 40px clamp(24px, 4vw, 80px);
}

/* Réserve la place du footer pour éviter le saut de layout */
.footer-slot {
  min-height: 140px; /* ajuste si ton footer est plus haut */
}

.footer__wrap {
  max-width: 1100px;
  margin: 0 auto;

  border-top: 1px solid rgba(42, 36, 27, 0.12);
  padding-top: 22px;

  /* ✅ GRID = garantie 2 lignes */
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  row-gap: 18px;
  column-gap: 18px;
}

/* Ligne 1 : copyright à gauche */
.footer__copyright {
  color: var(--text-color);
  font-size: 13px;
  letter-spacing: 0.03em;
}

/* Ligne 1 : bouton insta à droite */
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  border-radius: 999px;

  color: var(--title-color);
  border: 1px solid rgba(42, 36, 27, 0.18);
  text-decoration: none;

  transition: transform 160ms ease, border-color 160ms ease;
}

.footer__social a:hover {
  transform: translateY(-1px);
  border-color: rgba(42, 36, 27, 0.35);
}

.footer__social svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ✅ On place .footer__top sur la ligne 1, colonnes 1->2 */
.footer__top {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 18px;
}

/* ✅ Ligne 2 : liens centrés sur toute la largeur */
.footer__legal {
  grid-column: 1 / -1;
  grid-row: 2;

  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
}

.footer__legal a {
  text-decoration: none;
  color: var(--text-color);
  opacity: 0.8;
  transition: opacity .2s ease;
  position: relative;
}

.footer__legal a:hover {
  opacity: 1;
}

.footer__legal a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 200ms ease;
}

.footer__legal a:hover::after {
  transform: scaleX(1);
}

.footer__location {
  grid-column: 1 / -1;   
  text-align: center;
  margin-top: 12px;
  font-size: 8px;
  opacity: 0.7;
  letter-spacing: 0.03em;
}

/* Desktop uniquement */
@media (hover: hover) and (pointer: fine) {
  .auto__card:hover .auto__img.is-wide { 
    transform: scale(1.55); 
  }
  
  .auto__card:hover .auto__img.is-standard { 
    transform: scale(1.25); 
  }
}

/* ====== Mobile ====== */
/* Tablette */
@media (max-width: 1023px) {
  .auto__grid {
    columns: 2;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }
  .services__card {
    padding: 22px;
  }
}

@media (max-width: 767px) {
  .back-to-top {
    bottom: 24px;
    right: 24px;
  }
  
  .hero__title {
    margin-bottom: 28px;
  }
  
  .hero {
    padding-top: clamp(64px, 14vh, 120px);
  }

  .hero__subtitle {
    margin-bottom: 36px;
  }

  .about__wrap {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .about__content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about__text {
    text-align: justify; /* tu voulais justifié partout */
  }

  .about__subtitle { 
    text-shadow: none; 
  }

  .about__subtitle br {
    display: none;
  }

  .about__line2 {
    padding-left: 0;
  }

  .about__instagram {
    margin-top: 28px;
  }

  .about__instagram-name {
    display: none;
  }

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

  .footer__top {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 12px;
  }

  .footer__legal {
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer__wrap {
    text-align: center;
  }
}

@media (max-width: 549px) {
  .about {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .about__text {
    font-size: 15px;
  }

  .auto__header {
    margin-bottom: 26px;
  }
  .auto__grid {
    columns: 1;
  }
  .auto__caption {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__subtitle {
    max-width: 28ch;
    white-space: normal;
  }

  .hero__btn--fixed {
    bottom: 56px;
  }

  .about {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .about__wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about__media {
    display: block;
    margin-bottom: 32px;
  }

  .about__content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .about__subtitle {
    margin-bottom: 32px;
    text-align: center;
    letter-spacing: 0.06em;
    text-shadow: none;
  }

  .about__subtitle br {
    display: none; /* supprime le retour à la ligne */
  }

  .about__line2 {
    padding-left: 0; /* enlève le décalage */
  }

  .custom-shape-divider-top-1770404141 {
    display: none;
  }

  .services__header {
    margin-bottom: 26px;
  }
}
