/* =========================================================================
   Philippe Colin — Photographe immobilier (Montauban)
   Maquette de démonstration — feuille de styles
   Stack : HTML5 + CSS3 + JS vanilla (cohérent FMA Autos / La Cantine de Lulu)
   ========================================================================= */

/* ----- Variables ----- */
:root {
  --noir:       #14110f;   /* fond principal (noir chaud) */
  --noir-2:     #1c1815;   /* fond alterné */
  --noir-3:     #241f1b;   /* cartes */
  --creme:      #f4efe9;   /* texte clair */
  --muted:      #a89f93;   /* texte secondaire */
  --laiton:     #c9a25f;   /* accent doré/laiton */
  --laiton-cl:  #ddbd84;
  --ligne:      rgba(244,239,233,.12);
  --ombre:      0 18px 50px rgba(0,0,0,.45);
  --r:          14px;      /* rayon */
  --tr:         .45s cubic-bezier(.22,.61,.36,1);
  --max:        1180px;
}

/* ----- Reset léger ----- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--noir);
  color: var(--creme);
  line-height: 1.65;
  font-weight: 300;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--laiton); color: var(--noir); }

h1, h2, h3, .serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: .3px;
}

/* ----- Utilitaires ----- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 26px; }
.nowrap { white-space: nowrap; }   /* garde un groupe de mots insécable (ex. Tarn-et-Garonne) */
.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: .74rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--laiton);
  font-weight: 500;
  margin-bottom: 16px;
}
.section { padding: clamp(64px, 9vw, 130px) 0; }
.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.section-head p { color: var(--muted); margin-top: 16px; font-size: 1.05rem; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border-radius: 50px;
  font-size: .92rem; font-weight: 500; letter-spacing: .03em;
  cursor: pointer; border: 1px solid transparent;
  transition: var(--tr); white-space: nowrap;
}
.btn-gold { background: var(--laiton); color: var(--noir); }
.btn-gold:hover { background: var(--laiton-cl); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(201,162,95,.32); }
.btn-ghost { border-color: rgba(244,239,233,.7); color: var(--creme); background: rgba(20,17,15,.15); backdrop-filter: blur(2px); }
.btn-ghost:hover { border-color: var(--laiton); color: var(--laiton-cl); background: rgba(20,17,15,.28); transform: translateY(-2px); }

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 36px;
  /* Voile dégradé en haut (avant le scroll) — couvre les 2 lignes du menu et s'estompe vers le bas */
  background: linear-gradient(180deg, rgba(20,17,15,.68) 0%, rgba(20,17,15,.42) 55%, rgba(20,17,15,.14) 100%);
  transition: var(--tr);
}
.nav.scrolled {
  background: rgba(20,17,15,.86);
  backdrop-filter: blur(14px);
  padding: 14px 36px;
  border-bottom: 1px solid var(--ligne);
}
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand b { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; font-weight: 700; letter-spacing: .5px; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.brand span { font-size: .66rem; letter-spacing: .34em; text-transform: uppercase; color: var(--laiton); margin-top: 6px; text-shadow: 0 1px 6px rgba(0,0,0,.45); }
/* Logo plus imposant sur desktop */
@media (min-width: 1100px) {
  .brand b { font-size: 2.15rem; }
  .brand span { font-size: .72rem; margin-top: 7px; }
}
/* Le bouton Contact du menu garde un texte net (pas d'ombre) */
.nav-links a.btn { text-shadow: none; }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: .9rem; font-weight: 600; color: var(--creme); position: relative; transition: color .25s; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0;
  background: var(--laiton); transition: width .3s;
}
.nav-links a:hover { color: var(--laiton-cl); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--laiton-cl); }
.nav-links a.active::after { width: 100%; }
.nav-links a.btn.active::after { width: 0; }   /* pas de soulignement sous un bouton */
.nav-links .btn { padding: 11px 22px; }

/* Bouton d'appel direct (mobile/tablette uniquement) */
.nav-call { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; background: var(--laiton); color: var(--noir); transition: var(--tr); flex: 0 0 auto; }
.nav-call svg { width: 20px; height: 20px; }
.nav-call:hover { background: var(--laiton-cl); transform: translateY(-2px); }

