/* ==========================================================================
   Stores System SA — Feuille de style
   Design system : Swiss / éditorial, chaleureux, responsive, performant
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --ink:        #17262d;   /* petrol foncé — texte principal */
  --ink-soft:   #3c4a51;
  --muted:      #6a7378;   /* texte secondaire */
  --line:       rgba(23, 38, 45, 0.12);
  --bg:         #faf8f4;   /* fond crème */
  --bg-alt:     #f1ede6;   /* fond alterné */
  --surface:    #ffffff;
  --accent:     #c8803c;   /* ambre — soleil / protection solaire */
  --accent-dk:  #a9662b;
  --accent-soft:#f6e7d5;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow-sm:  0 1px 2px rgba(23,38,45,.06), 0 2px 6px rgba(23,38,45,.05);
  --shadow-md:  0 10px 30px rgba(23,38,45,.10);
  --shadow-lg:  0 24px 60px rgba(23,38,45,.16);

  --maxw:       1200px;
  --gap:        clamp(1rem, 2.5vw, 2rem);
  --section-y:  clamp(4rem, 9vw, 7.5rem);

  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head:  "Fraunces", Georgia, "Times New Roman", serif;

  --ease:       cubic-bezier(.22,.61,.36,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); font-weight: 550; }
p  { color: var(--ink-soft); }
.lead { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem); color: var(--ink-soft); }

/* ---------- Layout helpers ---------- */
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dk);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); border-radius: 2px; }
.center .eyebrow::before { display: none; }
.section-head p { margin-top: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1.5px solid transparent; transition: transform .2s var(--ease), background .2s, box-shadow .2s, color .2s;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(200,128,60,.34); }
.btn--primary:hover { background: var(--accent-dk); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200,128,60,.4); }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s, padding .3s;
  padding-block: .85rem;
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header.is-scrolled { background: rgba(250,248,244,.9); backdrop-filter: saturate(140%) blur(12px); box-shadow: var(--shadow-sm); padding-block: .5rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.brand img { height: 42px; width: auto; transition: height .3s; }
.header.is-scrolled .brand img { height: 36px; }
.brand span { line-height: 1; }
.brand small { display: block; font-family: var(--font-sans); font-size: .62rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-dk); margin-top: 3px; }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a { padding: .5rem .8rem; border-radius: 999px; font-weight: 500; font-size: .95rem; color: var(--ink-soft); transition: color .2s, background .2s; }
.nav a:hover { color: var(--ink); background: rgba(23,38,45,.05); }
.nav-close { display: none; }

