/* ========================================
   WELCOME PAGE
======================================== */

/* === Welcome Page Layout - Style Moderne DuaTimeCalculator === */
#welcomepage {
  font-family: var(--main-font);
  background: var(--gradient-light);
  min-height: 100vh;
  padding-top: 105px; /* Espace pour la vraie top nav fixe */
  color: var(--primary-color);
  display: flex;
  flex-direction: column;
}

/* === MASQUER SIDEBAR SUR WELCOMEPAGE - FIX pour éviter l'apparition temporaire === */
/* Masquer la sidebar par défaut au chargement pour éviter l'affichage temporaire */
.sidebar {
  display: none;
}

/* Afficher la sidebar uniquement quand elle est nécessaire (pages authentifiées) */
body.authenticated .sidebar {
  display: block;
  transition: none !important; /* ✅ Pas de délai d'affichage */
}

/* ✅ Assurer que la sidebar est visible sur desktop quand NON collapsed */
@media (min-width: 1025px) {
  body.authenticated:not(.sidebar-collapsed) .sidebar {
    transform: translateX(0);
    width: var(--sidebar-width);
  }

  body.authenticated.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
    width: 0;
  }
}

/* Masquer explicitement la sidebar sur welcomepage */
body.on-welcomepage .sidebar {
  display: none !important;
}

/* Masquer immédiatement la sidebar lors du logout pour éviter le délai */
body.logging-out .sidebar {
  display: none !important;
  transition: none !important;
}

.welcomepage-container {
  flex: 1 0 auto; /* flex-grow: 1, flex-shrink: 0, flex-basis: auto */
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

/* === Welcome Header - Vraie Top Navigation === */
.welcomepage-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
  height: 105px;
  background: var(--gradient-primary-var);
  color: white;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.25);
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0 3rem;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  font-family: var(--main-font);
}

/* Afficher le header sur welcomepage et pages légales (publiques) */
body.on-welcomepage .welcomepage-header {
  display: flex;
}

/* Masquer le header sur les pages authentifiées */
body.authenticated .welcomepage-header {
  display: none;
}

.welcomepage-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.welcomepage-brand {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  position: relative;
  z-index: 2;
}

.welcomepage-brand .brand-icon {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.welcomepage-brand .brand-icon svg {
  width: 36px;
  height: 36px;
  color: white;
}

.welcomepage-brand .brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.welcomepage-brand .brand-text h1 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 800;
  color: white !important;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.welcomepage-brand .brand-text .beta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  color: white;
  font-size: 0.9rem;
  padding: 3px 9px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  animation: pulse 2s ease-in-out infinite;
  width: fit-content;
}

.welcomepage-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0;
  position: relative;
  z-index: 2;
  color: white !important;
  letter-spacing: -0.02em;
}

/* === Language Selector dans Header === */
.welcomepage-header .language-selector {
  display: flex;
  gap: 15px;
  position: relative;
  z-index: 2;
}

.welcomepage-header .language-selector .lang-btn {
  font-size: 1.8em;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 9px 15px;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, background 0.3s ease;
  border-radius: 0.75rem;
  color: white;
  position: relative;
  z-index: 2;
}

.welcomepage-header .language-selector .lang-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.2);
}

.welcomepage-header .language-selector .lang-btn:focus {
  outline: none;
}

.welcomepage-header .language-selector .lang-btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* === Hero Section === */
.welcomepage-hero {
  text-align: center;
  margin-bottom: 10rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.welcomepage-hero h2 {
  color: var(--primary-color);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.welcomepage-hero p {
  color: var(--secondary-color);
  font-size: 2rem;
  margin-bottom: var(--spacing-lg);
  line-height: var(--title-line-height);
}

.welcomepage-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  cursor: pointer;
  width: auto;
  margin: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.welcomepage-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.welcomepage-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 13px rgba(39, 76, 119, 0.3);
}

.welcomepage-btn:hover::before {
  left: 100%;
}

.welcomepage-btn:active {
  transform: translateY(0);
}

.welcomepage-btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  margin: 0.5rem 0;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(39, 76, 119, 0.25);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
}

.welcomepage-btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transition: left 0.5s;
}

.welcomepage-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(39, 76, 119, 0.35);
}

.welcomepage-btn-primary:hover::before {
  left: 100%;
}

.welcomepage-btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 76, 119, 0.3);
}

/* === Auth Forms - Modern Style (inspired by duaTime) === */
.welcomepage-auth-forms {
  margin-bottom: var(--spacing-xxl);
  max-width: 480px;
  margin: 0 auto var(--spacing-xxl) auto;
  font-family: var(--main-font);
}

.welcomepage-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 76, 119, 0.12);
  border: 1px solid rgba(39, 76, 119, 0.06);
  transition: all 0.3s ease;
  position: relative;
  padding: 0;
}

.welcomepage-card:hover {
  box-shadow: 0 12px 48px rgba(39, 76, 119, 0.18);
  transform: translateY(-4px);
}

/* === Tabs System - Modern Pills === */
.welcomepage-tabs {
  display: flex;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 1.25rem 1.5rem;
  gap: 0.75rem;
  border-bottom: none;
  margin-bottom: 0;
}

.welcomepage-tab-btn {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}

.welcomepage-tab-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.welcomepage-tab-btn.active {
  background: white;
  color: var(--primary-color);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-bottom: none;
}

.welcomepage-tab-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.08);
}

.welcomepage-tab-content {
  display: none;
  padding: 2rem;
}

.welcomepage-tab-content.active {
  display: block;
}

.welcomepage-tab-content h3 {
  display: none; /* Hide redundant h3 since tabs show the current view */
}


