/* =========================================================
   SIFRANCE — Literie & Home Textiles
   Feuille de style principale
   ========================================================= */

:root {
  --black: #000;
  --ink: #0b0b0b;
  --bar: #2b2b2b;
  --white: #fff;
  --text: #e9e6e1;
  --muted: #bdb8b0;
  --line: rgba(255, 255, 255, .85);

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Great Vibes", "Brush Script MT", cursive;

  --container: 1180px;
  --gutter: 24px;
  --header-h: 106px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
strong { font-weight: 600; color: var(--white); }

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

/* ---------- Typography ---------- */
.title {
  margin: 0 0 22px;
  font-weight: 200;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.12;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--white);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  color: var(--white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn .chev { font-size: 16px; line-height: 0; transition: transform .3s var(--ease); }
.btn:hover,
.btn:focus-visible { background: var(--white); color: var(--black); }
.btn:hover .chev { transform: translateX(4px); }

.btn--solid { background: var(--black); border-color: rgba(255,255,255,.7); }

:focus-visible { outline: 1px solid var(--white); outline-offset: 3px; }

/* ---------- Logo (typographique) ---------- */
.logo {
  --s: 40px;
  position: relative;
  display: inline-block;
  width: calc(var(--s) * 3.5);
  height: calc(var(--s) * 2);
  color: var(--white);
  flex-shrink: 0;
}
.logo-ring {
  position: absolute;
  right: 0;
  top: 0;
  width: calc(var(--s) * 2);
  height: calc(var(--s) * 2);
  border: max(1px, calc(var(--s) * .028)) solid currentColor;
  border-radius: 50%;
}
.logo-script {
  position: absolute;
  left: 0;
  top: calc(var(--s) * .12);
  font-family: var(--script);
  font-size: calc(var(--s) * 1.45);
  line-height: 1;
  white-space: nowrap;
  z-index: 1;
}
.logo-tag {
  position: absolute;
  right: calc(var(--s) * .2);
  top: calc(var(--s) * 1.28);
  font-size: max(6px, calc(var(--s) * .1));
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo--sm { --s: 26px; }
.logo--md { --s: 48px; }
.logo--lg { --s: 82px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background .4s var(--ease), height .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header.is-scrolled {
  --header-h: 70px;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,.08);
}
.header-inner {
  position: relative;
  height: 100%;
  max-width: 1160px;           /* contenu de 1120px, comme la maquette */
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
/* le petit logo n'apparaît qu'après défilement (le hero a déjà le grand) */
.header-logo { opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.header-logo img { display: block; width: auto; height: 58px; }
.is-scrolled .header-logo img { height: 48px; }
.is-scrolled .header-logo { opacity: 1; pointer-events: auto; }

/* menu centré sur la page */
.main-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.main-nav > ul { display: flex; align-items: center; gap: 0; }
.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 20px;
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  color: var(--white);
}
.main-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--white);
  transform: scaleX(0);
  transition: transform .35s var(--ease);
}
.main-nav > ul > li > a:hover::after,
.main-nav > ul > li > a.is-active::after { transform: scaleX(1); }
.caret { width: 8px; height: 5px; }

.has-sub { position: relative; }
.sub-menu {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 260px;
  padding: 8px 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.has-sub:hover .sub-menu,
.has-sub:focus-within .sub-menu { opacity: 1; visibility: visible; transform: none; }
.sub-menu a { display: block; padding: 10px 20px; font-size: 13px; color: #000; }
.sub-menu a:hover,
.sub-menu a[aria-current] { background: #000; color: #fff; }

.header-cta { margin-left: auto; padding: 12px 24px; font-size: 15px; font-weight: 400; letter-spacing: normal; background: #000; border-color: #fff; }
.nav-cta-mobile { display: none; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 26px;
  height: 1px;
  margin: 7px auto;
  background: var(--white);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: min(100vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: 65% center;
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease) forwards;
}
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #000 0%, rgba(0,0,0,.92) 22%, rgba(0,0,0,.45) 48%, rgba(0,0,0,.05) 75%),
    linear-gradient(0deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 30%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 22%);
}
.hero-content { padding-top: calc(var(--header-h) + 40px); padding-bottom: 90px; max-width: var(--container); }
.hero-content .logo { margin-bottom: 26px; }
.hero-title {
  margin: 0 0 22px;
  font-weight: 200;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.08;
  text-transform: uppercase;
  color: var(--white);
}
.hero-sub {
  margin: 0 0 26px;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--white);
}
.hero-content > * { opacity: 0; transform: translateY(18px); animation: fadeUp .9s var(--ease) forwards; }
.hero-content > :nth-child(2) { animation-delay: .15s; }
.hero-content > :nth-child(3) { animation-delay: .3s; }
.hero-content > :nth-child(4) { animation-delay: .45s; }

@keyframes heroZoom { to { transform: scale(1); } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }

/* =========================================================
   ATOUTS
   ========================================================= */
.assets { background: var(--bar); border-top: 1px solid rgba(255,255,255,.06); }
.assets-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 900px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.assets-list li {
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--white);
}

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(70px, 9vw, 120px) 0; }

.section-head { text-align: center; max-width: 780px; margin: 0 auto 40px; }
.section-head p { margin: 0; font-size: 14px; }

/* ---------- Cartes gammes ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.card {
  position: relative;
  display: block;
  aspect-ratio: 1.22 / 1;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.75);
  isolation: isolate;
}
.card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform .8s var(--ease), filter .8s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.05) 40%, rgba(0,0,0,.05) 70%, rgba(0,0,0,.55) 100%);
  transition: background .5s var(--ease);
}
.card-num,
.card-title {
  position: absolute;
  left: 10px;
  color: var(--white);
  text-transform: uppercase;
  font-weight: 300;
}
.card-num { top: 8px; font-size: 13px; }
.card-title { top: 30px; right: 10px; font-size: clamp(12px, 1.1vw, 14px); line-height: 1.3; }
.card-arrow {
  position: absolute;
  left: 10px;
  bottom: 6px;
  font-size: 24px;
  line-height: 1;
  color: var(--white);
  transition: transform .4s var(--ease);
}
.card:hover img { transform: scale(1.07); }
.card:hover::before { background: linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.7) 100%); }
.card:hover .card-arrow { transform: translateX(8px); }

/* ---------- Bandeaux image pleine largeur ---------- */
.band {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.band-bg {
  position: absolute;
  inset: -8% 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.band-shade { position: absolute; inset: 0; z-index: -1; }
.band--left .band-shade {
  background:
    linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.55) 35%, rgba(0,0,0,.05) 65%),
    linear-gradient(180deg, #000 0%, rgba(0,0,0,0) 12%, rgba(0,0,0,0) 88%, #000 100%);
}
.band--story .band-shade {
  background:
    linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.65) 40%, rgba(0,0,0,.15) 70%),
    linear-gradient(180deg, #000 0%, rgba(0,0,0,0) 14%, rgba(0,0,0,0) 86%, #000 100%);
}
.band-content { padding-top: 90px; padding-bottom: 90px; }
.band-content > * { max-width: 440px; }
.band-content p { margin: 0 0 14px; font-size: 13.5px; text-align: justify; hyphens: auto; }
.band-content .btn { margin-top: 18px; }
/* aligne le texte sur la colonne centrale de 860px, quelle que soit la largeur d'écran
   (le % se calculait sur la largeur du bandeau et non du conteneur → texte écrasé sur grand écran) */
.band--left .band-content { padding-left: max(var(--gutter), calc((min(100vw, var(--container)) - 860px) / 2)); }

/* ---------- Showroom ---------- */
.showroom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 18px;
  max-width: 860px;
}
.showroom-media { aspect-ratio: 1.08 / 1; overflow: hidden; }
.showroom-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.showroom-media:hover img { transform: scale(1.04); }
.showroom-text { padding-left: 12px; }
.showroom-text p { margin: 0 0 22px; font-size: 13.5px; text-align: justify; hyphens: auto; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #000;
  font-family: Calibri, Carlito, "Segoe UI", system-ui, sans-serif;
  color: #fff;
}
.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px var(--gutter) 47px;
}
.footer-logo { display: block; margin-bottom: 45px; }
.footer-logo img { display: block; width: 245px; height: auto; }

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 16px;
  font-size: 16px;
  line-height: 1.25;
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  transition: opacity .3s;
}
.footer-contact a:hover { opacity: .7; }
.footer-contact svg { width: 14px; height: 14px; fill: currentColor; flex-shrink: 0; }
.footer-social { display: flex; align-items: center; gap: 11px; margin-left: 15px; }
.footer-social svg { width: 18px; height: 18px; }

