/* CVEG — portail web premium unifié */

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

:root {
  --bg-deep: #0a0812;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-solid: rgba(18, 16, 28, 0.88);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.15);
  --accent-glow: rgba(167, 139, 250, 0.35);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

[data-theme="slate"] {
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --accent-glow: rgba(56, 189, 248, 0.35);
}

[data-theme="editorial"] {
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.15);
  --accent-glow: rgba(201, 162, 39, 0.35);
}

[data-theme="mono"] {
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.15);
  --accent-glow: rgba(167, 139, 250, 0.35);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Aurora background ── */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora::before {
  content: "";
  position: absolute;
  inset: -50%;
  background:
    radial-gradient(ellipse 60% 50% at 20% 30%, rgba(56, 189, 248, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(167, 139, 250, 0.16) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 60% 20%, rgba(201, 162, 39, 0.1) 0%, transparent 50%);
  animation: auroraShift 18s ease-in-out infinite alternate;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: orbFloat 22s ease-in-out infinite;
}

.orb-1 {
  width: 420px;
  height: 420px;
  background: #38bdf8;
  top: -8%;
  left: -6%;
  animation-delay: 0s;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: #7c3aed;
  bottom: -10%;
  right: -8%;
  animation-delay: -7s;
}

.orb-3 {
  width: 300px;
  height: 300px;
  background: #c9a227;
  top: 40%;
  left: 55%;
  animation-delay: -14s;
  opacity: 0.35;
}

@keyframes auroraShift {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(3%, 2%) rotate(3deg); }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 25px) scale(0.95); }
}

/* ── Layout ── */

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.glass-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--glass-shadow);
  overflow: hidden;
}

@supports not (backdrop-filter: blur(20px)) {
  .glass-card {
    background: var(--glass-bg-solid);
  }
}

.glass-card--wide {
  max-width: 720px;
}

.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    500px circle at var(--gx, 50%) var(--gy, 50%),
    var(--accent-glow),
    transparent 45%
  );
  opacity: 0.35;
  transition: opacity 0.3s;
  z-index: 0;
}

.glass-card > *:not(.card-glow) {
  position: relative;
  z-index: 1;
}

/* ── Entrance animations ── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.16s; }
.reveal-delay-3 { animation-delay: 0.24s; }
.reveal-delay-4 { animation-delay: 0.32s; }
.reveal-delay-5 { animation-delay: 0.4s; }
.reveal-delay-6 { animation-delay: 0.48s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Identity header ── */

.identity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.monogram {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--glass-border);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.identity-text h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.tagline {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 2px;
}

.theme-chip {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  border-radius: 999px;
}

.updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.updated time {
  color: var(--text);
  font-weight: 600;
}

/* ── Buttons ── */

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

a.btn {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

a.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a.btn-primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff));
  color: #0a0812;
  box-shadow: 0 4px 20px var(--accent-glow);
}

a.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

a.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--glass-border);
}

a.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Footer ── */

.site-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--accent);
}

/* ── Hub theme grid ── */

.hub-intro {
  text-align: center;
  margin-bottom: 28px;
}

.hub-intro .identity {
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.hub-intro .monogram {
  width: 64px;
  height: 64px;
  font-size: 1.2rem;
}

.hub-intro h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.theme-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

@media (min-width: 600px) {
  .theme-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.theme-card {
  display: flex;
  flex-direction: column;
  padding: 20px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.theme-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-glow);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.theme-card[data-theme="slate"]:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 12px 40px rgba(56, 189, 248, 0.12);
}

.theme-card[data-theme="editorial"]:hover {
  border-color: rgba(201, 162, 39, 0.4);
  box-shadow: 0 12px 40px rgba(201, 162, 39, 0.12);
}

.theme-card[data-theme="mono"]:hover {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 12px 40px rgba(167, 139, 250, 0.12);
}

.theme-card-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.theme-card[data-theme="slate"] .theme-card-label { color: #38bdf8; }
.theme-card[data-theme="editorial"] .theme-card-label { color: #c9a227; }
.theme-card[data-theme="mono"] .theme-card-label { color: #a78bfa; }

.theme-card-focus {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  flex: 1;
  margin-bottom: 14px;
}

.theme-card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s;
}

.theme-card:hover .theme-card-cta {
  color: var(--text);
}

.theme-card-wrap {
  display: flex;
  flex-direction: column;
}

.theme-card-pdf {
  display: block;
  margin-top: 8px;
  padding-left: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s;
}

.theme-card-pdf:hover {
  opacity: 1;
  color: var(--text);
  text-decoration: underline;
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .aurora::before,
  .orb {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  a.btn,
  .theme-card {
    transition: none;
  }
}

/* ── Mobile tweaks ── */

@media (max-width: 480px) {
  .glass-card {
    padding: 28px 22px;
  }

  .identity-text h1,
  .hub-intro h1 {
    font-size: 1.3rem;
  }
}
