/**
 * Meyrin CTT - Kirby Theme
 * Main stylesheet
 * 
 * Note: Most styles are handled by Tailwind CSS via the browser CDN.
 * This file contains additional custom styles and overrides.
 */

/* Base styles */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

main [id] {
  scroll-margin-top: 6rem;
}

main :is(h1, h2, h3, h4, h5, h6)[id] {
  position: relative;
}

.heading-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  margin-left: 0.35em;
  color: var(--color-accent);
  opacity: 0;
  text-decoration: none;
  transform: translateY(-0.03em);
  transition: opacity 0.16s ease, color 0.16s ease;
}

main :is(h1, h2, h3, h4, h5, h6)[id]:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.heading-anchor:hover,
.heading-anchor:focus-visible,
.heading-anchor[data-copied="true"] {
  color: var(--color-primary);
}

.heading-anchor[data-copied="true"]::after {
  content: "copié";
  position: absolute;
  left: 100%;
  margin-left: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  white-space: nowrap;
}

:root {
  /* Default color values - will be overridden by Tailwind theme */
  --color-primary: #0056b3;
  --color-primary-dark: #003d82;
  --color-accent: #d32f2f;
  --color-border: #004494;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --shadow-soft: 4px 4px 0px rgba(0, 86, 179, 0.15);
  --shadow-hover: 6px 6px 0px rgba(0, 86, 179, 0.25);
}

/* Prose styles for article content */
.prose {
  max-width: 65ch;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  font-family: var(--font-heading);
}

.prose h1 {
  font-weight: 800;
  font-size: 2.25em;
  line-height: 1.2;
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
}

.prose h2 {
  font-weight: 700;
  font-size: 1.875em;
  line-height: 1.3;
  text-transform: uppercase;
  margin-top: 2em;
  margin-bottom: 0.5em;
  border-bottom: 4px solid var(--color-primary);
  padding-bottom: 0.5rem;
  display: inline-block;
}

.prose h3 {
  font-weight: 700;
  font-size: 1.5em;
  line-height: 1.4;
  text-transform: uppercase;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
}

.prose h4 {
  font-weight: 600;
  font-size: 1.25em;
  line-height: 1.5;
  text-transform: uppercase;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p {
  font-family: var(--font-body);
  margin-bottom: 1em;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
  list-style-position: outside;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-bottom: 0.5em;
  line-height: 1.75;
}

.prose a {
  color: var(--color-primary);
  text-decoration: underline;
}

.prose a:hover {
  color: var(--color-accent);
}

.prose img {
  border-radius: 0.75rem;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.prose blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  font-style: italic;
  color: #666;
}

/* Lead paragraph */
.prose .lead {
  font-size: 1.25em;
  color: #666;
}

/* Not prose - reset styles */
.not-prose {
  all: unset;
}

/* Button styles */
.btn-primary {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
  border-radius: 9999px;
  font-weight: 700;
  text-transform: uppercase;
  box-shadow: var(--shadow-soft);
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  background-color: var(--color-primary-dark);
}

.btn-primary:active {
  transform: translate(0, 0);
  box-shadow: none;
}

/* Card hover effects */
.card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

/* Table styles */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem;
  text-align: left;
  border: 2px solid var(--color-border);
}

th {
  background-color: var(--color-primary);
  color: white;
  font-weight: 700;
  text-transform: uppercase;
}

tbody tr:hover {
  background-color: rgba(0, 86, 179, 0.05);
}

/* Form styles */
input,
textarea,
select {
  font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Dialog/Modal styles */
dialog {
  border: none;
  padding: 0;
  margin: 0;
  max-width: 100vw;
  max-height: 100vh;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.95);
}

/* Video player styles */
video {
  display: block;
  max-width: 100%;
}

#lightbox-video {
  outline: none;
}

.announcement-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.announcement-text a:hover {
  text-decoration-thickness: 2px;
}

/* Video thumbnail play button overlay */
.video-thumbnail-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  header,
  footer,
  nav {
    display: none !important;
  }
  
  main {
    padding: 0 !important;
  }
  
  .prose {
    max-width: 100%;
  }
}