/* === Form Layout - Modern Grid === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.welcomepage-form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.welcomepage-form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.welcomepage-form-group input,
.welcomepage-form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  margin: 0;
  border: 2px solid rgba(39, 76, 119, 0.12);
  border-radius: 12px;
  font-size: 0.95rem;
  background: #fafbfc;
  transition: all 0.2s ease;
  box-sizing: border-box;
  color: var(--primary-color);
  font-weight: 500;
  font-family: inherit;
}

.welcomepage-form-group input::placeholder {
  color: rgba(39, 76, 119, 0.4);
}

.welcomepage-form-group input:hover,
.welcomepage-form-group select:hover {
  border-color: rgba(39, 76, 119, 0.25);
}

.welcomepage-form-group input:focus,
.welcomepage-form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 4px rgba(39, 76, 119, 0.08);
}

.welcomepage-form-group input:focus-visible,
.welcomepage-form-group select:focus-visible {
  outline: 2px solid var(--primary-color, #274c77);
  outline-offset: 2px;
}

/* === Email Validation === */
#welcomepage-email:valid,
#welcomepage-confirmEmail:valid {
  border-color: var(--success-color);
}

#welcomepage-email:user-invalid,
#welcomepage-confirmEmail:user-invalid {
  border-color: var(--error-color);
}

/* === Country List Dropdown (OAuth modal) === */
#oauth-country-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  background-color: var(--card-background);
  display: none;
  z-index: 1000;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-md);
}

.country-item {
  padding: var(--spacing-sm);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.country-item:hover {
  background-color: var(--background-color);
}

/* === OAuth Country Field Optionnel === */
#oauth-country {
  color: var(--gray-color);
}

#oauth-country::placeholder {
  color: var(--gray-color);
  font-style: italic;
}

.welcomepage-form-group:has(#oauth-country) label {
  color: var(--gray-color);
  font-style: italic;
}

.terms-link {
  color: #000;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: bolder;
  transition: color var(--transition-fast), text-decoration var(--transition-fast);
}

.terms-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* === Signup Button State === */
#welcomepage-signupForm button[type="submit"] {
  opacity: 0.5;
  cursor: not-allowed;
  transition: opacity var(--transition-normal), cursor var(--transition-normal);
}

#welcomepage-signupForm button[type="submit"].enabled {
  opacity: 1;
  cursor: pointer;
}

/* === Turnstile Button States === */
.btn-turnstile-pending {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-turnstile-ready {
  opacity: 1;
  cursor: pointer;
}

.btn-turnstile-error {
  opacity: 0.6;
  cursor: not-allowed;
  color: var(--error-color);
}

/* === Captcha Styles - Modern Design === */
.captcha-group {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.turnstile-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.75rem 0;
  padding: 1rem;
  border: 2px solid rgba(39, 76, 119, 0.08);
  border-radius: 12px;
  background: #fafbfc;
  width: 100%;
  max-width: 320px;
  transition: all 0.2s ease;
}

.turnstile-container:hover {
  border-color: rgba(39, 76, 119, 0.15);
}

.turnstile-container > div {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.turnstile-container iframe {
  margin: 0 auto !important;
}

#turnstile-signup-status,
#turnstile-signin-status {
  display: block;
  margin: 0.25rem 0;
  color: rgba(39, 76, 119, 0.5);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.captcha-info {
  text-align: center;
  margin-top: var(--spacing-sm);
  font-size: var(--small-text-size);
  color: var(--gray-color);
  width: 100%;
}

.captcha-info a {
  color: var(--secondary-color);
  text-decoration: none;
}

.captcha-info a:hover {
  text-decoration: underline;
}

/* === Signin Form Specific Styles === */
#welcomepage-signinTab .form-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

#welcomepage-signinTab p {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 0;
}

#welcomepage-signinTab p a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

#welcomepage-signinTab p a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* === Terms Group Modern Style === */
.terms-group {
  grid-column: 1 / -1;
  margin: 0.75rem 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.03) 0%, rgba(74, 144, 226, 0.03) 100%);
  border-radius: 12px;
  border: 1px solid rgba(39, 76, 119, 0.08);
}

.terms-checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.terms-checkbox-container input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  border: 2px solid rgba(39, 76, 119, 0.25);
  border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: white;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.terms-checkbox-container input[type="checkbox"]:hover {
  border-color: var(--primary-color);
}

.terms-checkbox-container input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-color: var(--primary-color);
}

.terms-checkbox-container input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 14px;
  font-weight: bold;
  left: 5px;
  top: 1px;
}

.terms-checkbox-container label {
  font-size: 0.9rem;
  color: var(--primary-color);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
}

.terms-link {
  color: var(--secondary-color) !important;
  text-decoration: none;
  font-weight: 700 !important;
  font-size: inherit !important;
  transition: all 0.2s ease;
}

.terms-link:hover {
  color: var(--primary-color) !important;
  text-decoration: underline;
}

/* === Content Sections - Centrées === */
.welcomepage-features,
.welcomepage-vision,
.welcomepage-why-choose,
.welcomepage-commitment {
  margin-bottom: 6rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.welcomepage-vision,
.welcomepage-commitment {
  max-width: 960px;
}

.welcomepage-features h2,
.welcomepage-why-choose h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-xl);
  text-align: center;
  font-weight: 700;
}

.welcomepage-vision h2,
.welcomepage-commitment h2 {
  color: var(--primary-color);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  text-align: center;
}