/* Burger */
.burger { display: none; flex-direction: column; gap: 6px; background: none; border: 0; cursor: pointer; padding: 6px; z-index: 120; }
.burger span { width: 26px; height: 2px; background: var(--creme); border-radius: 2px; transition: var(--tr); }
.burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column;   /* contenu centré + indice « Découvrir » dans le flux dessous */
  padding: 104px 0 30px;
  background: #000;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('images/photo-04.jpg');   /* version légère par défaut (mobile/tablette) */
  background-position: center; background-size: cover; background-repeat: no-repeat;
  transform: scale(1.08);
  animation: heroZoom 14s ease-out forwards;
}
/* Grands écrans PC : version haute définition 2560px (Lanczos + accentuation) */
@media (min-width: 1200px) {
  .hero-bg { background-image: url('images/hero.jpg'); }
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero::after {
  content: ''; position: absolute; inset: 0;
  /* Voile plus léger que l'original (opacités abaissées) — pour la lisibilité du texte */
  background: linear-gradient(105deg, rgba(20,17,15,.62) 0%, rgba(20,17,15,.34) 45%, rgba(20,17,15,.12) 100%),
              linear-gradient(0deg, rgba(20,17,15,.48), transparent 40%);
}
.hero-content { position: relative; z-index: 2; max-width: 720px; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
/* Petite ombre UNIQUEMENT sur l'accroche (passe sur des zones claires de la photo) */
.hero-content p:not(.eyebrow) { text-shadow: 0 0 3px rgba(0,0,0,.5), 0 1px 5px rgba(0,0,0,.55); }
.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 500; margin: 18px 0 22px;
}
.hero h1 em { font-style: italic; color: var(--laiton-cl); }
.hero p { font-size: clamp(1.05rem, 2.2vw, 1.32rem); color: var(--creme); opacity: .9; max-width: 560px; margin-bottom: 36px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.scroll-hint {
  position: relative; z-index: 2; align-self: center; flex: 0 0 auto; margin-top: 18px;
  color: var(--muted); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
/* Écrans peu hauts (portables 1366×768, mobiles…) : hero compacté pour que
   « Découvrir » reste visible sans avoir à scroller */
@media (max-height: 820px) {
  .hero { padding: 84px 0 22px; }
  .hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); margin: 12px 0 16px; }
  .hero p { font-size: 1.02rem; margin-bottom: 26px; }
  .scroll-hint { margin-top: 10px; gap: 7px; }
  .scroll-hint i { height: 30px; }
}
.scroll-hint i { width: 1px; height: 42px; background: linear-gradient(var(--laiton), transparent); animation: scrollPulse 2s infinite; }
@keyframes scrollPulse { 0%,100%{opacity:.3;transform:scaleY(.6)} 50%{opacity:1;transform:scaleY(1)} }

/* =========================================================================
   SERVICES
   ========================================================================= */
.services { background: var(--noir-2); padding-bottom: clamp(32px, 4.5vw, 58px); }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.svc {
  position: relative; overflow: hidden;
  background: var(--noir-3); border: 1px solid var(--ligne);
  border-radius: var(--r); padding: 40px 32px;
  transition: transform .28s cubic-bezier(.2,.7,.2,1), border-color .28s ease, box-shadow .28s ease;
}
/* Halo doré intérieur au survol (comme les cartes spécialités de Lulu) */
.svc::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 0 rgba(201,162,95,0);
  transition: box-shadow .35s ease; pointer-events: none;
}
.svc:hover {
  transform: translateY(-7px) rotate(-.4deg);
  border-color: rgba(201,162,95,.55);
  box-shadow: 0 24px 46px -22px rgba(0,0,0,.8);
}
.svc:hover::after { box-shadow: inset 0 0 24px -6px rgba(201,162,95,.45); }
.svc-ico {
  width: 56px; height: 56px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 24px;
  background: rgba(201,162,95,.12); color: var(--laiton);
  transition: background .3s ease, color .3s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
.svc-ico svg { width: 28px; height: 28px; }
.svc:hover .svc-ico { background: var(--laiton); color: var(--noir); transform: rotate(-8deg) scale(1.1); }
.svc h3 { font-size: 1.6rem; margin-bottom: 12px; transition: color .3s ease; }
.svc:hover h3 { color: var(--laiton-cl); }
.svc p { color: var(--muted); font-size: .96rem; }

/* =========================================================================
   GALERIE (mosaïque)
   ========================================================================= */
.gallery { background: var(--noir); padding-top: clamp(32px, 4.5vw, 58px); padding-bottom: clamp(36px, 5vw, 64px); }
.masonry { columns: 3; column-gap: 16px; }
.masonry figure {
  break-inside: avoid; margin: 0 0 16px; position: relative;
  border-radius: var(--r); overflow: hidden; cursor: pointer;
  background: var(--noir-3);
}
.masonry img { width: 100%; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.masonry figure::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(20,17,15,.55), transparent 55%);
  opacity: 0; transition: opacity .4s;
}
.masonry figcaption {
  position: absolute; left: 18px; bottom: 14px; z-index: 2;
  font-size: .82rem; letter-spacing: .04em; color: var(--creme);
  opacity: 0; transform: translateY(8px); transition: var(--tr);
}
.masonry figure:hover img { transform: scale(1.07); }
.masonry figure:hover::after { opacity: 1; }
.masonry figure:hover figcaption { opacity: 1; transform: translateY(0); }