/* En haut de page (header transparent au-dessus du hero) : texte clair et lisible */
.header:not(.is-scrolled) .brand,
.header:not(.is-scrolled) .brand span { color: #fff; }
.header:not(.is-scrolled) .brand small { color: #f0d9bf; }
.header:not(.is-scrolled) .nav a { color: rgba(255,255,255,.92); }
.header:not(.is-scrolled) .nav a:hover { color: #fff; background: rgba(255,255,255,.16); }
.header:not(.is-scrolled) .phone-link { color: #fff; }
.header:not(.is-scrolled) .phone-link svg { color: #f0d9bf; }
.header:not(.is-scrolled) .nav-toggle span,
.header:not(.is-scrolled) .nav-toggle span::before,
.header:not(.is-scrolled) .nav-toggle span::after { background: #fff; }

.header__cta { display: flex; align-items: center; gap: .9rem; }
.phone-link { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.phone-link svg { width: 18px; height: 18px; color: var(--accent-dk); }

.nav-toggle { display: none; width: 44px; height: 44px; border: none; background: transparent; border-radius: 10px; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s; transform: translate(-50%, -50%);
}
.nav-toggle span::before { transform: translate(-50%, -8px); }
.nav-toggle span::after  { transform: translate(-50%, 6px); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translate(-50%, -50%) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: flex-end; color: #fff; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(15,25,30,.55) 0%, rgba(15,25,30,.25) 40%, rgba(15,25,30,.78) 100%);
}
.hero__inner { padding-block: clamp(6rem, 12vw, 9rem) clamp(3rem, 6vw, 5rem); max-width: 52rem; }
.hero .eyebrow { color: #f0d9bf; }
.hero .eyebrow::before { background: var(--accent); }
.hero h1 { color: #fff; text-wrap: balance; }
.hero__sub { margin-top: 1.3rem; font-size: clamp(1.05rem, 1rem + 0.6vw, 1.35rem); color: rgba(255,255,255,.92); max-width: 42rem; }
.hero__actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__stats { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3rem); border-top: 1px solid rgba(255,255,255,.22); padding-top: 1.6rem; }
.hero__stats div { min-width: 0; }
.hero__stats b { display: block; font-family: var(--font-head); font-size: 1.5rem; }
.hero__stats span { font-size: .9rem; color: rgba(255,255,255,.8); }

/* ==========================================================================
   Values
   ========================================================================== */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; }
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.value__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-dk); margin-bottom: 1.1rem; }
.value__icon svg { width: 24px; height: 24px; }
.value h3 { margin-bottom: .4rem; }
.value p { font-size: .95rem; }

/* ==========================================================================
   Produits — grille de catégories
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.card {
  position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 1.4rem 1.5rem 1.6rem; }
.card__body h3 { margin-bottom: .5rem; }
.card__body p { font-size: .95rem; margin-bottom: 1rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-size: .78rem; font-weight: 500; padding: .28rem .7rem; border-radius: 999px; background: var(--bg-alt); color: var(--ink-soft); }
.card__link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--accent-dk); font-size: .95rem; }
.card__link svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.card:hover .card__link svg { transform: translateX(4px); }
.card > a.card__stretch { position: absolute; inset: 0; z-index: 1; }

/* ==========================================================================
   Feature blocks (stores extérieurs / pergolas — texte + liste)
   ========================================================================== */
.feature { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature--reverse .feature__media { order: -1; }
.feature__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.feature__media img { width: 100%; aspect-ratio: 3 / 2.2; object-fit: cover; }
.feature h2 { margin-bottom: 1rem; }
.subitems { margin-top: 1.8rem; display: grid; gap: 1.1rem; }
.subitem { padding-left: 1.4rem; position: relative; }
.subitem::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.subitem h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 650; margin-bottom: .15rem; }
.subitem p { font-size: .95rem; }

/* ==========================================================================
   Galerie
   ========================================================================== */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.gallery button { border: none; padding: 0; background: none; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-sm); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; }
.gallery button:hover img { transform: scale(1.08); filter: brightness(1.05); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12,18,22,.92); display: none; align-items: center; justify-content: center; padding: 4vw; opacity: 0; transition: opacity .3s; }
.lightbox.open { display: flex; opacity: 1; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox__close, .lightbox__nav { position: absolute; background: rgba(255,255,255,.12); border: none; color: #fff; width: 52px; height: 52px; border-radius: 50%; font-size: 1.6rem; display: grid; place-items: center; transition: background .2s; }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__close { top: 4vw; right: 4vw; }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav.prev { left: 2vw; } .lightbox__nav.next { right: 2vw; }

/* ==========================================================================
   Showroom CTA band
   ========================================================================== */
.cta-band { position: relative; color: #fff; isolation: isolate; border-radius: clamp(18px, 3vw, 28px); overflow: hidden; padding: clamp(2.6rem, 6vw, 4.5rem); box-shadow: var(--shadow-md); }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, #17262d 0%, #23383f 60%, var(--accent-dk) 140%); }
.cta-band__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.85); margin-top: .8rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: flex-end; }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form__note { font-size: .82rem; color: var(--muted); }
.form__status { font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.form__status.ok { color: #2e7d4f; } .form__status.err { color: #c0392b; }

.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.info-card + .info-card { margin-top: 1.1rem; }
.info-card h3 { font-family: var(--font-sans); font-size: 1.05rem; font-weight: 650; margin-bottom: .3rem; display: flex; align-items: center; gap: .5rem; }
.info-card h3 svg { width: 18px; height: 18px; color: var(--accent-dk); }
.info-card address { font-style: normal; color: var(--ink-soft); font-size: .96rem; }
.info-card a { color: var(--accent-dk); font-weight: 500; }
.hours { display: grid; gap: .3rem; margin-top: .2rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; color: var(--ink-soft); border-bottom: 1px dashed var(--line); padding-bottom: .3rem; }
.map { margin-top: 1.1rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.map iframe { width: 100%; height: 320px; border: 0; display: block; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { background: var(--ink); color: rgba(255,255,255,.82); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.footer h4 { font-family: var(--font-sans); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,.82); transition: color .2s; }
.footer a:hover { color: var(--accent); }
.footer ul { display: grid; gap: .55rem; font-size: .95rem; }
.footer .brand { color: #fff; }
.footer .brand small { color: var(--accent); }
.footer__about p { color: rgba(255,255,255,.65); font-size: .95rem; margin-top: 1rem; max-width: 30ch; }
.footer address { font-style: normal; font-size: .95rem; line-height: 1.9; }
.social { display: inline-flex; gap: .6rem; margin-top: 1.2rem; }
.social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; transition: background .2s, transform .2s; }
.social a:hover { background: var(--accent); transform: translateY(-2px); }
.social svg { width: 18px; height: 18px; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; color: rgba(255,255,255,.55); }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .values { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav, .header__cta .phone-link { display: none; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; width: min(84vw, 340px);
    height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh;
    background: var(--bg); background-color: #faf8f4;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: .2rem;
    padding: 5rem 1.4rem 2.5rem; box-shadow: var(--shadow-lg); transform: translateX(100%);
    transition: transform .35s var(--ease); z-index: 95;
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  body.nav-open .nav { display: flex; transform: translateX(0); }
  .nav a { font-size: 1.1rem; padding: .8rem 1rem; }
  .nav-close {
    display: inline-flex; align-items: center; justify-content: center;
    position: absolute; top: 1rem; right: 1rem; width: 42px; height: 42px;
    border: 1px solid var(--line); border-radius: 50%; background: var(--surface);
    color: var(--ink); font-size: 1.5rem; line-height: 1; box-shadow: var(--shadow-sm);
    transition: background .2s, transform .2s;
  }
  .nav-close:hover { background: var(--accent); color: #fff; transform: rotate(90deg); }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(12,18,22,.5); opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 80; }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }
  .feature { grid-template-columns: 1fr; }
  .feature--reverse .feature__media { order: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band__grid { grid-template-columns: 1fr; }
  .cta-band__actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .values { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.2rem 2rem; }
}