/* === Content Paragraphs === */
.welcomepage-hero p,
.welcomepage-features p,
.welcomepage-vision p,
.welcomepage-why-choose p,
.welcomepage-commitment p {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.welcomepage-vision p,
.welcomepage-commitment p,
.welcomepage-commitment li {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.welcomepage-vision p,
.welcomepage-commitment p {
  text-align: center;
}


/* === Features Subtitle === */
.welcomepage-features .welcomepage-features-subtitle {
  text-align: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* === Feature Card Icon === */
.feature-card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 0.75rem;
  object-fit: contain;
}

/* === Feature Grids === */
.welcomepage-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.welcomepage-why-choose-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* === Modern Feature Cards === */
.welcomepage-feature-card,
.welcomepage-why-choose-card {
  background: #fff;
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.welcomepage-feature-card {
  border: none;
  padding: 1.75rem 1.5rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.welcomepage-why-choose-card {
  border: none;
  text-align: center;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

.welcomepage-why-choose-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.welcomepage-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.welcomepage-why-choose-card::before {
  display: none;
}

.welcomepage-feature-card::before {
  display: none;
}

.welcomepage-feature-card h3,
.welcomepage-why-choose-card h3 {
  color: var(--primary-color);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}

.welcomepage-feature-card p,
.welcomepage-why-choose-card p {
  color: var(--primary-color);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 2;
}

/* === Features Also Available Card === */
.welcomepage-feature-card.welcomepage-feature-card-also {
  grid-column: 1 / -1;
  text-align: center;
  background: rgba(39, 76, 119, 0.04);
  border: 1px dashed rgba(39, 76, 119, 0.25);
  padding: 1rem 2rem;
  box-shadow: none;
}

.welcomepage-feature-card.welcomepage-feature-card-also::before {
  display: none;
}

.welcomepage-feature-card.welcomepage-feature-card-also:hover {
  transform: none;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.08);
}

.welcomepage-feature-card-also p {
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 500;
  opacity: 0.9;
  margin: 0;
}

/* === Commitment List Styling === */
.welcomepage-commitment ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.welcomepage-commitment li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.welcomepage-commitment li:before {
  content: "✓";
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.8rem;
  position: absolute;
  left: 0;
  top: -0.1em;
  line-height: 1;
}

/* === Footer - Positionné naturellement en fin de page === */
.welcomepage-footer {
  width: 100%;
  text-align: center;
  padding: 2rem 0;
  background: var(--gradient-primary);
  color: white;
  border-radius: 0;
  box-shadow: 0 -2px 5px rgba(39, 76, 119, 0.3);
  margin-top: auto;
  flex-shrink: 0;
}

.welcomepage-footer p {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 500;
}

/* Footer Legal Links */
.footer-legal-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.footer-legal-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal-link:hover {
  color: white;
  text-decoration: underline;
}

.footer-separator {
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================= */
/* LEGAL PAGES - Privacy Policy & Legal Mentions */
/* ============================================= */

.legal-page {
  min-height: 100vh;
  background: var(--bg-color, #f8f9fa);
  /* Compenser le header fixed (70px) + marge */
  padding-top: 90px;
}

.legal-page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.legal-page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color, #274c77);
}

.legal-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  color: #6b7280;
  font-size: 0.8rem;
  font-weight: 400;
  cursor: pointer;
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
  margin-bottom: 1rem;
}

.legal-back-btn:hover {
  color: var(--primary-color, #274c77);
  background-color: rgba(0, 0, 0, 0.04);
}

.legal-page-title {
  color: var(--primary-color, #274c77);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.legal-last-updated {
  color: var(--text-muted, #6c757d);
  font-size: 0.9rem;
  margin: 0;
}

.legal-page-content {
  color: var(--text-color, #333);
  line-height: 1.7;
}

.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section h2 {
  color: var(--primary-color, #274c77);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(39, 76, 119, 0.2);
}

.legal-section h3 {
  color: var(--primary-color, #274c77);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
}

.legal-section p {
  margin: 0 0 1rem 0;
}

.legal-section ul {
  margin: 0.5rem 0 1rem 0;
  padding-left: 1.5rem;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-info-box {
  background: rgba(39, 76, 119, 0.05);
  border: 1px solid rgba(39, 76, 119, 0.15);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin: 1rem 0;
}

.legal-info-box p {
  margin: 0.25rem 0;
}

.legal-info-box a {
  color: var(--primary-color, #274c77);
  text-decoration: underline;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.legal-table th,
.legal-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

.legal-table th {
  background: var(--primary-color, #274c77);
  color: white;
  font-weight: 600;
}

.legal-table tr:nth-child(even) {
  background: rgba(39, 76, 119, 0.03);
}

.legal-table tr:hover {
  background: rgba(39, 76, 119, 0.08);
}

/* Responsive Legal Pages */
@media (max-width: 768px) {
  .legal-page-container {
    padding: 1rem;
  }

  .legal-page-title {
    font-size: 1.5rem;
  }

  .legal-section h2 {
    font-size: 1.2rem;
  }

  .legal-table {
    font-size: 0.85rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.5rem;
  }
}

@media (max-width: 480px) {
  .legal-page-container {
    padding: 0.75rem;
  }

  .legal-page-title {
    font-size: 1.3rem;
  }

  .legal-info-box {
    padding: 1rem;
  }

  .legal-table {
    font-size: 0.8rem;
  }

  /* Stack table on mobile for better readability */
  .legal-table thead {
    display: none;
  }

  .legal-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid rgba(39, 76, 119, 0.2);
    border-radius: 0.5rem;
    overflow: hidden;
  }

  .legal-table td {
    display: block;
    text-align: left;
    border: none;
    border-bottom: 1px solid rgba(39, 76, 119, 0.1);
  }

  .legal-table td:before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--primary-color, #274c77);
  }

  .legal-table td:last-child {
    border-bottom: none;
  }
}

/* ========================================
   WELCOME PAGE - MOSQUETIME INTEGRATION - MODERN DESIGN
======================================== */

/* Styles pour MosqueTime sur la page d'accueil avec design moderne */
.welcomepage-mosque-time {
  padding: 0;
  background: transparent; /* Remove white background */
  border: none; /* Remove border */
  border-radius: 0; /* Remove border-radius */
  box-shadow: none; /* Remove shadow */
  position: relative;
  overflow: visible; /* Allow tab to overflow */
  width: 100%;
  max-width: none;
  margin: 0 auto 2rem auto;
}

/* Remove margin-top that creates white space */
.welcomepage-mosque-time .mosquetime-flip-container {
  margin-top: 0;
}

/* Position the tab button to touch the header */
.welcomepage-mosque-time .add-mosque-btn {
  top: 0;
  transform: translateY(-100%);
  /* Darker background (10% darker) */
  background: linear-gradient(135deg, #d17c7c 0%, #c16060 100%);
  box-shadow: 0 -4px 15px rgba(193, 96, 96, 0.35);
}

/* Text elements transition for smooth hover effect */
.welcomepage-mosque-time .add-mosque-btn .add-mosque-icon {
  transition: transform 0.2s ease;
  display: inline-block !important;
  transform-origin: center;
}

.welcomepage-mosque-time .add-mosque-btn .add-mosque-text {
  transition: transform 0.2s ease;
  display: inline-block !important;
  transform-origin: center;
}

/* Neutralize the base hover transform on button */
.welcomepage-mosque-time .add-mosque-btn:hover {
  transform: translateY(-100%);
  box-shadow: 0 -4px 15px rgba(193, 96, 96, 0.35);
}

/* Hover effect: scale text by 7.5% without changing button size */
.welcomepage-mosque-time .add-mosque-btn:hover .add-mosque-icon,
.welcomepage-mosque-time .add-mosque-btn:hover .add-mosque-text {
  transform: scale(1.075);
}

/* Waiting List Button - Position to touch the header (left side) */
.welcomepage-mosque-time .waiting-list-btn {
  top: 0;
  transform: translateY(-100%);
  /* Uses site primary colors - slightly darker for contrast */
  background: linear-gradient(135deg, #1e3a5f 0%, #274c77 100%);
  box-shadow: 0 -4px 15px rgba(39, 76, 119, 0.35);
}

.welcomepage-mosque-time .waiting-list-btn .waiting-list-icon,
.welcomepage-mosque-time .waiting-list-btn .waiting-list-text {
  transition: transform 0.2s ease;
  display: inline-block !important;
  transform-origin: center;
}

.welcomepage-mosque-time .waiting-list-btn:hover {
  transform: translateY(-100%);
  box-shadow: 0 -4px 15px rgba(59, 130, 246, 0.5);
}

.welcomepage-mosque-time .waiting-list-btn:hover .waiting-list-icon,
.welcomepage-mosque-time .waiting-list-btn:hover .waiting-list-text {
  transform: scale(1.075);
}

/* === MosqueTime Header simplifié === */
.welcomepage-mosque-time .mosquetime-header {
  text-align: center;
  padding: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.3);
  position: relative;
  overflow: hidden;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #ffffff !important;
  position: relative;
  z-index: 2;
}

/* Émoji retiré pour un design plus épuré */

.welcomepage-mosque-time .mosquetime-subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

/* === MosqueTime Content Container moderne === */
.welcomepage-mosque-time .mosquetime-content {
  padding: 1.5rem;
  background: white;
  border-radius: 0 0 1rem 1rem; /* Rounded corners at bottom */
}

/* === Add Mosque Form Card styling === */
.welcomepage-mosque-time .add-mosque-form-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(39, 76, 119, 0.08);
}

.welcomepage-mosque-time .add-mosque-form-card .mosquetime-header {
  border-radius: 1rem 1rem 0 0;
}

.welcomepage-mosque-time .add-mosque-form {
  background: white;
  border-radius: 0 0 1rem 1rem;
}

/* === Location Search moderne === */
/* Styles spécifiques pour les éléments welcome-mosquetime */
#welcome-mosquetime-city,
#welcome-mosquetime-search {
  height: 48px; /* Hauteur uniforme */
  box-sizing: border-box;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Container spécifique pour les contrôles de recherche */
.welcomepage-mosque-time .mosquetime-location-search {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Select city - 2/3 de la largeur */
#welcome-mosquetime-city {
  flex: 2;
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(39, 76, 119, 0.2);
  background: rgba(255, 255, 255, 0.8);
  margin-bottom: 0px;
}

#welcome-mosquetime-city:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 2px rgba(39, 76, 119, 0.1);
}

#welcome-mosquetime-city:focus-visible {
  outline: 2px solid var(--primary-color, #274c77);
  outline-offset: 2px;
}

/* Search button - 1/3 de la largeur */
#welcome-mosquetime-search {
  flex: 1;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

#welcome-mosquetime-search::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

#welcome-mosquetime-search:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 13px rgba(39, 76, 119, 0.3);
}

#welcome-mosquetime-search:hover::before {
  left: 100%;
}

#welcome-mosquetime-search:active {
  transform: translateY(0);
}

.welcomepage-mosque-time .mosquetime-select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid rgba(39, 76, 119, 0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.8);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: white;
  box-shadow: 0 0 0 2px rgba(39, 76, 119, 0.1);
}

.welcomepage-mosque-time .mosquetime-select:focus-visible {
  outline: 2px solid var(--primary-color, #274c77);
  outline-offset: 2px;
}

.welcomepage-mosque-time .mosquetime-button {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.welcomepage-mosque-time .mosquetime-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.welcomepage-mosque-time .mosquetime-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 13px rgba(39, 76, 119, 0.3);
}

.welcomepage-mosque-time .mosquetime-button:hover::before {
  left: 100%;
}

.welcomepage-mosque-time .mosquetime-button:active {
  transform: translateY(0);
}

/* === Date Display moderne === */
.welcomepage-mosque-time .mosquetime-date-display {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

/* === Refresh Prayer Times Button === */
.refresh-prayer-times-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.2);
  position: relative;
  overflow: hidden;
}

.refresh-prayer-times-btn i {
  width: 18px;
  height: 18px;
  transition: transform 0.6s ease;
}

.refresh-prayer-times-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(39, 76, 119, 0.3);
}

.refresh-prayer-times-btn:hover i {
  transform: rotate(180deg);
}

.refresh-prayer-times-btn:active {
  transform: translateY(0);
}

/* Loading state */
.refresh-prayer-times-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.refresh-prayer-times-btn.loading i {
  animation: rotate-refresh 1s linear infinite;
}

@keyframes rotate-refresh {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Success state (brief flash) */
.refresh-prayer-times-btn.success {
  background: var(--success-color);
}

/* Responsive: Icon-only on mobile */
@media (max-width: 768px) {
  .refresh-prayer-times-btn {
    padding: 0.65rem;
    min-width: 44px;
    justify-content: center;
  }

  .refresh-prayer-times-btn .refresh-btn-text {
    display: none;
  }

  .refresh-prayer-times-btn i {
    margin: 0;
  }
}

/* Responsive: Full button on larger screens */
@media (min-width: 769px) {
  .refresh-prayer-times-btn .refresh-btn-text {
    display: inline;
  }
}

/* === Tabs modernes === */
.welcomepage-mosque-time .mosquetime-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  padding: 0.5rem;
  border: 1px solid rgba(39, 76, 119, 0.2);
}

.welcomepage-mosque-time .mosquetime-tab {
  flex: 1;
  text-align: center;
  padding: 0.8rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  font-weight: 600;
  color: var(--primary-color);
}

.welcomepage-mosque-time .mosquetime-tab.active {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.2);
}

/* === Sort Buttons modernes === */
.mosquetime-sort-buttons,
.welcomepage-mosque-time .mosquetime-sort-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
}

.mosquetime-sort-buttons .mosquetime-button,
.welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button {
  background: white;
  color: var(--primary-color);
  border: 1px solid rgba(39, 76, 119, 0.2);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-family: var(--main-font);
}

.mosquetime-sort-buttons .mosquetime-button:hover,
.welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button:hover {
  background: rgba(39, 76, 119, 0.05);
  border-color: var(--primary-color);
}

.mosquetime-sort-buttons .mosquetime-button.active,
.welcomepage-mosque-time .mosquetime-sort-buttons .mosquetime-button.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Accuracy warning badge (same style as sort buttons but orange) */
.mosquetime-accuracy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--main-font);
  cursor: help;
  margin-left: auto;
}

.mosquetime-accuracy-badge i {
  color: #d97706;
  font-size: 12px;
}

.welcome-mosquetime-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.welcome-mosquetime-header {
  margin-bottom: 2rem;
}

.welcome-mosquetime-title {
  font-size: 1.5rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.welcome-mosquetime-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.welcome-mosquetime-location-search {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.welcome-mosquetime-btn {
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.welcome-mosquetime-btn:hover {
  background: var(--secondary-color);
}

.welcome-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  background: var(--primary-color);
  color: var(--card-background);
  cursor: pointer;
}

.welcome-btn:hover {
  background: var(--secondary-color);
}

.welcome-mosquetime-select {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
}

.welcome-mosquetime-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.welcome-mosquetime-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.welcome-mosquetime-tab.active {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.welcome-mosquetime-content {
  background: var(--card-background);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.welcome-mosquetime-card {
  background: var(--card-background);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
}

/* Grille des mosquées */
.welcome-mosquetime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* Styles pour les cartes de mosquées */
.welcome-mosquetime-mosque-card {
  background: var(--card-background);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.welcome-mosquetime-prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.welcome-mosquetime-prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: var(--background-color);
  border-radius: 4px;
}

.prayer-time {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-color);
}

.prayer-times-grid {
  padding: 10px 0;
}

.welcomepage-mosque-time .prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.2rem;
  margin-top: 3px;
  text-align: center;
  border-radius: 6px;
  min-width: 0;
  flex: 1;
}

/* Disposition verticale forcée pour la page de bienvenue */
.welcomepage-mosque-time .prayer-item .prayer-label,
.welcomepage-mosque-time .prayer-item .jamaa-time {
  display: block;
  width: 100%;
}

.welcomepage-mosque-time .mosquetime-mosque-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(39, 76, 119, 0.2);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 8px rgba(39, 76, 119, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.welcomepage-mosque-time .mosquetime-mosque-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 10px rgba(39, 76, 119, 0.15);
}

.welcomepage-mosque-time .mosquetime-mosque-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #274c77, #6096ba, #8bb8d6);
  border-radius: 1rem 1rem 0 0;
  opacity: 0.8;
}

/* === Container Scrollable pour les mosquées === */
.welcomepage-mosque-time .scrollable-content {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 5px;
}

.welcomepage-mosque-time .mosquetime-mosque-card {
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--card-background);
  border-radius: 8px;
  padding: 20px;
  margin-top: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.welcomepage-mosque-time .mosquetime-tab-content {
  max-height: 600px;
  overflow-y: auto;
}

#welcome-mosquetime-grid {
  max-height: 500px;
  overflow-y: auto;
}

.welcomepage-mosque-time .mosque-list-container {
  max-height: 500px;
  overflow-y: auto;
}

.welcomepage-mosque-time .mosque-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.welcomepage-mosque-time .mosque-info {
  flex: 1;
}

.welcomepage-mosque-time .mosque-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.welcomepage-mosque-time .mosque-address {
  font-size: 0.875rem;
  color: var(--gray-color);
  margin: 0;
}

#welcome-mosquetime-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 1rem;
}

.welcomepage-mosque-time .mosquetime-card {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 !important; /* Remove padding to eliminate white border between container and header */
  box-sizing: border-box;
  /* Remove duplicate container styling - parent already has these */
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.welcomepage-mosque-time .mosquetime-content {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.mosquetime-card .mosquetime-content {
  padding: 20px;
}

.mosque-prayer-times {
  border-top: 1px solid var(--secondary-color);
  margin-top: 1rem;
}

/* === Disclaimer centré === */
.welcomepage-mosque-time .mosquetime-disclaimer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-color);
  margin-top: var(--spacing-md);
  padding: var(--spacing-sm);
}

.welcomepage-mosque-time .prayer-times-grid,
.welcomepage-mosque-time .additional-times-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.2rem;
  padding: 8px 4px;
  margin: 0;
  background: var(--card-background);
  border-radius: 8px;
  width: 100%;
}