/* Modern Club skin: enabled from the Panel site settings */
body.skin-modern {
  --color-primary: #0056b3;
  --color-primary-dark: #003d82;
  --color-primary-light: #eef7ff;
  --color-accent: #6ee7b7;
  --color-accent-strong: #13c296;
  --color-bg: #f6fbff;
  --color-surface: #ffffff;
  --color-text: #102033;
  --color-border: #c9deef;
  --shadow-soft: 0 16px 45px rgba(0, 72, 145, 0.08);
  --shadow-hover: 0 24px 70px rgba(0, 72, 145, 0.14);
  background:
    radial-gradient(circle at 14% 10%, rgba(110, 231, 183, 0.16), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(0, 86, 179, 0.12), transparent 26rem),
    linear-gradient(180deg, #f6fbff 0%, #ffffff 34%, #f7fbff 100%);
}

body.skin-modern::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.58;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.92) 0 18px, rgba(0,86,179,0.18) 19px 20px, transparent 21px),
    radial-gradient(circle, rgba(255,255,255,0.76) 0 12px, rgba(110,231,183,0.26) 13px 14px, transparent 15px),
    radial-gradient(circle, rgba(255,255,255,0.82) 0 10px, rgba(0,86,179,0.14) 11px 12px, transparent 13px);
  background-position: 10% 18%, 82% 34%, 55% 78%;
  background-size: 360px 360px, 520px 520px, 440px 440px;
  animation: modern-ball-drift 36s ease-in-out infinite alternate;
}

@keyframes modern-ball-drift {
  0% {
    transform: translate3d(0, 0, 0);
    background-position: 10% 18%, 82% 34%, 55% 78%;
  }
  100% {
    transform: translate3d(0, -18px, 0);
    background-position: 14% 24%, 78% 28%, 59% 72%;
  }
}

body.skin-modern .site-header {
  padding-block: 0.75rem !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 86, 179, 0.12) !important;
  box-shadow: 0 10px 35px rgba(0, 54, 110, 0.08) !important;
}

body.skin-modern .site-logo {
  height: 2.75rem !important;
}

body.skin-modern .site-title {
  font-size: clamp(1.35rem, 3.6vw, 1.9rem) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-weight: 800 !important;
}

body.skin-modern .main-nav {
  background: transparent !important;
  border-color: rgba(0,86,179,0.12) !important;
  box-shadow: none !important;
  filter: none !important;
}

body.skin-modern .main-nav ul,
body.skin-modern .main-nav li {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

body.skin-modern .main-nav a {
  display: inline-flex;
  align-items: center;
  border-radius: 0.25rem;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  color: #193654 !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  padding: 0.35rem 0.15rem;
  position: relative;
}

body.skin-modern .main-nav a::after {
  display: block !important;
  content: "" !important;
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: -0.35rem;
  width: auto !important;
  height: 0.15rem !important;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent)) !important;
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: center;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

body.skin-modern .main-nav a:hover,
body.skin-modern .main-nav a.text-primary {
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  color: var(--color-primary) !important;
}

body.skin-modern .main-nav a:hover::after,
body.skin-modern .main-nav a.text-primary::after {
  opacity: 1;
  transform: scaleX(1);
}

body.skin-modern .mobile-menu-toggle {
  border: 0 !important;
  border-radius: 0.25rem;
  background: transparent !important;
  box-shadow: none !important;
}

body.skin-modern .mobile-menu-toggle:hover,
body.skin-modern .mobile-menu-toggle[aria-expanded="true"] {
  background: transparent !important;
}

body.skin-modern main {
  position: relative;
  z-index: 0;
}

body.skin-modern section,
body.skin-modern article {
  position: relative;
}

body.skin-modern section.py-16,
body.skin-modern article.py-16 {
  padding-block: clamp(3.5rem, 7vw, 6rem) !important;
}

body.skin-modern h1,
body.skin-modern h2,
body.skin-modern h3,
body.skin-modern h4 {
  letter-spacing: 0 !important;
}

