/* invit.evnt.tn - Main stylesheet (inspired by Paperless Post) */

:root {
  --gold: #111111;
  --gold-light: #444444;
  --gold-dark: #000000;
  --navy: #111111;
  --navy-light: #333333;
  --cream: #FFFFFF;
  --cream-dark: #F6F6F6;
  --ink: #111111;
  --muted: #666666;
  --line: #E5E5E5;
  --white: #FFFFFF;
  --shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 52px rgba(0, 0, 0, 0.12);

  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --serif-display: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --arabic: 'Noto Naskh Arabic', 'Amiri', serif;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[dir="rtl"] body { font-family: var(--arabic), var(--sans); }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

h1, h2, h3, h4 { font-family: var(--serif-display); font-weight: 500; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.01em; }
h3 { font-size: 1.4rem; }

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: var(--arabic), var(--serif-display); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ========== Header & Mega-menu (Paperless Post style) ========== */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  height: 72px;
}
.logo {
  font-family: var(--serif-display); font-size: 1.55rem; font-weight: 600;
  color: var(--navy); letter-spacing: -.02em;
  flex-shrink: 0;
  display: inline-flex; align-items: center;
  line-height: 1;
}
.logo .dot { color: var(--gold); }
/* Variante avec image uploadée depuis /admin/settings.php */
.logo-image { padding: 0; }
.logo-img {
  display: block;
  height: 40px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
}
.site-footer .logo-img { height: 36px; max-width: 160px; }

.nav {
  display: flex; align-items: center; gap: 24px;
  flex: 1; justify-content: space-between;
  margin-inline-start: 24px;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
  list-style: none; padding: 0; margin: 0;
}
.nav-item { position: relative; }
.nav-link, .nav-link-mega {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: .92rem; font-weight: 500;
  color: var(--navy);
  border-radius: 8px;
  transition: background .18s ease, color .18s ease;
  background: transparent;
  text-decoration: none;
}
.nav-link:hover, .nav-link-mega:hover,
.nav-item.is-open .nav-link-mega {
  background: var(--cream-dark);
  color: var(--gold-dark);
}
.nav-chev {
  font-size: .85rem;
  transition: transform .25s ease;
  display: inline-block;
}
.nav-item.is-open .nav-chev { transform: rotate(180deg); }
.nav-link-admin { color: var(--gold-dark); }
.nav-link-quiet { font-size: .88rem; color: var(--muted); }

.nav-aside {
  display: flex; align-items: center; gap: 14px;
  margin-inline-start: auto;
}
.nav-cta {
  padding: 10px 20px;
  font-size: .88rem;
}
.lang-menu,
.account-menu {
  position: relative;
}
.lang-menu summary,
.account-menu summary {
  list-style: none;
  cursor: pointer;
}
.lang-menu summary::-webkit-details-marker,
.account-menu summary::-webkit-details-marker {
  display: none;
}
.lang-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: #fff;
}
.lang-menu-list,
.account-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 128px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
  z-index: 230;
}
.lang-menu-list a,
.account-menu-list a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--navy);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
}
.lang-menu-list a:hover,
.account-menu-list a:hover,
.lang-menu-list a.active {
  background: var(--cream-dark);
  color: var(--gold-dark);
}
.account-menu-list { min-width: 160px; }

