:root {
  --navy-deep: #061620;
  --navy: #081c29;
  --navy-mid: #0b2230;
  --navy-elevated: #102b3b;
  --navy-hover: #17313c;
  --parchment: #eeeae1;
  --parchment-ink: #102a39;
  --parchment-muted: #56656d;
  --parchment-gold: #8c693e;
  --gold: #c5a476;
  --gold-hover: #dec298;
  --gold-border: #766449;
  --whatsapp: #1b8748;
  --whatsapp-hover: #219d55;
  --ivory: #f1eee5;
  --muted: #a7b4bd;
  --line: rgba(197, 164, 118, 0.24);
  --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  background-color: var(--navy);
  color: var(--ivory);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--navy);
  color: var(--ivory);
  line-height: 1.65;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
}

em {
  color: var(--gold);
  font-style: italic;
}

@keyframes reveal {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Bandeau hors ligne ---------- */
.offline-banner {
  background: var(--navy-elevated);
  border-bottom: 1px solid var(--gold);
  color: var(--gold);
  text-align: center;
  padding: 9px 16px;
  font-size: 12px;
  letter-spacing: 0.4px;
}

/* ---------- Top Bar (compacte) ---------- */
.header {
  position: relative;
  z-index: 30;
  height: 68px;
  padding: 0 6%;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 3.5px;
  color: var(--ivory);
  line-height: 1;
}

.brand-sub {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 2.2px;
  color: var(--gold);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  position: relative;
  padding: 12px 0;
  font-size: 12px;
  color: #bbc4c9;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--gold);
}

.nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--gold);
}

.menu-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--gold);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.2px;
  color: var(--gold);
}

.eyebrow-centered {
  justify-content: center;
}

.dash {
  width: 24px;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

/* ---------- 1. QUATRE BOUTONS IMMÉDIATS DÈS L'OUVERTURE ---------- */
.quick-hub {
  background: radial-gradient(at 80% 15%, #143a50 0%, #0b2637 48%, #081c29 85%);
  border-bottom: 1px solid var(--line);
  padding: 24px 6% 28px;
  animation: 0.5s both reveal;
}

.quick-hub-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.four-actions-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.primary-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 60px;
  padding: 13px 16px;
  border: 1px solid var(--gold-border);
  background: rgba(11, 34, 48, 0.88);
  color: var(--ivory);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.primary-btn:hover {
  background: var(--navy-hover);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.primary-btn-whatsapp {
  background: var(--whatsapp);
  border-color: #25a55a;
  color: #ffffff;
}

.primary-btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  border-color: #38c773;
}

.primary-btn-install {
  background: var(--gold);
  border-color: var(--gold);
  color: #102430;
}

.primary-btn-install:hover {
  background: var(--gold-hover);
  border-color: var(--gold-hover);
}

.primary-btn-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.primary-btn-left svg {
  flex-shrink: 0;
}

.primary-btn-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.primary-btn-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.primary-btn-sub {
  font-size: 11px;
  opacity: 0.88;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-btn-arrow {
  font-size: 15px;
  flex-shrink: 0;
  opacity: 0.88;
}

/* ---------- 2. PHOTOGRAPHIE PUIS NOM ET PRÉSENTATION SOBRE ---------- */
.portrait-stage {
  background: radial-gradient(at 50% 35%, #143a50 0%, #0b2637 45%, #081c29 82%);
  border-bottom: 1px solid var(--line);
  padding: 36px 6% 42px;
  animation: 0.65s 0.08s both reveal;
}

.portrait-stage-inner {
  max-width: 820px;
  margin: 0 auto;
}

.hero-visual {
  position: relative;
  height: 460px;
  overflow: hidden;
}

.architecture {
  position: absolute;
  inset: 4% 12% 0;
  display: flex;
  gap: 14px;
  padding: 28px;
  opacity: 0.65;
  border: 1px solid #385361;
  box-shadow: inset 0 0 0 12px #0c2635, inset 0 0 0 13px #2a4857;
}

.architecture > div {
  flex: 1;
  border: 1px solid #2f5264;
  box-shadow: inset 0 0 0 7px #0b2536, inset 0 0 0 8px #244a60;
}

.architecture::after {
  content: '';
  position: absolute;
  top: 53%;
  left: 0;
  right: 0;
  height: 18px;
  background: #112e41;
  border-block: 1px solid #486070;
}

.visual-circle {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid #7d745b;
  opacity: 0.45;
}

.visual-circle::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1px solid #7d745b;
  opacity: 0.5;
}

.portrait-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 94%;
  object-fit: contain;
  object-position: bottom center;
  filter: brightness(0.92) saturate(0.86);
}

.hero-visual::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(8, 28, 41, 0.85) 68%, var(--navy));
}

.vertical-label {
  position: absolute;
  top: 26%;
  right: 16px;
  writing-mode: vertical-rl;
  letter-spacing: 3px;
  font-size: 8px;
  color: #7f9aa8;
}

.identity-caption {
  text-align: center;
  padding-top: 24px;
}

