/* ==========================================================================
   Carpe Diem Privilèges — design system
   ========================================================================== */

:root {
  --navy-900: #16283f;
  --navy-800: #1d3557;
  --navy-700: #2a4a75;
  --poppy-600: #d1495b;
  --poppy-500: #e2607a;
  --poppy-100: #fbe4e6;
  --cream-50: #fdfaf4;
  --cream-100: #f7f0e4;
  --sand-200: #ede2cd;
  --ink-900: #22303f;
  --ink-600: #5b6b78;
  --ink-400: #8b98a3;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 2px 8px rgba(22, 40, 63, 0.06);
  --shadow-md: 0 12px 32px rgba(22, 40, 63, 0.10);
  --shadow-lg: 0 24px 60px rgba(22, 40, 63, 0.14);

  --container: 1160px;
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Work Sans", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--cream-50);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--ink-600); }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--poppy-600);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--poppy-600);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--poppy-600);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #b93b4c; transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  border-color: var(--navy-800);
  color: var(--navy-800);
}
.btn-outline:hover { background: var(--navy-800); color: var(--white); transform: translateY(-2px); }

.btn-light {
  background: var(--white);
  color: var(--navy-800);
  box-shadow: var(--shadow-sm);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn[disabled], .btn.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 250, 244, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(22, 40, 63, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 128px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand .brand-name {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--navy-900);
  letter-spacing: 0.01em;
}

.brand .brand-name em {
  font-style: normal;
  color: var(--poppy-600);
}

.brand .brand-tag {
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-top: 10px;
}

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

.main-nav a:not(.icon-link) {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-800);
  position: relative;
  padding: 6px 0;
}

.main-nav a:not(.icon-link)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--poppy-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.main-nav a:not(.icon-link):hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active { color: var(--poppy-600); }

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--poppy-600), #f0a1a1);
  color: var(--white);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy-900); display: block; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 96px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -160px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--poppy-100) 0%, transparent 70%);
  z-index: 0;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 { margin-bottom: 20px; }
.hero .lede { font-size: 1.1rem; max-width: 46ch; }

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual .cover-frame {
  position: relative;
  transform: rotate(-4deg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 8px solid var(--white);
  max-width: 340px;
  transition: transform 0.3s ease;
}
.hero-visual .cover-frame:hover { transform: rotate(0deg); }

.hero-visual .badge-edition {
  position: absolute;
  top: -18px;
  left: -18px;
  background: var(--navy-900);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--cream-50);
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--cream-100); }

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head.align-left { margin-left: 0; text-align: left; }

/* ---------- Universe / category grid ---------- */
.universe-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.universe-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--navy-800);
}
.universe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.universe-card img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.85;
}

.universe-card .universe-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(15, 25, 40, 0.88));
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}

.universe-card.is-soon .universe-label::after {
  content: "Bientôt";
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--poppy-500);
  margin-top: 4px;
}

.universe-card.is-soon { pointer-events: none; }
.universe-card.is-soon img { filter: grayscale(0.5); opacity: 0.55; }

/* placeholder tile when no photo available */
.universe-card .placeholder-tile {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12rem;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
}