/* ========== Mega-menu panel ========== */
.mega-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: -90px;
  width: min(940px, calc(100vw - 48px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0,0,0,.14), 0 2px 10px rgba(0,0,0,.04);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  z-index: 210;
}
.mega-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 126px;
  width: 14px;
  height: 14px;
  background: var(--white);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.nav-item.is-open .mega-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear 0s;
}
.mega-inner {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 10px;
}
.mega-feature {
  min-height: 100%;
  padding: 24px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.mega-feature-kicker {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: .68rem;
  letter-spacing: .16em;
  font-weight: 700;
}
.mega-feature strong {
  display: block;
  font-family: var(--serif-display);
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 500;
}
.mega-feature p {
  color: rgba(255,255,255,.72);
  font-size: .9rem;
  line-height: 1.55;
  margin-top: -4px;
}
.mega-feature-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-size: .86rem;
  font-weight: 700;
}
.mega-feature-cta:hover { color: #111; background: #f3f3f3; }
.mega-content { padding: 18px 18px 14px; }
.mega-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: .78rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mega-topline a {
  color: var(--navy);
  text-transform: none;
  letter-spacing: 0;
  font-size: .82rem;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.mega-col-title {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.mega-col-list {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  gap: 3px;
}
.mega-col-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: .92rem;
  color: var(--ink);
  font-weight: 520;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.mega-col-list a:hover {
  background: var(--cream-dark);
  color: var(--gold-dark);
  transform: translateX(2px);
}
.mega-link-arrow {
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .15s ease, transform .15s ease;
}
.mega-col-list a:hover .mega-link-arrow {
  opacity: 1;
  transform: translateX(0);
}
.mega-foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.mega-foot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 650;
  color: var(--navy);
  background: #fff;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mega-foot-link::after { content: none; }
.mega-foot-link:hover { color: #fff; background: var(--navy); border-color: var(--navy); }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  background: transparent; border: 0;
  cursor: pointer;
  z-index: 220;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav.is-open ~ * .nav-toggle span,
[aria-expanded="true"].nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
[aria-expanded="true"].nav-toggle span:nth-child(2) { opacity: 0; }
[aria-expanded="true"].nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== Mobile / tablet ========== */
@media (max-width: 960px) {
  .site-header .container { gap: 12px; }
  /* IMPORTANT : on retire le backdrop-filter sur mobile. Un ancêtre avec
   * backdrop-filter devient le bloc conteneur des descendants position:fixed
   * ET les CLIPPE à sa propre boîte sur iOS Safari → le menu plein écran se
   * retrouvait coincé dans la barre du header (≈60px) = « le menu ne s'ouvre pas ».
   * Le fond du header est déjà quasi opaque (rgba .94), aucun impact visuel. */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255,255,255,.98); }
  .nav-toggle { display: inline-flex; }
  .nav {
    /* Le header porte backdrop-filter, ce qui en fait le bloc conteneur de
     * cet élément fixed. On utilise donc top:0 + hauteur viewport (dvh) au
     * lieu de bottom:0 (qui se calculerait par rapport au header et ferait
     * s'effondrer le panneau). Le padding-top dégage la barre du header. */
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    background: var(--white);
    padding: 84px 24px 96px;
    margin: 0;
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
    z-index: 199;
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
  }
  .nav.is-open {
    opacity: 1; visibility: visible; transform: translateY(0);
    pointer-events: auto;
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear 0s;
  }
  body.nav-open { overflow: hidden; }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }
  .nav-link, .nav-link-mega {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 1rem;
    justify-content: space-between;
  }
  /* En mobile, le panneau « Modèles » est DÉPLIÉ par défaut : dès que le menu
   * s'ouvre, les catégories sont visibles sans avoir à retaper sur « Modèles ». */
  .mega-panel {
    position: static;
    width: 100%;
    min-width: 0; max-width: 100%;
    box-shadow: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    background: var(--cream);
    opacity: 1; visibility: visible;
    transform: none;
    max-height: none;
    overflow: visible;
  }
  .mega-panel::before { display: none; }
  /* Le chevron du déclencheur n'a plus d'utilité (panneau toujours ouvert) */
  .nav-link-mega .nav-chev { display: none; }
  .mega-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .mega-feature {
    min-height: 0;
    padding: 18px;
  }
  .mega-feature strong { font-size: 1.2rem; }
  .mega-feature p { font-size: .86rem; }
  .mega-content { padding: 12px 8px 8px; }
  .mega-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
  }
  .mega-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .mega-col-list a {
    min-height: 40px;
    padding: 9px 10px;
  }
  .mega-link-arrow {
    opacity: 1;
    transform: none;
  }
  .mega-foot {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .nav-aside {
    margin-top: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  .lang-menu summary,
  .account-menu summary {
    width: 100%;
    justify-content: space-between;
  }
  .lang-menu-list,
  .account-menu-list {
    position: static;
    margin-top: 8px;
    box-shadow: none;
    width: 100%;
  }
  .nav-cta { justify-content: center; }
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; letter-spacing: .01em;
  transition: all .25s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--navy-light); color: var(--cream); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--cream-dark); }
.btn-lg { padding: 18px 36px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }

