:root {
  --bg: #f5f7fb;
  --bg-elevated: rgba(255, 255, 255, 0.74);
  --surface: #ffffff;
  --text: #111827;
  --muted: #5b6475;
  --border: rgba(17, 24, 39, 0.08);
  --primary: #3b82f6;
  --primary-2: #8b5cf6;
  --success: #0f9d58;
  --danger: #d93025;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
}

body.dark-theme {
  --bg: #0b1120;
  --bg-elevated: rgba(15, 23, 42, 0.76);
  --surface: #111827;
  --text: #f3f4f6;
  --muted: #a4afc2;
  --border: rgba(255, 255, 255, 0.08);
  --primary: #60a5fa;
  --primary-2: #a78bfa;
  --success: #34a853;
  --danger: #ff6b6b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.modal-open {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.16), transparent 28%);
  pointer-events: none;
  z-index: -1;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.header-content {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toggle-theme,
.icon-button,
.submit-button,
.secondary-button,
.info-button,
.modal-close {
  border: 0;
  cursor: pointer;
}

.toggle-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}

.toggle-track {
  width: 68px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  overflow: hidden;
}

.toggle-icon {
  width: 15px;
  height: 15px;
  z-index: 1;
  color: rgba(255, 255, 255, 0.95);
  display: grid;
  place-items: center;
}

.toggle-icon svg,
.icon-button svg,
.info-button svg,
.modal-close svg {
  width: 100%;
  height: 100%;
}

.toggle-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 26px;
  height: 26px;
  background: #fff;
  border-radius: 50%;
  transform: translateX(0);
  transition: transform 0.28s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.18);
}

body.dark-theme .toggle-thumb {
  transform: translateX(34px);
}

.icon-button,
.modal-close {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease;
}

.hidden {
  display: none !important;
}

.hero-section {
  flex: 1;
  padding: 3.2rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: start;
}

.hero-copy {
  padding: 2rem 0.4rem 0 0;
}

.badge,
.modal-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}

.badge {
  margin-bottom: 1rem;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p,
.invitation-block p,
.card-header p,
.feature-card span,
.helper-text,
.video-note,
#modalDescription,
.check-card small,
.footer-content p {
  color: var(--muted);
}

.hero-copy p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.7;
  max-width: 62ch;
}

.invitation-block {
  margin-top: 1.5rem;
  padding: 1.2rem 1.25rem;
  border-radius: 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.invitation-block h2 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.invitation-block p {
  margin: 0;
}

.feature-list {
  margin-top: 1.75rem;
  display: grid;
  gap: 1rem;
}

.feature-card,
.form-card,
.modal-dialog {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.feature-card {
  border-radius: 20px;
  padding: 1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feature-card strong {
  font-size: 1rem;
}

.form-card {
  border-radius: 28px;
  padding: 1.4rem;
}

.card-header h2,
.modal-content h3 {
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.card-header p {
  margin: 0 0 1.25rem;
}

.inscription-form,
.modal-content {
  display: grid;
  gap: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.two-cols {
  grid-template-columns: repeat(2, 1fr);
}

.field,
.fieldset {
  display: grid;
  gap: 0.45rem;
}

label,
legend {
  font-weight: 600;
}

input,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.fieldset {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1rem;
  margin: 0;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.check-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  transition: transform 0.18s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.check-card:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
}

.check-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.check-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.check-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.check-card span {
  font-weight: 600;
}

.check-card small {
  line-height: 1.45;
}

.info-button {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.10);
  color: var(--primary);
  border: 1px solid rgba(59, 130, 246, 0.18);
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.info-button:hover {
  transform: scale(1.05);
  background: rgba(59, 130, 246, 0.16);
}

.form-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}

.submit-button,
.secondary-button {
  padding: 0.95rem 1.2rem;
  border-radius: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.25s ease, box-shadow 0.25s ease;
}

.submit-button {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.26);
}

.secondary-button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.submit-button:hover,
.secondary-button:hover,
.icon-button:hover,
.toggle-theme:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.submit-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.helper-text,
.form-message,
.video-note {
  font-size: 0.92rem;
}

.helper-text {
  margin: 0;
}

.form-message {
  min-height: 1.4rem;
  font-weight: 600;
}

.form-message.success {
  color: var(--success);
}

.form-message.error {
  color: var(--danger);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  backdrop-filter: blur(16px);
  margin-top: 2rem;
}

.footer-content {
  padding: 1.5rem 0 2.2rem;
  text-align: center;
}

.footer-content p {
  margin: 0.35rem 0;
}

.footer-content strong {
  color: var(--text);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(820px, calc(100% - 1.5rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  margin: 1rem auto;
  border-radius: 28px;
  padding: 1.2rem;
}

.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  z-index: 2;
}

.modal-content {
  padding-top: 0.25rem;
}

#modalDescription {
  margin: 0;
  line-height: 1.7;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .header-content {
    flex-direction: column;
    justify-content: center;
    padding: 0.9rem 0;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .hero-section {
    padding-top: 2rem;
  }

  .two-cols,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .form-card,
  .modal-dialog {
    padding: 1.1rem;
    border-radius: 22px;
  }

  .footer-links {
    gap: 0.35rem;
  }
}