/* ---------- Category directory (Espace Privilèges) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(22,40,63,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--poppy-100);
}

.category-card .cat-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  background: var(--poppy-100);
  flex-shrink: 0;
}

.category-card .cat-name { font-weight: 700; color: var(--navy-900); }
.category-card .cat-status {
  font-size: 0.72rem;
  color: var(--ink-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.category-card.is-live .cat-status { color: var(--poppy-600); }
.category-card.is-soon {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- Advertiser grid (category detail pages) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 28px;
}
.back-link:hover { color: var(--poppy-600); }

.advertiser-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.advertiser-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(22,40,63,0.06);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.advertiser-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.advertiser-card img { max-height: 80px; width: auto; margin: 0 auto; }

.advertiser-card.is-placeholder {
  border: 2px dashed rgba(22,40,63,0.18);
  box-shadow: none;
  color: var(--ink-400);
  font-size: 0.85rem;
  text-align: center;
  font-weight: 600;
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 56px 0 40px;
  text-align: center;
}
.page-hero p { max-width: 60ch; margin: 0 auto; }

/* ---------- Content blocks ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.stat {
  text-align: center;
  padding: 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.stat .stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--poppy-600);
}
.stat .stat-label { font-size: 0.85rem; color: var(--ink-600); }

/* ---------- Callout / CTA banner ---------- */
.callout {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.callout::after {
  content: "";
  position: absolute;
  right: -60px; bottom: -80px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: rgba(226, 96, 122, 0.25);
}
.callout h2 { color: var(--white); margin-bottom: 8px; }
.callout p { color: rgba(255,255,255,0.75); margin-bottom: 0; }
.callout-content { position: relative; z-index: 1; max-width: 520px; }
.callout .btn-primary { position: relative; z-index: 1; }

/* ---------- Simple content pages (legal, CGU) ---------- */
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body h2 { margin-top: 1.6em; }
.legal-body p, .legal-body li { color: var(--ink-600); }

.info-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 900px;
  margin: 0 auto;
}
.info-columns .logo-block { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.info-columns dl { margin: 0; }
.info-columns dt { font-weight: 700; color: var(--navy-900); margin-top: 14px; }
.info-columns dd { margin: 2px 0 0; color: var(--ink-600); }

/* ---------- Resource list (Annonceurs page) ---------- */
.resource-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(22,40,63,0.06);
}
.resource-item .resource-title { font-weight: 700; color: var(--navy-900); }
.resource-item .resource-desc { font-size: 0.85rem; color: var(--ink-600); margin: 4px 0 0; }

/* ---------- Instagram embed ---------- */
.instagram-embed-wrap {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--white);
}
.instagram-embed-wrap iframe { display: block; width: 100% !important; }

/* ---------- Access gate (Espace Privilèges) ---------- */
.cdp-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cream-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cdp-gate-box {
  max-width: 400px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 44px 36px;
  text-align: center;
}
.cdp-gate-box .eyebrow { justify-content: center; }
.cdp-gate-box h2 { margin-bottom: 8px; }
.cdp-gate-box p { margin-bottom: 24px; }
.cdp-gate-box form { display: flex; flex-direction: column; gap: 14px; }
.cdp-gate-box input[type="password"] {
  padding: 13px 20px;
  border-radius: 999px;
  border: 1px solid rgba(22, 40, 63, 0.18);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: center;
  background: var(--cream-50);
}
.cdp-gate-box input[type="password"]:focus {
  outline: none;
  border-color: var(--poppy-500);
}
.cdp-gate-box .btn { width: 100%; border: none; }
.cdp-gate-error {
  color: var(--poppy-600);
  font-size: 0.85rem;
  margin: 14px 0 0;
  font-weight: 600;
}

/* ---------- Sitemap ---------- */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.sitemap-block {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(22, 40, 63, 0.06);
  padding: 24px;
}
.sitemap-block h3 { font-size: 1.05rem; margin-bottom: 12px; }
.sitemap-block h3 a { color: var(--navy-900); }
.sitemap-block h3 a:hover { color: var(--poppy-600); }
.sitemap-block ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sitemap-block li a { font-size: 0.88rem; color: var(--ink-600); }
.sitemap-block li a:hover { color: var(--poppy-600); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.75);
  padding: 56px 0 28px;
  margin-top: 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand .brand-name { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.6); max-width: 34ch; margin-top: 10px; }

.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-links h4 { color: var(--white); font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom .icon-link { width: 34px; height: 34px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .universe-grid, .category-grid, .advertiser-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav { position: fixed; top: 128px; left: 0; width: 100%; height: calc(100vh - 128px); background: var(--cream-50); flex-direction: column; align-items: flex-start; padding: 32px 24px; gap: 24px; transform: translateX(100%); transition: transform 0.25s ease; overflow-y: auto; box-sizing: border-box; }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .callout { flex-direction: column; text-align: center; }
  .callout-content { max-width: none; }
  .footer-top { flex-direction: column; }
}
