/* =========================================================
   Fleurs idylliques - style.css
   Palette tirée du logo : violet #60256F / lilas #BA8FC1
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Aller';
  src: url('../fonts/Aller_Lt.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aller';
  src: url('../fonts/Aller_Rg.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Aller';
  src: url('../fonts/Aller.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --violet: #60256F;
  --violet-fonce: #471953;
  --lilas: #BA8FC1;
  --lilas-pale: #F1E7F3;
  --creme: #FBF8F5;
  --blanc: #FFFFFF;
  --encre: #352A3B;
  --gris-doux: #6E6373;
  --ombre: 0 12px 32px rgba(96, 37, 111, 0.12);
  --rayon: 14px;
  --transition: 0.35s cubic-bezier(0.25, 0.6, 0.3, 1);
  --logo-full: 232px;  /* taille d'affichage du logo (4x) */
  --logo-min: 120px;   /* hauteur de la bande une fois rogné (cadrée sur le lettrage) */
  --logo-focus: 0.66;  /* centre du cadrage : 66% de la hauteur = "fleurs idylliques" */
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Aller', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--encre);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-weight: 400; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.3rem); color: var(--violet-fonce); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); color: var(--violet-fonce); }
h3 { font-size: 1.15rem; font-weight: 700; color: var(--violet); }

p { margin: 0 0 1em; }

a { color: var(--violet); }

:focus-visible {
  outline: 3px solid var(--lilas);
  outline-offset: 3px;
  border-radius: 4px;
}

.script-accent {
  font-family: 'Sacramento', cursive;
  font-size: 1.35em;
  color: var(--lilas);
  display: block;
  line-height: 1.1;
}
.script-light { color: var(--lilas-pale); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--lilas);
  margin-bottom: 0.8em;
}
.eyebrow-light { color: rgba(255, 255, 255, 0.75); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 0.85em 1.9em;
  border-radius: 999px;
  font-weight: 400;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition),
              background-color var(--transition), color var(--transition);
}
.btn:hover { transform: translateY(-3px); }

.btn-primary {
  background: var(--violet);
  color: var(--blanc);
  box-shadow: var(--ombre);
}
.btn-primary:hover { background: var(--violet-fonce); }

.btn-ghost {
  border: 1.5px solid var(--lilas);
  color: var(--violet);
}
.btn-ghost:hover { background: var(--lilas-pale); }

.btn-light {
  background: var(--blanc);
  color: var(--violet);
}
.btn-light:hover { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: transparent;
  transition: background-color var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(251, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 18px rgba(96, 37, 111, 0.08);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  display: block;
  overflow: hidden;
  height: var(--logo-full);
  transition: height 0.15s linear;
}
.header-logo img {
  height: var(--logo-full);
  width: auto;
  transition: transform 0.15s linear;
  will-change: transform;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--encre);
  font-weight: 400;
  position: relative;
}
.site-nav a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 2px;
  background: var(--lilas);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.site-nav a:not(.nav-cta):hover::after { transform: scaleX(1); }

.nav-cta {
  background: var(--violet);
  color: var(--blanc) !important;
  padding: 0.5em 1.4em;
  border-radius: 999px;
  transition: background-color var(--transition);
}
.nav-cta:hover { background: var(--violet-fonce); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.burger span {
  width: 26px;
  height: 2.5px;
  background: var(--violet);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.burger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--logo-full) + 3.5rem) 1.5rem 4rem;
  background:
    radial-gradient(ellipse 60% 50% at 85% 15%, rgba(186, 143, 193, 0.22), transparent 70%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(186, 143, 193, 0.14), transparent 70%),
    var(--creme);
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-desc { max-width: 34rem; color: var(--gris-doux); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

/* Cadres en arche : clin d'œil aux arches et églises décorées */
.hero-visual { position: relative; }

.arch-frame {
  border-radius: 999px 999px var(--rayon) var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
  position: relative;
  z-index: 1;
}
.arch-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
  transition: transform 0.8s ease;
}
.arch-frame:hover img { transform: scale(1.04); }

.arch-outline {
  position: absolute;
  inset: -1.2rem 1.2rem 1.2rem -1.2rem;
  border: 2px solid var(--lilas);
  border-radius: 999px 999px var(--rayon) var(--rayon);
  opacity: 0.6;
  z-index: 0;
}