.identity-caption h1 {
  margin: 12px 0 10px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -1px;
  text-wrap: balance;
}

.identity-sub {
  max-width: 52ch;
  margin: 0 auto;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- 3 & 4. QR CODE CARTE & QR CODE WHATSAPP SUCCESSIFS ---------- */
.section {
  padding: 40px 6%;
}

.qr-section-card {
  background: var(--navy-elevated);
  border-bottom: 1px solid var(--line);
}

.qr-section-wa {
  background: var(--navy);
  border-bottom: 1px solid var(--line);
}

.qr-container {
  max-width: 820px;
  margin: 0 auto;
}

.qr-block {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 26px;
  background: rgba(8, 28, 41, 0.72);
  border: 1px solid var(--line);
}

.qr-section-wa .qr-block {
  background: var(--navy-mid);
}

.qr-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #f7f4ec;
  border: 1px solid var(--gold);
}

.qr-frame canvas {
  display: block;
  width: 100%;
  max-width: 202px;
  height: auto;
}

.qr-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.qr-meta h2 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.12;
  color: var(--ivory);
}

.qr-caption {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 10px;
}

.qr-target {
  font-size: 11px;
  color: var(--gold);
  word-break: break-all;
  overflow-wrap: anywhere;
  margin-bottom: 16px;
}

.qr-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--gold-border);
  color: var(--ivory);
  font-size: 12px;
  align-self: flex-start;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.qr-download-btn:hover {
  background: var(--navy-hover);
  border-color: var(--gold);
}

/* ---------- Bande Principes (Référence) ---------- */
.principles {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 14px 24px;
  padding: 22px 7%;
  background: var(--navy-mid);
  border-bottom: 1px solid var(--line);
}

.principles > span:not(.star) {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ivory);
}

.star {
  color: var(--gold);
  font-size: 18px;
}

/* ---------- COORDONNÉES, VCARD & PARTAGE (BANDE PARCHEMIN #eeeae1) ---------- */
.about {
  background: var(--parchment);
  color: var(--parchment-ink);
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 56px;
  align-items: start;
  padding: 64px 7%;
}

.about > * {
  min-width: 0;
}

.about .eyebrow {
  color: var(--parchment-gold);
}

.about em {
  color: var(--parchment-gold);
}

.about-title {
  margin-top: 14px;
  margin-bottom: 16px;
  font-size: clamp(32px, 3.8vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.6px;
}

.about-lead {
  font-size: 15px;
  line-height: 1.75;
  color: #2c4654;
  margin-bottom: 24px;
  max-width: 44ch;
}

.identity-utilities {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-dark-action,
.btn-parchment-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-dark-action {
  background: var(--parchment-ink);
  border: 1px solid var(--parchment-ink);
  color: var(--parchment);
}

.btn-dark-action:hover {
  background: #1a3d52;
}

.btn-parchment-outline {
  background: transparent;
  border: 1px solid var(--parchment-gold);
  color: var(--parchment-ink);
}

.btn-parchment-outline:hover {
  background: rgba(140, 105, 62, 0.12);
}

.details-list {
  border-top: 1px solid rgba(16, 42, 57, 0.15);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(16, 42, 57, 0.15);
}

.detail-key {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--parchment-muted);
  flex-shrink: 0;
}

.detail-val {
  font-size: 14px;
  font-weight: 500;
  color: var(--parchment-ink);
  text-align: right;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.detail-val a {
  border-bottom: 1px solid rgba(140, 105, 62, 0.45);
  padding-bottom: 2px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.detail-val a:hover {
  color: var(--parchment-gold);
  border-color: var(--parchment-gold);
}

/* ---------- 5. SIGNATURE DISCRÈTE DU CRÉATEUR ---------- */
footer {
  background: var(--navy-deep);
  padding: 32px 6% 26px;
}

.footer-client {
  max-width: 1180px;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px 24px;
}

.footer-client-name {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--ivory);
}

.footer-client-info {
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 18px;
  border-top: 1px solid rgba(197, 164, 118, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.creator-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.creator-signature {
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #7e939f;
}

.creator-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  min-height: 34px;
  font-size: 11px;
  color: #93a7b3;
  background: transparent;
  border: 1px solid rgba(147, 167, 179, 0.28);
  transition: color 0.18s ease, border-color 0.18s ease;
}

.creator-btn:hover {
  color: var(--ivory);
  border-color: rgba(197, 164, 118, 0.55);
}

.back-top {
  color: #8ea2ae;
  font-size: 11px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  transition: color 0.18s ease;
}

.back-top:hover {
  color: var(--gold);
}

/* ---------- Modale d'installation PWA (.detail-dialog) ---------- */
.detail-dialog {
  width: calc(100% - 28px);
  max-width: 520px;
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  margin: auto;
  padding: 34px 24px 24px;
  background: var(--navy-elevated);
  color: var(--ivory);
  border: 1px solid var(--gold);
  position: relative;
}

.detail-dialog::backdrop {
  background: rgba(2, 13, 21, 0.8);
  backdrop-filter: blur(5px);
}

.detail-dialog h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 28px;
  padding-right: 32px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--gold);
}

.install-block {
  margin-bottom: 16px;
  padding: 15px;
  background: rgba(8, 28, 41, 0.55);
  border: 1px solid var(--line);
}

.install-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
}