/* ========== Hero ========== */
.hero {
  position: relative;
  padding: clamp(60px, 10vw, 130px) 0;
  text-align: center;
  background: var(--white);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: var(--line);
}
.hero h1 { max-width: 800px; margin: 0 auto 24px; letter-spacing: -.025em; }
.hero .subtitle {
  max-width: 600px; margin: 0 auto 40px;
  font-size: 1.1rem; color: var(--muted); line-height: 1.75;
}
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero .ornament {
  display: inline-block; width: 80px; height: 1px; background: var(--gold);
  vertical-align: middle; margin: 0 16px;
  position: relative;
}
.hero .ornament::before,
.hero .ornament::after {
  content: ''; position: absolute; top: 50%;
  width: 4px; height: 4px;
  background: var(--gold); border-radius: 50%;
  transform: translateY(-50%);
}
.hero .ornament::before { left: -8px; }
.hero .ornament::after  { right: -8px; }
.hero .eyebrow {
  font-family: var(--serif); font-style: italic; font-size: 1.05rem;
  color: var(--gold-dark); margin-bottom: 28px;
  letter-spacing: .04em;
}

/* ========== Sections ========== */
section { padding: clamp(60px, 10vw, 100px) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 60px; position: relative; }
.section-head h2 { margin-bottom: 16px; position: relative; }
.section-head h2::after {
  content: '';
  display: block; width: 60px; height: 1px;
  background: var(--gold);
  margin: 16px auto 0;
  position: relative;
}
.section-head h2::before {
  content: '✦';
  display: block; color: var(--gold);
  font-size: .8rem; opacity: .7;
  margin-bottom: 8px;
  letter-spacing: 1em;
  padding-left: 1em;
}
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 24px; }

.section-light { background: var(--cream); }
.section-dark { background: var(--navy); color: var(--cream); }
.section-dark h2 { color: var(--cream); }
.section-cream { background: var(--cream-dark); }

/* ========== Features grid ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.feature {
  padding: 32px;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--line);
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--white); font-size: 1.4rem;
}
.feature h3 { margin-bottom: 8px; font-size: 1.2rem; }
.feature p { color: var(--muted); font-size: .95rem; }

/* ========== How it works ========== */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; counter-reset: step; }
.step { text-align: center; padding: 24px; counter-increment: step; }
.step::before {
  content: counter(step);
  display: inline-flex; width: 56px; height: 56px; border-radius: 50%;
  background: var(--cream); border: 1px solid var(--gold);
  font-family: var(--serif-display); font-size: 1.6rem; color: var(--gold-dark);
  align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step h4 { font-size: 1.1rem; color: var(--navy); }

/* ========== Categories ========== */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.cat {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  display: flex; align-items: flex-end; padding: 20px;
}
.cat:hover { transform: translateY(-4px); }
.cat[data-type="wedding"],
.cat[data-type="baby_shower"],
.cat[data-type="corporate"],
.cat[data-type="birthday_girl"],
.cat[data-type="birthday_boy"] { background: #fff; color: var(--ink); }
.cat span {
  font-family: var(--serif-display); font-size: 1.4rem; font-weight: 500;
  color: inherit;
}

/* ========== Templates gallery (Paperless Post style - denser grid, flatter tiles) ========== */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 28px 22px;
}
.tpl-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all .3s;
}
.tpl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.tpl-card .preview {
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, var(--cream-dark), var(--cream));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-dark); font-family: var(--serif-display); font-size: 1.4rem;
  position: relative; overflow: hidden;
}
.tpl-card .preview::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(26,43,74,.4));
}
.tpl-card .body { padding: 24px; }
.tpl-card h3 { margin-bottom: 4px; }
.tpl-card .meta { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.tpl-card .price { font-family: var(--serif-display); font-size: 1.3rem; color: var(--gold-dark); }
.tpl-card .badge { font-size: .8rem; color: var(--muted); }

/* ========== Forms ========== */
.form-card {
  background: var(--white);
  padding: 40px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-size: .9rem; font-weight: 500; margin-bottom: 8px; color: var(--navy); }
input, textarea, select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; color: var(--ink); background: var(--white);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, .15);
}
textarea { resize: vertical; min-height: 100px; }