/* === Styles Prayer Label et Jamaa Time === */
.prayer-label {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
  font-weight: 500;
  order: 1;
  display: block;
}

.jamaa-time {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: bold;
  order: 2;
  margin-top: 2px;
  display: block;
}

/* Style spécial pour les horaires de Jumu'ah (prière du vendredi) */
/* DÉSACTIVÉ - Retour à la couleur par défaut
.jamaa-time.jumuah {
  color: var(--jumuah-color) !important;
  font-weight: bold !important;
}

.prayer-label.jumuah {
  color: var(--jumuah-color) !important;
  font-weight: 600 !important;
}
*/

.additional-times-grid,
.welcomepage-mosque-time .additional-times-grid {
  position: relative;
  opacity: 0.6;
  background-color: #f5f5f5;
  border-radius: 6px;
}

/* Quand il y a du contenu, retirer l'opacité et le background grisé */
.additional-times-grid.has-content,
.welcomepage-mosque-time .additional-times-grid.has-content {
  opacity: 1 !important;
  background-color: transparent !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  padding: 10px 0;
}

/* Ligne horizontale qui traverse la section (seulement si pas de contenu) */
.additional-times-grid:not(.has-content)::before,
.welcomepage-mosque-time .additional-times-grid:not(.has-content)::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #9e9e9e;
  z-index: 1;
}

