/* =========================================================
   Theme + Design tokens
========================================================= */
:root {
  /* Surfaces */
  --bg: #fbf7f2; /* nude crème */
  --surface: rgba(255, 255, 255, 0.74);
  --surface-strong: rgba(255, 255, 255, 0.92);

  /* Texte */
  --text: #1e1b18;
  --muted: #6e625b;

  /* Couleurs */
  --primary: #c6b27a;
  --primary-2: #e7deb8;
  --accent: #8fa89a;

  /* UI */
  --border: rgba(30, 27, 24, 0.10);
  --ring: rgba(198, 174, 122, 0.18);
  --shadow: 0 18px 48px rgba(30, 27, 24, 0.10);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(18px, 3.5vw, 42px);

  /* Spacing */
  --s1: 6px;
  --s2: 10px;
  --s3: 14px;
  --s4: 18px;
  --s5: 24px;
  --s6: 32px;
  --s7: 44px;
  --s8: 64px;
  --s9: 92px;

  /* Radius */
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

/* =========================================================
   Reset
========================================================= */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;

  background:
    radial-gradient(1100px 620px at 18% 8%, rgba(198, 171, 122, 0.16), transparent 60%),
    radial-gradient(1100px 620px at 82% 0%, rgba(171, 160, 143, 0.16), transparent 55%),
    radial-gradient(920px 620px at 50% 92%, rgba(231, 215, 171, 0.14), transparent 58%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }

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

.muted { color: var(--muted); }
.hidden { display: none; }

/* Utilitaires */
.stack > * + * { margin-top: var(--s3); }
.stack-lg > * + * { margin-top: var(--s4); }
.text-sm { font-size: 14px; }
.text-md { font-size: 15.5px; }
.title-sm { margin: 0; font-size: 16px; }
.label { font-size: 14px; }

/* =========================================================
   IMPORTANT : le contenu doit être AU-DESSUS du background flottant
========================================================= */
.main,
.section,
.footer {
  position: relative;
  z-index: 1;
}

/* (Topbar déjà au-dessus via z-index: 30, on garde) */

/* =========================================================
   Surfaces
========================================================= */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(30, 27, 24, 0.08);
}

/* =========================================================
   Buttons + inputs
========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  height: 46px;
  padding: 0 18px;

  border-radius: 999px;
  border: 1px solid transparent;

  cursor: pointer;
  user-select: none;

  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 34px rgba(198, 174, 122, 0.24);
}

.btn-primary:hover {
  box-shadow: 0 22px 46px rgba(198, 167, 122, 0.30);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.62);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.80);
}

.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;

  border-radius: 16px;
  border: 1px solid var(--border);

  background: rgba(255, 255, 255, 0.78);
  outline: none;
}

.input:focus {
  box-shadow: 0 0 0 7px var(--ring);
  border-color: rgba(198, 165, 122, 0.35);
}

/* =========================================================
   Layout global
========================================================= */
.main { padding-top: var(--s5); }

.section { padding: var(--s8) 0; }

.section-head {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s6);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 2.3vw, 30px);
  letter-spacing: -0.3px;
}

/* =========================================================
   Topbar / Navigation
========================================================= */
.topbar {
  position: sticky;
  top: var(--s5);
  z-index: 30;
  margin-top: var(--s5);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 6px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 30px rgba(198, 167, 122, 0.18);
}

.brand strong { font-size: 15.5px; letter-spacing: 0.2px; }

.brand span {
  display: block;
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--muted);
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navlinks a {
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(30, 27, 24, 0.86);
}

.navlinks a:hover {
  background: rgba(255, 255, 255, 0.60);
  border-color: var(--border);
}

.mobile-btn { display: none; }

.mobile-panel {
  display: none;
  padding: 12px 16px 16px;
  margin-top: var(--s3);
}

.mobile-panel[data-open="true"] { display: block; }

.mobile-panel a {
  display: block;
  margin-top: 10px;
  padding: 14px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.60);
}

