/* =========================
   AutoDetail — Base (global)
   Tout ce qui est commun au site (reset, typo, sections, boutons)
   Les réglages rapides (hauteurs, couleurs…) sont dans tokens.css
========================= */

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a{ color: inherit; }

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

/* Page offset (utile si un jour header en fixed).
   Sticky ne l'exige pas, mais ça évite que le hero colle trop en haut. */
main{ padding-top: 0; }

/* -------------------------
   HERO (unique, clean, premium)
------------------------- */
.hero{
  position: relative;
  min-height: var(--hero-min-h);
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--header-h) + 56px) 0 72px;
  background-repeat: no-repeat;

  /* Emboss / relief + profondeur */
  background-image:
    radial-gradient(120% 120% at 50% 35%, rgba(120,160,255,.10), rgba(0,0,0,.88) 70%),
    linear-gradient(to bottom, rgba(0,0,0,.32), rgba(0,0,0,.92)),

    /* highlight (haut-gauche) */
    radial-gradient(60% 70% at 45% 35%, rgba(255,255,255,.18), transparent 62%),
    var(--hero-logo),

    /* shadow (bas-droite) */
    radial-gradient(70% 90% at 55% 65%, rgba(0,0,0,.45), transparent 58%),
    var(--hero-logo);

  background-size:
    cover,
    cover,
    cover,
    var(--hero-logo-size),
    cover,
    var(--hero-logo-size);

  background-position:
    center,
    center,
    center,
    calc(50% - var(--hero-3d)) calc(50% - var(--hero-3d)),
    center,
    calc(50% + var(--hero-3d)) calc(50% + var(--hero-3d));
}

/* grain subtil */
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.hero__inner{ max-width: 1100px; }

.hero h1{
  font-size: var(--h1);
  line-height: 1.02;
  margin: 0 0 16px;
  font-weight: 520;
  letter-spacing: .01em;
  text-shadow: 0 12px 40px rgba(0,0,0,.65);
}

.hero p{
  margin: 0 0 26px;
  max-width: 62ch;
  font-size: var(--lead);
  color: rgba(255,255,255,.80);
  text-shadow: 0 10px 30px rgba(0,0,0,.60);
}

/* Sur les autres pages : hero neutre (pas de logo, pas de 3D) */
body:not(.home) .hero{
  background-image:
    radial-gradient(120% 120% at 50% 55%, rgba(0,0,0,.10), rgba(0,0,0,.88) 70%),
    linear-gradient(to bottom, rgba(0,0,0,.32), rgba(0,0,0,.92)) !important;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* -------------------------
   Sections
------------------------- */
.section{
  padding: 96px 0;
}

.section--dark{
  background: rgba(255,255,255,.02);
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.h2{
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 300;
  margin: 0 0 18px;
  letter-spacing: .01em;
  text-align:center;
}

.lead{
  color: var(--muted);
  text-align:center;
  max-width: 70ch;
  margin: 0 auto 48px;
}

/* Cards grid */
.grid{
  display:grid;
  gap: 24px;
}
@media (min-width: 900px){
  .grid--3{ grid-template-columns: repeat(3, 1fr); }
}
.card{
  padding: 28px 22px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
}
.card h3{
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .01em;
}
.card p{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* -------------------------
   Buttons
------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 13px 18px;
  border-radius: 14px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: rgba(255,255,255,.92);
  text-decoration:none;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size: 12px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.92); /* blanc */
  color: #000;                       /* texte noir */
  border-color: rgba(255,255,255,.92);
}


/* -------------------------
   Footer
------------------------- */
.site-footer{
  padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: 13px;
}
.footer__inner{
  display:flex;
  flex-wrap:wrap;
  gap: 16px;
  align-items:center;
  justify-content: space-between;
}
map{
  width: min(900px, 92%);
  margin: 32px auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.map iframe{
  width: 100%;
  height: 300px;
  border: 0;
  display:block;
}

@media (max-width: 720px){
  .map{
    width: 92%;
    margin: 20px auto;
  }
  .map iframe{
    height: 240px;
  }
}

/* ===== Page Contact : ajustements spacing ===== */

.page-contact .hero{
  min-height: auto !important;
  padding: 40px 0 24px !important;
}

.page-contact main{
  padding-top: 16px;
  padding-bottom: 48px;
}

.page-contact h1{
  margin-bottom: 8px;
}

.page-contact .section-subtitle{
  margin-bottom: 14px;
}

.page-contact form{
  margin-top: 12px;
}

/* Si "Formulaire" est un titre H2 */
.page-contact h2{
  margin-top: 22px;
  margin-bottom: 10px;
}

/* Pour éviter que le contenu passe sous le header fixe */
body{
  padding-top: var(--header-h);
}

@media (max-width: 720px){
  /* Devis : si tu utilises une grid inline, on force 1 colonne */
  #devis-form > div{
    grid-template-columns: 1fr !important;
  }
  #devis-form input,
  #devis-form select,
  #devis-form textarea{
    font-size: 16px; /* évite le zoom iOS */
  }
}
@media (max-width: 720px){
  .hero{
    padding: calc(var(--header-h) + 34px) 0 52px;
  }
  .hero h1{
    font-size: var(--h1-mobile);
    line-height: 1.06;
    letter-spacing: 0;
  }
  .hero p{
    max-width: 38ch;
    padding: 0 10px;
  }
}