/* Texte "Coming soon" superposé au centre (seulement si pas de contenu ET pas de Jumu'ah disponible) */
.additional-times-grid:not(.has-content):not(.jumuah-available)::after,
.welcomepage-mosque-time .additional-times-grid:not(.has-content):not(.jumuah-available)::after {
  content: "Coming soon";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #f5f5f5;
  padding: 0 10px;
  font-size: 0.8rem;
  color: #666;
  z-index: 2;
}

/* Version française de "Coming soon" */
html[lang="fr"] .additional-times-grid:not(.has-content):not(.jumuah-available)::after,
html[lang="fr"] .welcomepage-mosque-time .additional-times-grid:not(.has-content):not(.jumuah-available)::after {
  content: "Bientôt disponible";
}

/* Message "Jumu'ah disponible vendredi matin" (jours non-vendredi) */
.additional-times-grid.jumuah-available::after,
.welcomepage-mosque-time .additional-times-grid.jumuah-available::after {
  content: "Jumu'ah times available Friday morning";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #e8f5e9;
  padding: 8px 12px;
  font-size: 0.96rem; /* ✅ +20% (was 0.8rem) */
  color: #2e7d32;
  font-weight: 500;
  z-index: 2;
  border-radius: 4px;
  text-align: center;
  max-width: 90%;
}