body.skin-modern h2,
body.skin-modern h3,
body.skin-modern h4 {
  text-transform: none !important;
}

body.skin-modern h2.border-b-4,
body.skin-modern .prose h2 {
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.skin-modern h2.border-b-4::after,
body.skin-modern .prose h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 0.25rem;
  margin-top: 0.75rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

body.skin-modern .text-center h2.border-b-4::after,
body.skin-modern h2.text-center.border-b-4::after {
  margin-inline: auto;
}

body.skin-modern .border-2 {
  border-width: 1px !important;
}

body.skin-modern .border-border,
body.skin-modern .border-primary\/20,
body.skin-modern .border-primary {
  border-color: rgba(0, 86, 179, 0.14) !important;
}

body.skin-modern .rounded-xl {
  border-radius: 1.25rem !important;
}

body.skin-modern .rounded-lg {
  border-radius: 1rem !important;
}

body.skin-modern .shadow-soft {
  box-shadow: var(--shadow-soft) !important;
}

body.skin-modern .main-nav.shadow-soft,
body.skin-modern .main-nav.md\:shadow-none {
  box-shadow: none !important;
}

body.skin-modern .hover\:shadow-hover:hover,
body.skin-modern .shadow-hover {
  box-shadow: var(--shadow-hover) !important;
}

body.skin-modern .card:hover,
body.skin-modern .hover\:-translate-y-1\.5:hover,
body.skin-modern .hover\:-translate-y-1:hover {
  transform: translateY(-3px) !important;
}

body.skin-modern .btn-primary,
body.skin-modern a.bg-primary,
body.skin-modern button.bg-primary {
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 12px 28px rgba(0, 86, 179, 0.22) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

body.skin-modern a.bg-primary:hover,
body.skin-modern button.bg-primary:hover,
body.skin-modern .btn-primary:hover {
  background-color: var(--color-primary-dark) !important;
  box-shadow: 0 16px 38px rgba(0, 86, 179, 0.28) !important;
}

body.skin-modern a.bg-white.text-primary {
  border-color: transparent !important;
  background: rgba(255,255,255,0.92) !important;
  box-shadow: 0 12px 28px rgba(0, 38, 77, 0.14) !important;
  text-transform: none !important;
}

body.skin-modern .bg-primary\/5 {
  background: linear-gradient(135deg, rgba(0, 86, 179, 0.08), rgba(110, 231, 183, 0.12)) !important;
}

body.skin-modern .bg-surface,
body.skin-modern .bg-white {
  background-color: rgba(255, 255, 255, 0.94) !important;
}

body.skin-modern [class*="bg-[url"],
body.skin-modern [style*="background-image"] {
  background-blend-mode: normal;
}

body.skin-modern section.py-32 {
  min-height: clamp(520px, 78vh, 720px);
  display: grid;
  align-items: center;
  padding-block: clamp(6rem, 14vw, 10rem) !important;
  border-bottom: 0 !important;
  isolation: isolate;
}

body.skin-modern section.py-32 > .absolute.bg-black\/50 {
  background:
    linear-gradient(90deg, rgba(0, 42, 89, 0.78), rgba(0, 74, 148, 0.46) 52%, rgba(0, 0, 0, 0.28)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 26, 58, 0.45)) !important;
}

body.skin-modern section.py-32::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 7rem;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(246, 251, 255, 0.98));
  pointer-events: none;
}

body.skin-modern section.py-32 .max-w-\[900px\] {
  text-align: left !important;
  margin-left: max(1rem, calc((100vw - 1200px) / 2)) !important;
  margin-right: auto !important;
  max-width: 760px !important;
}

body.skin-modern section.py-32 h1 {
  font-size: clamp(3rem, 8vw, 6.8rem) !important;
  line-height: 0.95 !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 18px 60px rgba(0,0,0,0.35) !important;
}

body.skin-modern section.py-32 p {
  margin-left: 0 !important;
  font-weight: 600 !important;
  max-width: 36rem !important;
}