.copyright {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 13px;
  margin: 0;
  padding: 12px var(--gutter);
  background: #1e1e1e;
  font-size: 12px;
  line-height: 14px;
  text-align: center;
  color: #fff;
}
.copyright a { color: #fff; }
.copyright a:hover { text-decoration: underline; }

/* =========================================================
   ANIMATIONS AU DÉFILEMENT
   ========================================================= */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.cards .reveal:nth-child(2) { transition-delay: .1s; }
.cards .reveal:nth-child(3) { transition-delay: .2s; }
.cards .reveal:nth-child(4) { transition-delay: .3s; }
.showroom-text.reveal { transition-delay: .15s; }

.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .hero-content > * { opacity: 1; transform: none; }
  .hero-bg { transform: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1240px) {
  .main-nav a { padding: 13px 14px; font-size: 15px; }
  .header-cta { padding: 11px 18px; font-size: 13px; }
}

@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .assets-list { grid-template-columns: repeat(3, 1fr); row-gap: 18px; }
}

/* ---------- Menu mobile (burger) ---------- */
@media (max-width: 1024px) {
  :root { --header-h: 70px; }
  .site-header.is-scrolled { --header-h: 70px; }
  .header-logo img,
  .is-scrolled .header-logo img { height: 46px; }

  .burger { display: block; z-index: 2; }
  .header-cta { display: none; }
  .header-logo { opacity: 1; pointer-events: auto; z-index: 2; }
  /* pas de backdrop-filter ici : il confinerait le menu plein écran (position: fixed) à la hauteur de l'en-tête */
  .site-header,
  .site-header.is-scrolled { background: rgba(0,0,0,.85); backdrop-filter: none; }

  .main-nav {
    position: fixed;
    inset: 0;
    transform: none;
    padding: calc(var(--header-h) + 30px) 32px 40px;
    background: #000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; }
  .main-nav > ul { flex-direction: column; align-items: flex-start; gap: 6px; }
  .main-nav a { padding: 8px 0; font-size: 20px; font-weight: 200; text-transform: uppercase; }
  .main-nav > ul > li > a::after { left: 0; right: 0; }
  .sub-menu {
    position: static;
    min-width: 0;
    padding: 4px 0 10px 16px;
    background: none;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.25);
    opacity: 1;
    visibility: inherit; /* suit l’état du menu : invisible et inactif quand il est fermé */
    transform: none;
  }
  .sub-menu a { font-size: 14px; text-transform: none; font-weight: 300; padding: 6px 0; color: var(--white); }
  .sub-menu a:hover,
  .sub-menu a[aria-current] { background: none; color: var(--white); text-decoration: underline; text-underline-offset: 4px; }
  .caret { display: none; }
  .nav-cta-mobile { display: block; margin-top: 20px; }
  .nav-cta-mobile a { border: 1px solid var(--white); padding: 12px 20px; font-size: 13px; font-weight: 500; }
  .nav-cta-mobile a::after { display: none; }
}