/* Version française du message Jumu'ah */
html[lang="fr"] .additional-times-grid.jumuah-available::after,
html[lang="fr"] .welcomepage-mosque-time .additional-times-grid.jumuah-available::after {
  content: "Horaires Jumu'ah disponibles le vendredi matin";
}

/* === Responsive Jumu'ah Message pour Mobile === */

/* Tablet (768px) - Réduction légère */
@media (max-width: 768px) {
  .additional-times-grid.jumuah-available::after,
  .welcomepage-mosque-time .additional-times-grid.jumuah-available::after {
    font-size: 0.84rem; /* ✅ +20% (was 0.7rem) */
    padding: 6px 10px;
    max-width: 85%;
    line-height: 1.3;
  }
}

/* Mobile landscape (640px) - Empêcher le wrapping */
@media (max-width: 640px) {
  .additional-times-grid.jumuah-available::after,
  .welcomepage-mosque-time .additional-times-grid.jumuah-available::after {
    font-size: 0.78rem; /* ✅ +20% (was 0.65rem) */
    padding: 5px 8px;
    max-width: 80%;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Mobile portrait (480px) - Optimisation maximale */
@media (max-width: 480px) {
  .additional-times-grid.jumuah-available::after,
  .welcomepage-mosque-time .additional-times-grid.jumuah-available::after {
    font-size: 0.72rem; /* ✅ +20% (was 0.6rem) */
    padding: 4px 6px;
    max-width: 75%;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Version française plus courte pour très petits écrans */
  html[lang="fr"] .additional-times-grid.jumuah-available::after,
  html[lang="fr"] .welcomepage-mosque-time .additional-times-grid.jumuah-available::after {
    content: "Jumu'ah - vendredi matin";
  }
}

/* Ajustement pour les éléments à l'intérieur de la grille désactivée (seulement si pas de contenu) */
.additional-times-grid:not(.has-content) .prayer-item,
.welcomepage-mosque-time .additional-times-grid:not(.has-content) .prayer-item {
  position: relative;
  z-index: 0;
}

/* Quand il y a du contenu, afficher normalement (même style que les prières principales) */
.additional-times-grid.has-content .prayer-item,
.welcomepage-mosque-time .additional-times-grid.has-content .prayer-item {
  opacity: 1 !important;
  z-index: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.2rem;
  margin-top: 3px;
  text-align: center;
  border-radius: 6px;
  min-width: 0;
  flex: 1;
}

.additional-times-grid.has-content .prayer-label,
.welcomepage-mosque-time .additional-times-grid.has-content .prayer-label {
  opacity: 1 !important;
  font-size: 14px;
  color: var(--text-color) !important;
  margin-bottom: 4px;
  font-weight: 500 !important;
  order: 1;
  display: block;
}

.additional-times-grid.has-content .jamaa-time,
.welcomepage-mosque-time .additional-times-grid.has-content .jamaa-time {
  opacity: 1 !important;
  font-size: 16px;
  color: var(--primary-color) !important;
  font-weight: bold !important;
  order: 2;
  margin-top: 2px;
  display: block;
}

/* Override spécifique pour Jumu'ah dans additional-times-grid (plus spécifique) */
/* DÉSACTIVÉ - Retour à la couleur par défaut
.additional-times-grid.has-content .jamaa-time.jumuah,
.welcomepage-mosque-time .additional-times-grid.has-content .jamaa-time.jumuah {
  color: var(--jumuah-color) !important;
}

.additional-times-grid.has-content .prayer-label.jumuah,
.welcomepage-mosque-time .additional-times-grid.has-content .prayer-label.jumuah {
  color: var(--jumuah-color) !important;
}
*/

/* ========================================
   ENGLISH KHUTBA BADGE
======================================== */

/* Badge "English Khutba" affiché sous le label Jumu'ah */
.english-khutba-badge {
  display: block;
  margin: 0.2rem auto 0 auto;
  padding: 0.15rem 0.5rem;
  font-size: 0.55rem;
  font-weight: 600;
  color: #9a3412;
  background-color: #fed7aa;
  border-radius: 10px;
  white-space: nowrap;
  width: fit-content;
}

/* Responsive: badge plus petit sur mobile */
@media (max-width: 480px) {
  .english-khutba-badge {
    font-size: 0.5rem;
    padding: 0.1rem 0.35rem;
  }
}

/* ========================================
   WELCOME PAGE - RESPONSIVE
======================================== */

/* === Breakpoint XL (1200px) === */
@media (max-width: 1200px) {
  .welcomepage-auth-forms {
    max-width: 85vw;
  }

  #welcomepage-features {
    margin-left: auto;
  }

  .welcomepage-features p,
  .welcomepage-vision p,
  .welcomepage-why-choose p,
  .welcomepage-commitment p {
    text-align: left;
  }

  /* === MosqueTime Welcome Responsive XL === */
  .mosquetime-card,
  .welcomepage-mosque-time .mosquetime-card {
    width: 100%;
    margin: 0 0 var(--spacing-md) 0;
    padding: 0;
  }

  .prayer-times-grid,
  .additional-times-grid,
  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.75rem;
    padding: 8px 0;
  }
}

/* === Breakpoint LG (1024px) === */
@media (max-width: 1024px) {
  .form-grid {
    flex-direction: column;
  }

  .welcomepage-hero h2 {
    font-size: 2rem;
  }

  .welcomepage-features h2,
  .welcomepage-vision h2,
  .welcomepage-why-choose h2,
  .welcomepage-commitment h2 {
    font-size: 1.75rem;
    text-align: center;
  }

  .welcomepage-features p,
  .welcomepage-vision p,
  .welcomepage-why-choose p,
  .welcomepage-commitment p {
    text-align: center;
  }

  .welcomepage-features,
  .welcomepage-vision,
  .welcomepage-why-choose,
  .welcomepage-commitment {
    margin-bottom: 6rem;
  }

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

  .feature-card-icon {
    width: 40px;
    height: 40px;
  }
}

/* === Breakpoint MD (768px) - Auth Forms Responsive === */
@media (max-width: 768px) {
  .welcomepage-auth-forms {
    max-width: 92vw;
    padding: 0 0.5rem;
  }

  .welcomepage-card {
    border-radius: 16px;
  }

  .welcomepage-tabs {
    padding: 1rem;
    gap: 0.5rem;
    flex-direction: row;
  }

  .welcomepage-tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-radius: 10px;
  }

  .welcomepage-tab-content {
    padding: 1.5rem;
  }

  /* Sign Up form: Stack all fields vertically on tablets */
  #welcomepage-signupTab .form-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }

  .welcomepage-form-group label {
    font-size: 0.75rem;
  }

  .welcomepage-form-group input,
  .welcomepage-form-group select {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .welcomepage-btn-primary {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .terms-group {
    padding: 0.875rem 1rem;
    border-radius: 10px;
  }

  .terms-checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .terms-checkbox-container label {
    font-size: 0.85rem;
  }

  .turnstile-container {
    padding: 0.75rem;
    border-radius: 10px;
    max-width: 100%;
  }

  /* OAuth buttons responsive */
  .oauth-buttons {
    grid-template-columns: 1fr;
    gap: 0.625rem;
  }

  .oauth-btn {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  .oauth-divider {
    margin: 1rem 0;
  }

  .oauth-divider span {
    font-size: 0.7rem;
    padding: 0.375rem 0.75rem;
  }
}

/* === Breakpoint XS (480px) === */
@media (max-width: 480px) {
  #welcomepage {
    padding-top: 60px; /* Header plus petit sur mobile */
    padding-bottom: 60px; /* Footer plus petit sur mobile */
  }

  .welcomepage-container {
    padding: 1rem;
  }

  .welcomepage-header {
    height: 60px;
    padding: 0 1rem;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
  }

  .welcomepage-brand .brand-icon {
    width: 36px;
    height: 36px;
  }

  .welcomepage-brand .brand-icon svg {
    width: 20px;
    height: 20px;
  }

  .welcomepage-brand .brand-text h1 {
    font-size: 1.2rem;
  }

  .welcomepage-brand .brand-text .beta-badge {
    font-size: 0.55rem;
    padding: 1px 4px;
  }

  .welcomepage-header h1 {
    font-size: 1.2rem;
    color: white !important;
    margin: 0;
    font-weight: 800;
    display: flex;
    align-items: center;
    height: 100%;
  }

  .welcomepage-header .language-selector {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
  }

  .welcomepage-header .language-selector .lang-btn {
    font-size: 1.8rem;
    padding: 4px;
  }

  .welcomepage-hero h2 {
    font-size: 1.5rem;
  }

  .welcomepage-hero p {
    font-size: 1.25rem;
  }

  .welcomepage-btn {
    font-size: 1.25rem;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-sm);
  }

  /* === Auth Forms Mobile (480px) === */
  .welcomepage-auth-forms {
    max-width: 100%;
    padding: 0 0.25rem;
  }

  .welcomepage-card {
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(39, 76, 119, 0.1);
  }

  .welcomepage-card:hover {
    transform: none;
    box-shadow: 0 4px 16px rgba(39, 76, 119, 0.1);
  }

  .welcomepage-tabs {
    padding: 0.875rem;
    gap: 0.375rem;
    border-radius: 14px 14px 0 0;
  }

  .welcomepage-tab-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  .welcomepage-tab-content {
    padding: 1.25rem;
  }

  /* Sign Up form: Single column on mobile */
  #welcomepage-signupTab .form-grid,
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .welcomepage-form-group label {
    font-size: 0.7rem;
    margin-bottom: 0.375rem;
  }

  .welcomepage-form-group input,
  .welcomepage-form-group select {
    padding: 0.625rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 8px;
    border-width: 1.5px;
  }

  .welcomepage-btn-primary {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
    margin-top: 0.25rem;
  }

  .terms-group {
    padding: 0.75rem;
    border-radius: 8px;
    margin: 0.5rem 0;
  }

  .terms-checkbox-container {
    gap: 0.5rem;
  }

  .terms-checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
  }

  .terms-checkbox-container label {
    font-size: 0.8rem;
  }

  .turnstile-container {
    padding: 0.5rem;
    border-radius: 8px;
    margin: 0.5rem 0;
  }

  /* OAuth mobile */
  .oauth-buttons {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .oauth-btn {
    padding: 0.625rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 8px;
    min-height: 42px;
  }

  .oauth-icon {
    width: 18px;
    height: 18px;
  }

  .oauth-divider {
    margin: 0.875rem 0;
  }

  .oauth-divider span {
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    border-radius: 16px;
  }

  /* Forgot password link */
  #welcomepage-signinTab p {
    margin-top: 0.75rem;
  }

  #welcomepage-signinTab p a {
    font-size: 0.8rem;
  }

  .welcomepage-features-grid,
  .welcomepage-why-choose-grid {
    grid-template-columns: 1fr;
  }

  .welcomepage-feature-card,
  .welcomepage-why-choose-card {
    margin: 0;
    padding: var(--spacing-md);
  }

  .feature-card-icon {
    width: 36px;
    height: 36px;
  }

  .welcomepage-features .welcomepage-features-subtitle {
    font-size: 0.95rem;
  }

  .welcomepage-feature-card.welcomepage-feature-card-also {
    padding: 1rem;
  }

  .welcomepage-feature-card-also p {
    font-size: 0.95rem;
  }

  .welcomepage-features h2,
  .welcomepage-vision h2,
  .welcomepage-why-choose h2,
  .welcomepage-commitment h2 {
    font-size: 1.5rem;
  }

  .welcomepage-features p,
  .welcomepage-vision p,
  .welcomepage-why-choose p,
  .welcomepage-commitment p {
    font-size: 1.125rem;
  }

  .welcomepage-feature-card h3,
  .welcomepage-why-choose-card h3 {
    font-size: 1.125rem;
  }

  .welcomepage-feature-card p,
  .welcomepage-why-choose-card p {
    font-size: 1rem;
  }

  .welcomepage-features,
  .welcomepage-vision,
  .welcomepage-why-choose,
  .welcomepage-commitment {
    margin-bottom: var(--spacing-xxl);
  }

  /* Réduction de l'espace entre hero et mosquetime */
  .welcomepage-hero {
    margin: 1.5rem 0 3rem 0;
  }

  .welcomepage-footer {
    padding: var(--spacing-md);
  }

  .welcomepage-footer p {
    font-size: 1rem;
  }


  /* === MosqueTime Welcome Responsive XS === */
  .welcomepage-mosque-time .mosquetime-location-search,
  .welcome-mosquetime-location-search {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  /* Responsive pour les contrôles de recherche mosquetime */
  .welcomepage-mosque-time .mosquetime-location-search {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  #welcome-mosquetime-city,
  #welcome-mosquetime-search {
    flex: none;
    width: 100%;
  }

  .mosquetime-sort-buttons,
  .welcomepage-mosque-time .mosquetime-sort-buttons {
    flex-direction: row; /* Boutons alignés horizontalement */
    justify-content: flex-start; /* Alignement à gauche */
    gap: var(--spacing-xs);
    flex-wrap: wrap; /* Permet le retour à la ligne si nécessaire */
  }

  .mosquetime-sort-buttons .mosquetime-button {
    flex: none; /* Les boutons gardent leur taille naturelle */
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--small-text-size);
    white-space: nowrap; /* Empêche le texte de se couper */
  }

  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 0.3rem;
    padding: 5px 0;
  }

  /* === MosqueTime Mobile Ultra-Compact === */
  .welcomepage-mosque-time {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0;
  }

  .welcomepage-mosque-time .mosquetime-mosque-card {
    width: 100%;
    padding: 3px;
    margin: 0;
  }

  .welcomepage-mosque-time .prayer-times-grid,
  .welcomepage-mosque-time .additional-times-grid {
    gap: 8px;
    padding: 5px 0;
  }

  .welcomepage-mosque-time .prayer-item {
    padding: 0.1rem;
  }

  .prayer-label {
    font-size: 0.7rem;
    display: block !important;
    order: 1 !important;
  }

  .jamaa-time {
    font-size: 0.8rem;
    display: block !important;
    order: 2 !important;
  }

  .welcomepage-mosque-time .mosquetime-title {
    font-size: 1.25rem;
    text-align: center;
  }

  .welcomepage-mosque-time .mosquetime-subtitle {
    font-size: 0.75rem;
  }

  .mosque-prayer-times {
    margin-top: 0.25rem;
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0;
  }

  .welcomepage-mosque-time .mosque-name {
    font-size: 1rem;
    padding: var(--spacing-xs) var(--spacing-xs) 0 var(--spacing-xs);
    margin: 0 0 0 var(--spacing-xs);
  }

  .welcomepage-mosque-time .mosque-address {
    font-size: 0.8rem;
    margin: 0 0 var(--spacing-xs) var(--spacing-xs);
  }

  #welcome-mosquetime-city-date {
    font-size: 1.25rem;
  }

  #welcome-mosquetime-grid {
    width: 100%;
    padding: 0;
  }

  #welcome-mosquetime-grid .mosquetime-mosque-card {
    width: 100%;
    padding: var(--spacing-sm);
    margin: var(--spacing-xs);
  }

  .welcomepage-mosque-time .mosquetime-content {
    padding: 0;
  }

  .mosque-prayer-times {
    padding-top: var(--spacing-xs);
  }
}


/* ========================================
   AGE INPUT - HIDE SPINNERS
======================================== */

/* Hide number input spinners for age field */
#welcomepage-age::-webkit-outer-spin-button,
#welcomepage-age::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#welcomepage-age {
  -moz-appearance: textfield; /* Firefox */
  appearance: textfield;
}

