/* Ultimate Petanque — static site (matches app theme) */
:root {
  --primary: #2563EB;
  --primary-light: #60A5FA;
  --primary-dark: #1D4ED8;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --success: #10B981;
  --tir: #3B82F6;
  --carreau: #F59E0B;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 24px rgba(37, 99, 235, 0.12);
  --max-width: 960px;
  --legal-max: 720px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

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

/* —— Site header —— */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { text-decoration: none; color: var(--text); }

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(245, 158, 11, 0.1));
  border: 1px solid var(--border);
}

.brand-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.2; }
.brand-tagline { font-size: 11px; color: var(--text-secondary); font-weight: 500; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
  text-decoration: none;
}
.site-nav a.active {
  background: var(--primary);
  color: #fff;
}

.lang-switch {
  display: flex;
  gap: 6px;
}
.lang-switch button {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-switch button.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* —— Home page —— */
.hero-home {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 20px 32px;
  text-align: center;
}

.hero-home-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero-home h1 {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.15;
}

.hero-home .lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn-primary:hover { color: #fff; background: var(--primary-dark); }
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid rgba(37, 99, 235, 0.25);
}
.btn-secondary:hover { color: var(--primary-dark); background: rgba(37, 99, 235, 0.06); }

.features {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(37, 99, 235, 0.2);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.legal-links-section {
  max-width: var(--max-width);
  margin: 0 auto 48px;
  padding: 0 20px;
}

.legal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.legal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.legal-card h3 { font-size: 17px; font-weight: 700; }
.legal-card p { font-size: 14px; color: var(--text-secondary); flex: 1; }

.contact-strip {
  max-width: var(--max-width);
  margin: 0 auto 48px;
  padding: 28px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-xl);
  color: #fff;
  text-align: center;
  margin-left: 20px;
  margin-right: 20px;
  max-width: calc(var(--max-width) - 0px);
}
@media (min-width: 1000px) {
  .contact-strip { margin-left: auto; margin-right: auto; width: calc(100% - 40px); max-width: var(--max-width); }
}

.contact-strip h2 { font-size: 20px; margin-bottom: 8px; }
.contact-strip p { opacity: 0.9; font-size: 15px; margin-bottom: 16px; }
.contact-strip a {
  color: #fff;
  font-weight: 700;
  background: rgba(255,255,255,0.15);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  display: inline-block;
}
.contact-strip a:hover { background: rgba(255,255,255,0.25); color: #fff; text-decoration: none; }

/* —— Legal pages —— */
.legal-container {
  max-width: var(--legal-max);
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.legal-hero {
  text-align: center;
  margin-bottom: 28px;
}
.legal-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 32px;
  background: rgba(37, 99, 235, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 12px;
}
.legal-hero h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.legal-hero .subtitle { font-size: 14px; color: var(--text-secondary); }
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-top: 12px;
}

.acceptance {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text);
}

.section {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.section-title { font-size: 16px; font-weight: 700; flex: 1; }
.section-content { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

.contact-box {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid var(--border);
  text-align: center;
  margin-top: 20px;
  box-shadow: var(--shadow);
}
.contact-box p { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.contact-box a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.08);
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.contact-box a:hover { background: rgba(37, 99, 235, 0.15); text-decoration: none; }

.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.page-footer a { color: var(--text-secondary); font-weight: 600; margin: 0 8px; }

/* —— Bilingual (default FR on <body class="lang-fr"> before JS) —— */
body.lang-fr [lang="en"] { display: none !important; }
body.lang-en [lang="fr"] { display: none !important; }
body.lang-en [lang="en"] { display: revert; }
body.lang-en .site-nav a [lang="en"] { display: inline !important; }
body.lang-en .btn[lang="en"] { display: inline-flex !important; }
body.lang-fr .btn[lang="fr"] { display: inline-flex !important; }

@media (max-width: 640px) {
  .site-header-inner { flex-direction: column; align-items: stretch; }
  .site-nav { justify-content: center; }
  .lang-switch { justify-content: center; }
}