.form-help { font-size: .82rem; color: var(--muted); margin-top: 4px; }

/* ========== A11y - focus visible global (review v2) ==========
   Ring doré cohérent sur tous les éléments interactifs. */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
  border-radius: 4px;
}
/* CTAs pill : offset adapté à la forme arrondie */
.hero-cta-primary:focus-visible,
.hero-cta-link:focus-visible,
.howv2-cta:focus-visible,
.finalv2-cta:focus-visible,
.formule-cta:focus-visible {
  outline-offset: 4px;
  border-radius: 999px;
}
.hero-cta-link:focus-visible { border-radius: 4px; }
.faqv2 summary:focus-visible {
  outline-offset: -2px;
  border-radius: 6px;
}

/* ========== Reduced motion (review v2) ==========
   Respecte la préférence système. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-v2 .hero-badge,
  .hero-v2-scroll::after { animation: none !important; }
}

/* ========== Footer ========== */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: 60px 0 30px;
  margin-top: 0; /* pas d'espace blanc avant footer - la section précédente colle */
}
.site-footer a { color: var(--cream); opacity: .8; }
.site-footer a:hover { opacity: 1; color: var(--gold-light); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 40px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand .logo { color: var(--cream); }
.footer-brand p { opacity: .7; font-size: .9rem; margin-top: 12px; }
/* Logo image : si l'asset est noir, on l'inverse en blanc pour qu'il se voie sur fond sombre */
.site-footer .logo-img {
  filter: brightness(0) invert(1);
  opacity: .92;
}
.footer-col h4 { color: var(--cream); font-size: 1rem; margin-bottom: 16px; font-family: var(--sans); font-weight: 600; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: .85rem; opacity: .6; }

/* ========== Flash messages ========== */
.flash {
  padding: 14px 18px; border-radius: 10px; margin-bottom: 24px;
  font-size: .92rem;
}
.flash-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.flash-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.flash-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* ========== Utilities ========== */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.muted { color: var(--muted); }

/* ========== Animations ========== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .8s ease both; }
.fade-up-delay-1 { animation: fadeUp .8s .15s ease both; }
.fade-up-delay-2 { animation: fadeUp .8s .3s ease both; }
.fade-up-delay-3 { animation: fadeUp .8s .45s ease both; }

/* ========== Hero grid + cards ========== */
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px;
  align-items: center; text-align: start;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
}
.hero-text h1 { margin-bottom: 24px; }
.hero-text .subtitle { margin-bottom: 32px; }
.hero-text .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-text .cta-row { justify-content: center; } }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 24px;
  margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line);
  font-size: .9rem; color: var(--muted);
}
.hero-trust strong { color: var(--navy); display: block; font-family: var(--serif-display); font-size: 1.6rem; line-height: 1; }
@media (max-width: 900px) { .hero-trust { justify-content: center; } }

.hero-cards {
  position: relative; height: 500px;
  display: flex; align-items: center; justify-content: center;
  perspective: 1500px;
}
.hero-card {
  position: absolute; width: 240px;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
  filter: drop-shadow(0 20px 40px rgba(26,43,74,.25));
}
.hero-card .preview {
  aspect-ratio: 3/4;
  border-radius: 8px;
  overflow: hidden;
}
.hero-card-0 { transform: rotate(-9deg) translate(-90px, 8px) translateZ(0); z-index: 1; }
.hero-card-1 { transform: rotate(0deg) translateY(-8px) translateZ(40px); z-index: 3; }
.hero-card-2 { transform: rotate(9deg) translate(90px, 8px) translateZ(0); z-index: 2; }
.hero-cards:hover .hero-card-0 { transform: rotate(-13deg) translate(-130px, -10px); }
.hero-cards:hover .hero-card-1 { transform: translateY(-20px) translateZ(60px) scale(1.04); }
.hero-cards:hover .hero-card-2 { transform: rotate(13deg) translate(130px, -10px); }
@media (max-width: 600px) {
  .hero-cards { height: 400px; }
  .hero-card { width: 190px; }
  .hero-card-0 { transform: rotate(-9deg) translate(-55px, 8px); }
  .hero-card-2 { transform: rotate(9deg) translate(55px, 8px); }
}