/* =========================================================================
   À PROPOS
   ========================================================================= */
.about { background: var(--noir-2); padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(36px, 5vw, 64px); }
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.about-photo { position: relative; }
.about-photo img { border-radius: var(--r); width: 100%; box-shadow: var(--ombre); }
.about-photo::before {
  content: ''; position: absolute; inset: -14px -14px auto auto;
  width: 70%; height: 70%; border: 1px solid var(--laiton); border-radius: var(--r);
  z-index: -1;
}
.about h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 20px; }
.about p { color: var(--muted); margin-bottom: 16px; }
.about-sign { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.5rem; color: var(--laiton-cl); margin-top: 8px; }
.about-stats { display: flex; gap: 40px; margin-top: 30px; flex-wrap: wrap; }
.about-stats b { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; color: var(--creme); display: block; }
.about-stats span { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact { background: var(--noir); padding-top: clamp(36px, 5vw, 64px); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h2 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 20px; }
.contact-info p { color: var(--muted); margin-bottom: 28px; }
.contact-line {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; margin-bottom: 14px;
  padding: 15px 18px; border-radius: 12px;
  background: var(--noir-3); border: 1px solid var(--ligne);
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
/* Barre d'accent dorée qui se déploie au survol (façon FMA Autos) */
.contact-line::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: linear-gradient(180deg, var(--laiton), var(--laiton-cl));
  transform: scaleY(0); transform-origin: top;
  transition: transform .32s cubic-bezier(.22,.61,.36,1);
}
.contact-line:hover { transform: translateX(5px); border-color: rgba(201,162,95,.45); box-shadow: 0 16px 32px -20px rgba(0,0,0,.85); }
.contact-line:hover::before { transform: scaleY(1); }
.contact-line .ci {
  width: 42px; height: 42px; border-radius: 10px; flex: 0 0 42px;
  display: grid; place-items: center; background: rgba(201,162,95,.12); color: var(--laiton);
  transition: background .3s ease, color .3s ease, transform .35s cubic-bezier(.2,.7,.2,1);
}
/* Icône qui s'inverse et pivote au survol (façon Lulu) */
.contact-line:hover .ci { background: var(--laiton); color: var(--noir); transform: rotate(-8deg) scale(1.08); }
.contact-line .ci svg { width: 20px; height: 20px; }
.contact-line small { color: var(--muted); display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.contact-line span { color: var(--creme); transition: color .3s ease; }
.contact-line:hover span { color: var(--laiton-cl); }

.form { background: var(--noir-3); border: 1px solid var(--ligne); border-radius: var(--r); padding: 34px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 8px; letter-spacing: .05em; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--noir-2); border: 1px solid var(--ligne);
  border-radius: 9px; padding: 13px 15px; color: var(--creme);
  font-family: inherit; font-size: .95rem; transition: border-color .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--laiton); }
