/* body, html {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
  }
  
  #landing-page {
    text-align: center;
  }
  
  .loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  #start-app-btn {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  #start-app-btn:hover {
    background-color: #45a049;
  } */

:root {
  --splash-accent: #0B8E36;
}

  /* Style général de la page */
html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8faf9 0%, #eef5f0 100%);
}

/* Vitrine : plein écran dès le premier paint (évite le loader centré réduit). */
html.vitrine-route,
html.vitrine-route body {
  width: 100%;
  height: 100%;
  margin: 0;
}

html.vitrine-route body {
  display: block;
  min-height: 100dvh;
  background: #f8f9fa;
}

/* Overlay fixe : le retrait du splash ne décale plus la page Flutter (CLS). */
html.vitrine-route #landing-page {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f8f9fa;
}

html.vitrine-route #landing-page {
  width: 100%;
  min-height: 100dvh;
  padding: 0;
  border-radius: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  box-sizing: border-box;
}

html.vitrine-route #landing-brand {
  display: none !important;
}

html.vitrine-route #catalog-skeleton {
  display: flex !important;
  flex: 1;
  flex-direction: column;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 16px 24px;
  box-sizing: border-box;
  min-height: 100dvh;
}

/* Conteneur principal du préchargement */
#landing-page {
  text-align: center;
  padding: 20px;
  /* background-color: #fff; */
  border-radius: 10px;
  /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Titre principal */
h1 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #0B8E36;
}

/* Paragraphe de texte */
p {
  font-size: 1.2em;
  margin-bottom: 20px;
  color: #888;
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 12px;
  margin-bottom: 16px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--splash-accent) 12%, transparent);
  color: var(--splash-accent);
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.brand-mark:empty {
  display: none;
}

.loading-label {
  margin: 12px 0 0;
  font-size: 14px;
  color: #64748b;
}

.landing-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.catalog-skeleton {
  width: 100%;
  text-align: left;
}

.catalog-skeleton[hidden] {
  display: none !important;
}

html.vitrine-route .catalog-skeleton[hidden] {
  display: flex !important;
}

.landing-brand[hidden] {
  display: none !important;
}

.sk-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sk-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--splash-accent) 18%, #e8edf0);
  animation: sk-pulse 1.1s ease-in-out infinite alternate;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  color: var(--splash-accent);
  flex-shrink: 0;
  overflow: hidden;
}

.sk-search {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  background: #e8edf0;
  animation: sk-pulse 1.1s ease-in-out infinite alternate;
}

.sk-hero {
  height: clamp(120px, 22vw, 180px);
  border-radius: 16px;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--splash-accent) 10%, #e8edf0);
  animation: sk-pulse 1.1s ease-in-out infinite alternate;
}

.sk-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sk-chip {
  display: inline-block;
  width: 72px;
  height: 32px;
  border-radius: 20px;
  background: #e8edf0;
  animation: sk-pulse 1.1s ease-in-out infinite alternate;
}

.sk-chip-wide {
  width: 96px;
  margin-left: auto;
}

.sk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex: 1;
  align-content: start;
  min-height: 55vh;
}

@media (min-width: 800px) {
  .sk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .sk-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.sk-card {
  aspect-ratio: 0.62;
  border-radius: 14px;
  background: #e8edf0;
  animation: sk-pulse 1.1s ease-in-out infinite alternate;
}

@keyframes sk-pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* Animation de la loader */
.loader {
  border: 3px solid color-mix(in srgb, var(--splash-accent) 15%, transparent);
  border-top: 3px solid var(--splash-accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 0.75s linear infinite;
}

/* Animation de rotation du loader */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