@media (max-width: 860px) {

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.55) 60%, rgba(0,0,0,.3) 100%),
      linear-gradient(0deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,0) 40%);
  }
  .logo--lg { --s: 62px; }

  .band { min-height: 480px; }
  .band-shade { background: rgba(0,0,0,.6) !important; }
  .band--left .band-content { padding-left: var(--gutter); }

  .showroom-grid { grid-template-columns: 1fr; gap: 30px; }
  .showroom-text { padding-left: 0; }
}

@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .cards { grid-template-columns: 1fr; }
  .card { aspect-ratio: 16 / 10; }
  .assets-list { grid-template-columns: repeat(2, 1fr); }
  .assets-list li:last-child { grid-column: 1 / -1; }
  .logo--lg { --s: 52px; }
  .band-content p,
  .showroom-text p { text-align: left; }
  .footer-contact { flex-direction: column; }
  .footer-social { margin: 6px 0 0; }
  .copyright { flex-direction: column; }
  .copyright .sep { display: none; }
}

/* =========================================================
   RETOUR EN HAUT
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: #000;
  border: 1px solid rgba(255,255,255,.8);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background .3s, color .3s;
}
.back-to-top svg { width: 14px; height: 14px; fill: currentColor; transition: transform .3s var(--ease); }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: #fff; color: #000; }
.back-to-top:hover svg { transform: translateY(-2px); }
@media (max-width: 560px) {
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