/* ---------- Sections génériques ---------- */
/* Point d'arrivée des ancres : compense la hauteur du header fixe (bande logo + padding) */
section[id] { scroll-margin-top: calc(var(--logo-min) + 2.2rem); }

.section { padding: 5.5rem 1.5rem; }

.section-head {
  max-width: 720px;
  margin: 0 auto 3.2rem;
  text-align: center;
}
.section-head .script-accent { display: inline; }

/* ---------- Services ---------- */
.services { background: var(--blanc); }

.services-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.6rem;
  justify-items: stretch;
}

.service-card {
  background: var(--creme);
  border-radius: var(--rayon);
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre);
}
.service-card p { color: var(--gris-doux); font-size: 0.97rem; margin: 0; }

.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--lilas-pale);
  color: var(--violet);
  margin-bottom: 1.1rem;
  transition: background-color var(--transition), color var(--transition),
              transform var(--transition);
}
.service-card:hover .service-icon,
.contact-card:hover .service-icon {
  background: var(--violet);
  color: var(--blanc);
  transform: rotate(-6deg) scale(1.06);
}
.service-icon svg { width: 32px; height: 32px; }

/* ---------- Galerie ---------- */
.galerie-grid {
  max-width: 1180px;
  margin: 0 auto;
  columns: 3 300px;
  column-gap: 1.2rem;
}

.galerie-item {
  display: block;
  width: 100%;
  margin: 0 0 1.2rem;
  padding: 0;
  border: none;
  border-radius: var(--rayon);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--lilas-pale);
  break-inside: avoid;
  position: relative;
}
.galerie-item img {
  width: 100%;
  transition: transform 0.7s ease, filter 0.7s ease;
}
.galerie-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(96, 37, 111, 0.35), transparent 45%);
  opacity: 0;
  transition: opacity var(--transition);
}
.galerie-item:hover img { transform: scale(1.05); }
.galerie-item:hover::after { opacity: 1; }

/* ---------- Ateliers ---------- */
.ateliers {
  background: linear-gradient(135deg, var(--violet-fonce), var(--violet) 55%, #7A3C8A);
  color: var(--blanc);
}
.ateliers h2 { color: var(--blanc); }
.ateliers p { color: rgba(255, 255, 255, 0.88); }

.ateliers-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.arch-frame-small { max-width: 380px; }

.ateliers .btn-light { margin-top: 0.6rem; }

/* ---------- Contact ---------- */
.contact { background: var(--blanc); }

.contact-intro { color: var(--gris-doux); }

.contact-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
}

.contact-card {
  background: var(--creme);
  border-radius: var(--rayon);
  padding: 2rem 1.6rem;
  text-align: center;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
}
.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre);
}
.contact-card p { color: var(--gris-doux); margin: 0; overflow-wrap: anywhere; }

.contact-note {
  max-width: 720px;
  margin: 2.6rem auto 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--gris-doux);
  background: var(--lilas-pale);
  border-radius: var(--rayon);
  padding: 1rem 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--violet-fonce);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}
.footer-logo {
  height: 168px;
  width: auto;
  margin: 0 auto 1.4rem;
}
.site-footer p { margin: 0; font-size: 0.9rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(35, 15, 42, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lb-img {
  max-width: min(88vw, 1000px);
  max-height: 86vh;
  border-radius: var(--rayon);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: lb-in 0.35s ease;
}
@keyframes lb-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: none;
  border: none;
  color: var(--blanc);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  transition: background-color var(--transition);
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255, 255, 255, 0.15);
}
.lb-close { top: 1.2rem; right: 1.4rem; font-size: 2.6rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ---------- Animations d'apparition ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero { padding-top: calc(var(--logo-full) + 2.5rem); }
  .hero-visual { max-width: 420px; margin: 0 auto; }
  .ateliers-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .ateliers-visual { display: flex; justify-content: center; }
}

@media (max-width: 700px) {
  :root { --logo-full: 148px; --logo-min: 76px; }
  .burger { display: flex; }
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 320px);
    background: var(--blanc);
    flex-direction: column;
    justify-content: center;
    gap: 2.2rem;
    box-shadow: -10px 0 40px rgba(96, 37, 111, 0.18);
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav a { font-size: 1.2rem; }
  .galerie-grid { columns: 2 160px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