/* =========================================================
   Hero
========================================================= */
.hero {
  padding: clamp(84px, 9vw, 124px) 0 clamp(56px, 6vw, 92px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(var(--s5), 2.6vw, var(--s7));
  align-items: stretch;
}

.hero-box {
  padding: clamp(22px, 2.4vw, 34px);
  border-radius: var(--radius-xl);
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.7px;
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   Grids / Features
========================================================= */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(var(--s4), 2vw, var(--s6));
}

.feature {
  padding: clamp(18px, 2vw, 28px);
}

.feature h3 {
  margin: 0;
  font-size: 16px;
}

.feature p {
  margin: var(--s2) 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.7;
}

/* =========================================================
   Footer
========================================================= */
.footer {
  padding: var(--s7) 0 var(--s8);
  color: var(--muted);
  font-size: 13.5px;
}

/* =========================================================
   Floating layer (GLOBAL) -> BACKGROUND
   (Ne change PAS les classes, juste la profondeur)
========================================================= */
.float-layer {
  position: fixed;
  inset: 0;

  pointer-events: none;

  /* Important: en arrière-plan */
  z-index: 0;

  /* Optionnel : adoucit l'image sans la "casser" */
  filter: saturate(0.95) contrast(0.98);
}

/* La card qui se déplace via GSAP */
.image-reine-et-romain {
  position: absolute;
  top: 0;
  left: 0;

  width: min(340px, 42vw);
  aspect-ratio: 4 / 5;

  border-radius: var(--radius-xl);
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(30, 27, 24, 0.10);

  /* Opacité faible (background) */
  opacity: 0.22;

  will-change: transform;
  transform: translateZ(0);

  pointer-events: none;    /* ne bloque jamais les clics */
  user-select: none;
  touch-action: none;
}

.image-reine-et-romain img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 720px) {
  .image-reine-et-romain {
    width: min(260px, 70vw);
    /* opacity: 0.16; */
  }
}

.image-reine-et-romain[data-dragging="true"] {
  cursor: grabbing;
  opacity: 1;            /* juste un peu plus visible pendant le drag */
}


/* =========================================================
   Responsive global
========================================================= */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .navlinks { display: none; }
  .mobile-btn { display: inline-flex; }
}

/* =========================
   Site Loader (GSAP)
   ========================= */
html.is-loading,
html.is-loading body {
    height: 100%;
    overflow: hidden;
}

.site-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(1200px 800px at 50% 35%, rgba(231, 222, 184, 0.55), rgba(248, 246, 241, 1) 62%),
        radial-gradient(900px 700px at 20% 90%, rgba(198, 178, 122, 0.20), rgba(248, 246, 241, 0) 60%),
        radial-gradient(900px 700px at 85% 20%, rgba(198, 178, 122, 0.14), rgba(248, 246, 241, 0) 55%);
}

.site-loader__panel {
    width: min(520px, 92vw);
    border-radius: 28px;
    padding: 28px 24px 22px;
    text-align: center;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(198, 178, 122, 0.22);
    box-shadow: 0 30px 80px rgba(35, 31, 24, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.site-loader__mark {
    width: 94px;
    height: 94px;
    margin: 0 auto 14px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 18px 45px rgba(198, 167, 122, 0.20);
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
}

.site-loader__mark::after {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%);
    transform: translateX(var(--shine-x, -55%)) rotate(18deg);
    opacity: .55;
    pointer-events: none;
}

.site-loader__logo {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(35, 31, 24, 0.18));
    background-image: url('../public/logos/second-rounded.png');
}

.site-loader__title {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.site-loader__text {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.site-loader__line {
    width: min(260px, 70vw);
    height: 4px;
    margin: 16px auto 0;
    border-radius: 999px;
    background: rgba(35, 31, 24, 0.10);
    overflow: hidden;
    position: relative;
}

.site-loader__line span {
    position: absolute;
    inset: 0;
    width: 40%;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(198, 178, 122, 0), rgba(198, 178, 122, 0.85), rgba(231, 222, 184, 0));
    transform: translateX(-60%);
}

/* Small screens */
@media (max-width: 420px) {
    .site-loader__panel { padding: 22px 18px 18px; border-radius: 22px; }
    .site-loader__mark { width: 86px; height: 86px; border-radius: 26px; }
}