/* ========== Landing envelope demo ========== */
.section-demo {
  background: var(--white);
  padding: clamp(64px, 8vw, 110px) 0;
}
.demo-grid {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(340px, 1fr);
  align-items: center;
  gap: clamp(36px, 7vw, 88px);
}
.demo-copy {
  text-align: start;
  margin: 0;
}
.demo-copy h2 { max-width: 560px; }
.demo-copy p { max-width: 520px; margin-bottom: 24px; }
.landing-envelope-demo {
  border: 0;
  background: linear-gradient(180deg, #FFFFFF, #F2F2F2);
  border-radius: 18px;
  min-height: 520px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(26,43,74,.08), 0 26px 70px rgba(26,43,74,.16);
}
.demo-env {
  --demo-env: #2A2A2A;
  --demo-env-dark: #000000;
  position: absolute;
  width: min(72%, 460px);
  aspect-ratio: 3/2;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  perspective: 1200px;
}
.demo-env-back,
.demo-env-pocket,
.demo-env-flap,
.demo-env-liner,
.demo-card,
.demo-seal {
  position: absolute;
  display: block;
}
.demo-env-back {
  inset: 0;
  background: linear-gradient(135deg, var(--demo-env), var(--demo-env-dark));
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(26,43,74,.26);
}
.demo-env-liner {
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.45) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 42%, rgba(255,255,255,.28) 0 2px, transparent 3px),
    #F2F2F2;
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: top center;
  transform: rotateX(0);
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.demo-env-flap {
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--demo-env) 78%, #000), var(--demo-env-dark));
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: top center;
  transform: rotateX(0);
  z-index: 5;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.demo-env-pocket {
  inset: 0;
  background: linear-gradient(135deg, var(--demo-env), color-mix(in srgb, var(--demo-env) 78%, #000));
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 50% 62%, 0 0);
  z-index: 3;
}
.demo-card {
  width: 58%;
  aspect-ratio: 3/4;
  left: 21%;
  bottom: 8%;
  z-index: 2;
  background: #fff;
  color: var(--navy);
  border-radius: 8px;
  padding: 13% 10%;
  text-align: center;
  box-shadow: 0 6px 14px rgba(0,0,0,.08), inset 0 0 0 1px var(--line);
  transform: translateY(18%) scale(.78);
  transition: transform .9s .35s cubic-bezier(.2,.8,.2,1),
              box-shadow .5s .35s ease,
              z-index 0s linear .35s;
}
.demo-card-small {
  display: block;
  font-size: .62rem;
  letter-spacing: .22em;
  color: var(--gold-dark);
  margin-bottom: 14px;
}
.demo-card-names {
  display: block;
  font-family: var(--serif-display);
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  line-height: 1.05;
}
.demo-card-names span {
  color: var(--gold-dark);
  font-style: italic;
}
.demo-card-line {
  display: block;
  width: 38%;
  height: 1px;
  background: var(--gold);
  margin: 18px auto;
  opacity: .55;
}
.demo-card-date {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}
.demo-seal {
  width: 15%;
  aspect-ratio: 1;
  border-radius: 50%;
  left: 50%;
  top: 32%;
  transform: translate(-50%, -50%);
  z-index: 6;
  background: #111;
  color: #fff;
  font-family: var(--serif-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 4px rgba(255,255,255,.28), 0 5px 12px rgba(26,43,74,.25);
  transition: transform .45s ease, opacity .35s ease;
}
.landing-envelope-demo.is-open .demo-env-flap,
.landing-envelope-demo.is-open .demo-env-liner {
  transform: rotateX(172deg);
}
.landing-envelope-demo.is-open .demo-card {
  transform: translateY(-62%) scale(1);
  z-index: 30;
  box-shadow: 0 22px 44px rgba(26,43,74,.28);
}
.landing-envelope-demo.is-open .demo-seal {
  transform: translate(-50%, -50%) scale(.4);
  opacity: 0;
}
.demo-tap {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 900px) {
  .demo-grid { grid-template-columns: 1fr; }
  .demo-copy { text-align: center; }
  .demo-copy h2,
  .demo-copy p { margin-left: auto; margin-right: auto; }
  .landing-envelope-demo { min-height: 430px; }
}

/* ========== Occasion grid ========== */
.occasion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.occasion-card {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s, border-color .3s;
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  position: relative;
}
.occasion-card:hover {
  transform: translateY(-6px);
  box-shadow: none;
  border-color: var(--ink);
}
.occasion-card-preview {
  aspect-ratio: 4/5;
  background: linear-gradient(180deg, #FFFFFF, var(--cream-dark));
  position: relative;
  overflow: hidden;
}
.occasion-card-preview .preview { width: 100%; height: 100%; }
.occasion-card-meta {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif-display); font-size: 1.05rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #FFFFFF);
}
.occasion-card-meta .name { flex: 1; font-weight: 500; }
.occasion-card-meta .arrow {
  color: var(--muted);
  transition: transform .3s, color .3s;
  font-size: 1.1rem;
}
.occasion-card:hover .occasion-card-meta .arrow {
  transform: translateX(6px);
  color: var(--gold-dark);
}

/* ========== Social proof bar (chiffres) ========== */
.social-proof-bar {
  background: var(--cream-dark);
  padding: clamp(36px, 5vw, 56px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  align-items: center;
  text-align: center;
}
.proof-stat strong {
  display: block;
  font-family: var(--serif-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  letter-spacing: -.01em;
}
.proof-stat-suffix {
  font-size: .55em;
  color: var(--gold-dark);
  font-weight: 500;
  margin-inline-start: 2px;
}
.proof-stat span {
  display: block;
  margin-top: 8px;
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .04em;
}

/* ========== Testimonials ========== */
.testimonials-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}
.testimonial {
  background: var(--white); padding: 28px 30px;
  border-radius: 16px; border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.testimonial:hover {
  transform: translateY(-3px);
  border-color: rgba(201,169,97,.4);
  box-shadow: 0 16px 40px rgba(26,43,74,.10);
}
.testimonial-head {
  display: flex; align-items: center; gap: 14px;
}
.testimonial-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--avatar-bg, var(--cream-dark));
  color: var(--avatar-fg, var(--navy));
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: .02em;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.testimonial-meta { display: flex; flex-direction: column; line-height: 1.3; }
.testimonial-meta strong {
  font-family: var(--sans);
  font-size: .95rem;
  color: var(--navy);
  font-weight: 600;
}
.testimonial-meta .muted {
  font-size: .78rem;
  color: var(--muted);
}
.testimonial .stars { color: var(--gold); letter-spacing: 4px; font-size: .85rem; }
.testimonial p {
  font-family: var(--serif); font-style: italic;
  font-size: 1.05rem; line-height: 1.6;
  color: var(--ink);
  margin: 0;
}

/* ========== Trust logos ========== */
.trust-logos {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(20px, 4vw, 56px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.trust-logo {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .18em;
  font-size: .82rem;
  color: var(--muted);
  opacity: .65;
  transition: opacity .25s ease, color .25s ease;
  user-select: none;
}
.trust-logo:hover { opacity: 1; color: var(--navy); }
@media (max-width: 600px) {
  .trust-logos { gap: 16px; }
  .trust-logo { font-size: .72rem; letter-spacing: .14em; }
}

/* ========== Legal pages (privacy / terms) ========== */
.legal {
  background: var(--white);
  padding: clamp(40px, 6vw, 64px);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
}
.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 4px;
}
.legal h2 {
  font-size: 1.3rem;
  margin: 32px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--navy);
}
.legal h2:first-of-type { padding-top: 0; border-top: 0; margin-top: 24px; }
.legal h3 {
  font-size: 1.05rem;
  margin: 16px 0 8px;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--gold-dark);
}
.legal p { margin-bottom: 12px; }
.legal ul { padding-inline-start: 24px; margin-bottom: 12px; }
.legal li { margin-bottom: 6px; }
.legal code {
  background: var(--cream-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
  color: var(--navy);
}
.legal a { color: var(--gold-dark); text-decoration: underline; }
.legal a:hover { color: var(--navy); }

/* ========== FAQ accordion ========== */
.faq {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 0; margin-bottom: 12px;
  overflow: hidden;
}
.faq summary {
  padding: 18px 22px; cursor: pointer;
  font-weight: 500; color: var(--navy); list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-size: 1.4rem; color: var(--gold-dark);
  transition: transform .25s; line-height: 1;
}
.faq[open] summary::after { content: '−'; }
.faq[open] summary { border-bottom: 1px solid var(--line); }
.faq p { padding: 18px 22px; color: var(--muted); line-height: 1.7; }

/* ========== Minimal monochrome skin ========== */
.logo .dot,
.hero .eyebrow,
.section-head h2::before,
.testimonial .stars { color: var(--ink); }

.section-head h2::before { display: none; }
.hero .ornament,
.hero .ornament::before,
.hero .ornament::after,
.section-head h2::after {
  background: var(--ink);
}

.btn,
.feature,
.testimonial,
.faq,
.legal,
.tpl-card,
.form-card {
  border-radius: 8px;
}

.btn-gold,
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.btn-gold:hover,
.btn-primary:hover {
  background: var(--white);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: none;
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
}
.btn-ghost:hover { background: var(--cream-dark); }

.feature .icon,
.step::before,
.cat,
.cat .icon {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.cat,
.cat[data-type],
.cat[data-type="wedding"],
.cat[data-type="baby_shower"],
.cat[data-type="corporate"],
.occasion-card-preview,
.occasion-card-meta,
.demo-stage,
.section-cream,
.section-light {
  background: var(--white);
}

.section-dark,
.site-footer {
  background: var(--ink);
  color: var(--white);
}
.section-dark h2,
.site-footer h4,
.site-footer .logo { color: var(--white); }

.hero-trust,
.demo-copy,
.feature:hover,
.occasion-card:hover {
  box-shadow: none;
}

/* ========================================================
   Responsive audit - corrections ciblées tablette / mobile
   Breakpoints utilisés : 1100 / 960 / 768 / 600 / 420
   ======================================================== */

/* Tablette portrait + petits laptops */
@media (max-width: 1100px) {
  .container, .container-sm { padding-inline: 20px; }
  .hero-grid { gap: 40px; }
  .testimonials-grid { gap: 18px; }
}

/* Tablette */
@media (max-width: 768px) {
  section { padding: clamp(48px, 8vw, 72px) 0; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: .95rem; margin-top: 16px; }
  h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); }
  h2 { font-size: clamp(1.5rem, 5.5vw, 2.1rem); }
  h3 { font-size: 1.2rem; }
  .btn-lg { padding: 14px 26px; font-size: .95rem; }
  .hero { padding: clamp(40px, 8vw, 80px) 0; }
  .hero .subtitle { margin-bottom: 28px; font-size: 1rem; }
  .hero .cta-row .btn { flex: 1 1 auto; min-width: 160px; }
  .hero-trust {
    margin-top: 28px; padding-top: 22px;
    gap: 16px; font-size: .8rem;
    justify-content: space-between;
  }
  .hero-trust strong { font-size: 1.3rem; }
  .demo-grid { gap: 28px; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .testimonial { padding: 22px; }
  .features-grid { gap: 20px; }
  .feature { padding: 22px; }
  .steps { gap: 16px; }
  .step::before { width: 44px; height: 44px; font-size: 1.3rem; }
  .filter-pill { padding: 5px 12px; font-size: .8rem; }
  .footer-grid { gap: 28px; }
  .proof-stats { gap: 18px; }
  .proof-stat strong { font-size: 1.6rem; }
  .proof-stat span { font-size: .72rem; margin-top: 4px; }
  .trust-logos { padding-top: 22px; }
}

/* Phone */
@media (max-width: 600px) {
  .container, .container-sm { padding-inline: 16px; }
  .site-header .container { height: 60px; }
  body.preview-modal-open { overflow: hidden; }
  .hero-trust div { min-width: 0; }
  .hero-cards { height: 360px; perspective: 800px; }
  .hero-card { width: 165px; }
  .hero-card-0 { transform: rotate(-9deg) translate(-44px, 6px); }
  .hero-card-1 { transform: translateY(-4px) translateZ(20px); }
  .hero-card-2 { transform: rotate(9deg) translate(44px, 6px); }
  .occasion-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .occasion-card-meta { padding: 12px 14px; font-size: .9rem; gap: 8px; }
  .occasion-card-meta .arrow { font-size: .9rem; }
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { gap: 14px; }
  .testimonial-head { gap: 10px; }
  .testimonial-avatar { width: 42px; height: 42px; font-size: 1rem; }
  .testimonial-meta strong { font-size: .9rem; }
  .testimonial p { font-size: 1rem; line-height: 1.55; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; }
  .demo-copy h2 { margin-bottom: 12px; }
  .landing-envelope-demo { min-height: 380px; }
  .demo-env { width: min(82%, 360px); }
  .faq summary { padding: 14px 16px; font-size: .92rem; }
  .faq p { padding: 14px 16px; font-size: .92rem; }
  .templates-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .tpl-card .body { padding: 14px 16px 16px; }
  .tpl-card h3 { font-size: 1rem; }
  .tpl-card .price { font-size: 1.05rem; }
  .tpl-card .badge { font-size: .72rem; }
  .tpl-card .style-tag { font-size: .65rem; margin-bottom: 8px; }
  .tpl-fav { width: 32px; height: 32px; font-size: 1rem; top: 8px; right: 8px; }
  .tpl-card .preview .quick-action { font-size: .68rem; padding: 6px 12px; }
  .results-bar { font-size: .82rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 40px 0 24px; margin-top: 0; }
  .site-footer h4 { font-size: .92rem; margin-bottom: 10px; }
}

/* Très petit (phones étroits) - on GARDE 2 colonnes dans la galerie (demande client) */
@media (max-width: 420px) {
  .templates-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .occasion-grid { grid-template-columns: 1fr; }
  .filters { gap: 6px; padding: 12px 0; }
  .filter-group { gap: 4px; }
  .filter-pill { padding: 5px 10px; font-size: .75rem; }
  .filter-pill .count { font-size: .68rem; }
  .hero-cards { height: 320px; }
  .hero-card { width: 145px; }
  .demo-card-names { font-size: 1.4rem; }
  .proof-stats { grid-template-columns: 1fr 1fr; gap: 14px; }
  .proof-stat strong { font-size: 1.5rem; }
}

/* Landscape phones (small height) */
@media (max-height: 480px) and (max-width: 900px) {
  .nav { padding: 72px 24px 40px; }
  .preview-modal-panel { max-height: calc(100vh - 16px); }
}

/* ========================================================
   Mobile polish - touch targets, no horizontal scroll, safe-area
   ======================================================== */
/* overflow-x: clip (et non hidden) : empêche le scroll horizontal SANS créer de
   conteneur de défilement → ne casse pas position:sticky (sidebar galerie, aside
   éditeur, etc.). Fallback hidden pour les très vieux navigateurs. */
html, body { overflow-x: hidden; overflow-x: clip; }
img, video, svg { max-width: 100%; height: auto; }
/* Évite les débordements horizontaux dus à des enfants flex/grid (URLs longues, etc.) */
.container > *, .nav-links > *, .form-row > *, .basic-grid > *, .cine-grid > *, .create-grid > * { min-width: 0; }

@media (max-width: 600px) {
  /* Touch targets ≥ 44px */
  .btn, .nav-link, .nav-link-mega, .nav-toggle,
  input[type="text"], input[type="email"], input[type="password"],
  input[type="date"], input[type="datetime-local"], input[type="tel"],
  input[type="search"], select, textarea {
    min-height: 44px;
  }
  input[type="color"] { min-height: 44px; }
  /* Boutons : padding/texte réduits + retour à la ligne autorisé pour ne JAMAIS
   * couper le libellé sur petit écran (« Payer avec PayPal → », etc.). */
  .btn { padding: 12px 18px; font-size: .9rem; gap: 6px; }
  .btn-lg { padding: 14px 22px; font-size: .95rem; }
  .btn-block { white-space: normal; text-align: center; }
  /* Empêche le zoom auto iOS sur focus input (font-size ≥ 16px) */
  input, textarea, select { font-size: 16px; }
  /* Safe-area iPhone notch/home indicator */
  .site-header, .site-footer { padding-left: max(0px, env(safe-area-inset-left)); padding-right: max(0px, env(safe-area-inset-right)); }
}

/* Phones très étroits : éviter que le mega-menu déborde */
@media (max-width: 380px) {
  .container, .container-sm { padding-inline: 12px; }
  .mega-foot a { font-size: .85rem; }
  .nav-aside { gap: 8px; }
}