.visual-steps {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.visual-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ivory);
}

.step-badge-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  background: var(--navy);
  color: var(--gold);
}

.install-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 60;
  padding: 12px 18px;
  background: var(--navy-elevated);
  border: 1px solid var(--gold);
  color: var(--ivory);
  font-size: 12.5px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: calc(100vw - 28px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Responsive Grand Écran ---------- */
@media (min-width: 1500px) {
  .header,
  .quick-hub,
  .section,
  .principles,
  .about,
  footer {
    padding-left: max(6%, 50vw - 680px);
    padding-right: max(6%, 50vw - 680px);
  }
}

/* ---------- Responsive Petit Laptop & Tablette (<= 1180px) ---------- */
@media (max-width: 1180px) {
  .four-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    gap: 20px;
  }

  .about {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* ---------- Responsive Smartphone & Petite Tablette (<= 768px) ---------- */
@media (max-width: 768px) {
  .header {
    height: 58px;
    padding-inline: 4.5%;
  }

  .brand-text {
    font-size: 18px;
    letter-spacing: 2.4px;
  }

  .brand-sub {
    font-size: 7.5px;
    margin-top: 3px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 5%;
    background: #0b2637;
    border-bottom: 1px solid var(--gold);
    box-shadow: 0 18px 36px rgba(2, 10, 16, 0.7);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  /* 4 boutons visibles immédiatement sur smartphone sans scroller */
  .quick-hub {
    padding: 16px 4.5% 20px;
  }

  .four-actions-grid {
    margin-top: 12px;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .primary-btn {
    min-height: 52px;
    padding: 10px 14px;
  }

  .portrait-stage {
    padding: 22px 4.5% 30px;
  }

  .hero-visual {
    height: 350px;
  }

  .architecture {
    inset: 4% 6% 0;
    padding: 16px;
    gap: 10px;
  }

  .visual-circle {
    width: 240px;
    height: 240px;
    top: 10%;
  }

  .identity-caption {
    padding-top: 20px;
  }

  .identity-caption h1 {
    font-size: clamp(32px, 9.5vw, 46px);
  }

  .section {
    padding: 26px 4.5%;
  }

  .about {
    padding: 40px 4.5%;
  }

  .qr-block {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px;
    text-align: center;
  }

  .qr-frame {
    max-width: 232px;
    width: 100%;
    margin: 0 auto;
  }

  .qr-frame canvas {
    max-width: 204px;
  }

  .qr-meta .eyebrow {
    justify-content: center;
  }

  .qr-download-btn {
    width: 100%;
    align-self: stretch;
  }

  .identity-utilities {
    flex-direction: column;
  }

  .btn-dark-action,
  .btn-parchment-outline {
    width: 100%;
  }

  .principles {
    flex-direction: column;
    gap: 8px;
    padding: 20px 4.5%;
    text-align: center;
  }

  .principles .star {
    display: none;
  }

  .principles > span:not(.star) {
    font-size: 17px;
  }

  footer {
    padding: 28px 4.5% 24px;
  }

  .footer-client {
    flex-direction: column;
    gap: 6px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .creator-btn {
    min-height: 40px;
    padding: 8px 14px;
  }
}

/* ---------- Très petits smartphones (<= 480px) ---------- */
@media (max-width: 480px) {
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.4px;
    gap: 8px;
  }

  .dash {
    width: 16px;
  }

  .primary-btn {
    min-height: 50px;
    padding: 10px 13px;
  }

  .primary-btn-title {
    font-size: 12.5px;
  }

  .primary-btn-sub {
    font-size: 10.5px;
  }

  .hero-visual {
    height: 310px;
  }

  .architecture {
    inset: 4% 3% 0;
    padding: 12px;
    gap: 8px;
  }

  .visual-circle {
    width: 205px;
    height: 205px;
    top: 12%;
  }

  .btn-dark-action,
  .btn-parchment-outline,
  .qr-download-btn {
    white-space: normal;
    text-align: center;
  }

  .detail-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  .detail-val {
    text-align: left;
  }

  .vertical-label {
    display: none;
  }

  .detail-dialog {
    width: calc(100% - 20px);
    padding: 28px 18px 20px;
  }

  .detail-dialog h2 {
    font-size: 23px;
  }
}

/* ---------- Ultra-compacts (<= 360px) ---------- */
@media (max-width: 360px) {
  .header {
    gap: 10px;
  }

  .brand-text {
    font-size: 15px;
    letter-spacing: 1.5px;
  }

  .hero-visual {
    height: 270px;
  }

  .qr-block {
    padding: 18px 14px;
  }

  .qr-frame {
    max-width: 196px;
    padding: 10px;
  }

  .identity-caption h1 {
    font-size: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