.field textarea { resize: vertical; min-height: 110px; }
.hp { position: absolute; left: -9999px; }   /* honeypot anti-spam */
.form .btn-gold { width: 100%; justify-content: center; margin-top: 6px; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { background: var(--noir-2); border-top: 1px solid var(--ligne); padding: 56px 0 30px; }
.footer-grid { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 30px; }
.footer .brand b { font-size: 1.6rem; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-size: .9rem; color: var(--muted); transition: color .25s; }
.footer-nav a:hover { color: var(--laiton-cl); }
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ligne);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: .82rem; color: var(--muted);
}
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--ligne); color: var(--muted);
  transition: var(--tr);
}
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a:hover { color: var(--laiton); border-color: var(--laiton); transform: translateY(-2px); }

.admin-gear { color: var(--muted); opacity: .4; transition: opacity .3s, color .3s; font-size: 1.05rem; }
.admin-gear:hover { opacity: 1; color: var(--laiton); }

/* =========================================================================
   LIGHTBOX
   ========================================================================= */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(8,7,6,.95); display: none; align-items: center; justify-content: center; }
.lb.open { display: flex; animation: fade .3s; }
@keyframes fade { from { opacity: 0; } }
.lb img { max-width: 90vw; max-height: 84vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lb-cap { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: .9rem; letter-spacing: .04em; }
.lb-btn {
  position: absolute; background: rgba(255,255,255,.06); border: 1px solid var(--ligne);
  color: var(--creme); width: 52px; height: 52px; border-radius: 50%;
  font-size: 1.4rem; cursor: pointer; display: grid; place-items: center; transition: var(--tr);
}
.lb-btn:hover { background: var(--laiton); color: var(--noir); border-color: var(--laiton); }
.lb-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 26px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 26px; right: 26px; width: 46px; height: 46px; font-size: 1.2rem; }

/* =========================================================================
   SCROLL REVEAL
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
/* ----- Navigation desktop (≥1101px) : menu sur 2 lignes, LOGO CENTRÉ en haut
        + rubriques centrées dessous (le menu compte 8 entrées, trop large sur 1 ligne) ----- */
@media (min-width: 1101px) {
  .nav { flex-direction: column; gap: 12px; padding: 20px 36px 16px; }
  .nav.scrolled { gap: 8px; padding: 12px 36px 10px; }
  .nav .brand { align-items: center; }
  .nav.scrolled .brand b { font-size: 1.7rem; }
  .nav.scrolled .brand span { font-size: .66rem; }
  .nav-links { justify-content: center; flex-wrap: wrap; gap: 18px 20px; }
  .nav-links a { font-size: .84rem; font-weight: 500; }   /* compact + un peu moins gras sur desktop */
  /* Le contenu du hero démarre plus bas pour laisser la place au menu 2 lignes */
  .hero { padding-top: 168px; }
}

/* ----- Navigation tablette/mobile (≤1100px) : logo à gauche + menu hamburger off-canvas ----- */
@media (max-width: 1100px) {
  .nav { padding: 18px 24px; }
  .nav.scrolled { padding: 12px 24px; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px);
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 22px; padding: 80px 38px;
    background: rgba(20,17,15,.97); backdrop-filter: blur(16px);
    transform: translateX(100%); transition: var(--tr); border-left: 1px solid var(--ligne);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.08rem; }
  .nav-links .btn { margin-top: 6px; }
  .nav-call { display: flex; margin-left: auto; margin-right: 24px; }   /* poussé à droite, espace suffisant avant le burger (anti-appel par erreur) */
  .burger { display: flex; }
}

@media (max-width: 980px) {
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .masonry { columns: 2; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-photo { max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .svc-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .footer-grid { flex-direction: column; }
  .lb-prev { left: 12px; } .lb-next { right: 12px; }
  .lb-btn { width: 44px; height: 44px; }
}