body.skin-modern section.py-32 .ball {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: inset -10px -12px 22px rgba(0, 86, 179, 0.16), 0 14px 34px rgba(0,0,0,0.1);
}

body.skin-modern .absolute .text-primary svg,
body.skin-modern [class*="paddle-illustration"] {
  opacity: 0 !important;
}

body.skin-modern a.flex.flex-col.bg-surface,
body.skin-modern a.block.bg-surface,
body.skin-modern .bg-surface.border-2,
body.skin-modern .bg-white.border-2 {
  box-shadow: var(--shadow-soft) !important;
  overflow: hidden;
}

body.skin-modern a.flex.flex-col.bg-surface:hover,
body.skin-modern a.block.bg-surface:hover {
  border-color: rgba(0, 86, 179, 0.24) !important;
}

body.skin-modern a.flex.flex-col.bg-surface h3,
body.skin-modern a.block.bg-surface h3 {
  text-transform: none !important;
}

body.skin-modern a.flex.flex-col.bg-surface span.text-primary,
body.skin-modern a.block.bg-surface span.text-primary {
  color: var(--color-primary-dark) !important;
  letter-spacing: 0.04em;
}

body.skin-modern .article-content,
body.skin-modern .prose {
  color: #27415e;
}

body.skin-modern .prose img {
  border: 0 !important;
  border-radius: 1.25rem !important;
  box-shadow: var(--shadow-soft) !important;
}

body.skin-modern .prose a {
  color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(110, 231, 183, 0.65);
  text-underline-offset: 3px;
}

body.skin-modern table {
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
}

body.skin-modern th,
body.skin-modern td {
  border-width: 0 0 1px 0 !important;
  border-color: rgba(0, 86, 179, 0.12) !important;
}

body.skin-modern th {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)) !important;
  color: white !important;
  text-transform: none !important;
}

body.skin-modern tbody tr:hover {
  background: rgba(110, 231, 183, 0.12) !important;
}

body.skin-modern input,
body.skin-modern textarea,
body.skin-modern select {
  border-width: 1px !important;
  border-color: rgba(0, 86, 179, 0.18) !important;
  border-radius: 0.85rem !important;
  background: rgba(255,255,255,0.96);
}

body.skin-modern input:focus,
body.skin-modern textarea:focus,
body.skin-modern select:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.25);
}

body.skin-modern .site-footer {
  margin-top: 0 !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(110, 231, 183, 0.22), transparent 18rem),
    linear-gradient(135deg, #003d82, #0056b3 52%, #074a90) !important;
}

body.skin-modern .site-footer h4 {
  color: #dff8ff !important;
  text-transform: none !important;
}

body.skin-modern .site-footer a.bg-white {
  border: 1px solid rgba(255,255,255,0.18);
}

@media (max-width: 767px) {
  body.skin-modern .main-nav {
    background: #ffffff !important;
    border-radius: 0 0 0.5rem 0.5rem;
    padding: 1rem !important;
    box-shadow: 0 18px 45px rgba(0, 54, 110, 0.12) !important;
  }

  body.skin-modern .main-nav ul {
    gap: 0.65rem !important;
  }

  body.skin-modern .main-nav a {
    width: 100%;
    padding: 0.55rem 0.65rem;
  }

  body.skin-modern .main-nav a::after {
    left: 0.65rem;
    right: auto;
    bottom: 0.25rem;
    width: 2rem !important;
  }

  body.skin-modern .main-nav a.text-primary {
    background: transparent;
  }

  body.skin-modern section.py-32 .max-w-\[900px\] {
    text-align: center !important;
    margin-inline: auto !important;
  }

  body.skin-modern section.py-32 p {
    margin-inline: auto !important;
  }

  body.skin-modern section.py-32 {
    min-height: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.skin-modern::before,
  body.skin-modern .ball {
    animation: none !important;
  }

  body.skin-modern *,
  body.skin-modern *::before,
  body.skin-modern *::after {
    scroll-behavior: auto !important;
  }
}
