/* Kastor native : visuel uniquement en app Capacitor.
   Par defaut tous les ajouts de l’accueil sont masques dans Safari/Chrome. */
.hero-overlay__mobile-title,
.kastor-home-quick,
.kastor-mobile-wordmark { display: none; }

@media screen and (max-width: 767px) {
  /* V16 : dans l'application ET sur la version mobile du site,
     forcer les pictogrammes des raccourcis de l'accueil en rouge Kastor,
     comme dans le footer. */
  main.page-home .kastor-home-quick__tile .kastor-home-quick__icon {
    background: #fcf0f2;
    color: #8f1018 !important;
  }

  main.page-home .kastor-home-quick__tile .kastor-home-quick__icon svg,
  main.page-home .kastor-home-quick__tile .kastor-home-quick__icon svg * {
    fill: currentColor;
    color: currentColor;
  }

  /* V5 : l'application conserve STRICTEMENT le header responsive du site.
     Les règles natives V4 (faux pictogramme Home, logo masqué, bandeau plat)
     ont été supprimées. Seul le hamburger reçoit un cercle rouge discret. */
  html.kastor-native-app header .kastor-header .kastor-brand img {
    display: block !important;
  }

  html.kastor-native-app header .kastor-header .kastor-brand .kastor-mobile-wordmark {
    display: none !important;
  }

  html.kastor-native-app header .kastor-header .kastor-menu-toggle {
    border: 1px solid rgba(143, 16, 24, .38) !important;
    border-radius: 50% !important;
    background: transparent !important;
    color: #8f1018;
  }

  html.kastor-native-app header .kastor-header .kastor-menu-toggle:focus-visible {
    outline: 2px solid #8f1018;
    outline-offset: 2px;
  }

  html.kastor-native-app main.page-home { background: #fff; }

  /* Bandeau du site en format carte photo/vidéo à texte court. */
  
  html.kastor-native-app main.page-home > .hero-overlay {
    min-height: 0 !important;
    height: 218px !important;
    padding: 0 !important;
    margin: 0;
    display: flex;
    align-items: flex-end;
  }
  
  html.kastor-native-app main.page-home .hero-overlay__media,
  html.kastor-native-app main.page-home .hero-overlay__media video { width: 100%; height: 100%; }
  
  html.kastor-native-app main.page-home .hero-overlay__shade {
    background: linear-gradient(180deg, transparent 35%, rgba(9, 14, 18, .82) 100%);
  }
  
  html.kastor-native-app main.page-home .hero-overlay__content {
    box-sizing: border-box;
    width: 100%; max-width: none;
    padding: 0 16px 16px !important;
  }
  
  html.kastor-native-app main.page-home .hero-overlay__text,
  html.kastor-native-app main.page-home .hero-overlay__actions { display: none !important; }
  
  html.kastor-native-app main.page-home .hero-overlay__mobile-title {
    display: block;
    margin: 0 !important;
    padding: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.42;
    text-align: left;
    text-shadow: 0 1px 4px rgba(0,0,0,.25);
  }

  /* Accès rapides natifs : 3 tuiles, puis 2, puis Mon projet / Appareil photo / WhatsApp. */
  
  html.kastor-native-app main.page-home .kastor-home-quick {
    display: block;
    max-width: 640px;
    margin: 0 auto;
    padding: 20px 16px 0;
    box-sizing: border-box;
  }
  
  html.kastor-native-app main.page-home .kastor-home-quick__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
  }
  
  html.kastor-native-app main.page-home .kastor-home-quick__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: span 2;
    gap: 9px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 120px;
    padding: 12px 3px;
    border: 1px solid #e9eef2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 3px rgba(18, 39, 57, .04);
    color: #101626;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
  }
  
  html.kastor-native-app main.page-home .kastor-home-quick__tile:focus-visible {
    outline: 3px solid #8f1018;
    outline-offset: 2px;
  }
  
  html.kastor-native-app main.page-home .kastor-home-quick__tile:active { background: #f7f9fc; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
  }
  
  html.kastor-native-app main.page-home .kastor-home-quick__icon svg { display: block; width: 24px; height: 24px; }
  
  /* Toutes les icônes : rouge officiel Kastor (et non couleurs par rubrique). */
  html.kastor-native-app main.page-home .kastor-home-quick__tile .kastor-home-quick__icon {
    background: #fcf0f2;
    color: #8f1018 !important;
  }

  /* Rangée 2 : Visite virtuelle / Services, deux colonnes égales.
     Rangée 3 : Mon projet / Appareil photo / WhatsApp, dans cet ordre.
     La grille à six colonnes conserve une largeur égale aux trois boutons. */
  html.kastor-native-app main.page-home .kastor-home-quick__tile--vr,
  html.kastor-native-app main.page-home .kastor-home-quick__tile--services {
    grid-column: span 3;
  }
  html.kastor-native-app main.page-home .kastor-home-quick__tile--project,
  html.kastor-native-app main.page-home .kastor-home-quick__tile--camera,
  html.kastor-native-app main.page-home .kastor-home-quick__tile--whatsapp {
    grid-column: span 2;
  }

  /* La liste des positions n’apparaît que lorsque « Aller sur place » est choisi. */
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations {
    display: none;
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    background: #f6f8fa;
    color: #232b35;
    scroll-margin-top: calc(var(--ks-header-height, 80px) + 12px);
  }
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations:target { display: block; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations h3 { margin: 0 0 8px !important; font-size: 17px; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations p { margin: 0 0 12px; font-size: 14px; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations ul { margin: 6px 0; padding-left: 18px; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations li { margin-bottom: 10px; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__locations a { color: #8f1018; font-weight: 700; }

  /* Cartes sur une seule colonne, comme sur le site responsive classique. */
  
  html.kastor-native-app main.page-home .home-modeles { padding: 32px 0 40px !important; }
  
  html.kastor-native-app main.page-home .home-bingerville { padding-inline: 0 !important; }
  
  html.kastor-native-app main.page-home .home-modeles > .container { padding-left: 16px; padding-right: 16px; }
  
  html.kastor-native-app main.page-home .home-modeles__heading { margin-bottom: 18px !important; }
  
  html.kastor-native-app main.page-home .home-modeles__eyebrow {
    margin: 0 0 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: .11em;
    color: #68768c;
  }
  
  html.kastor-native-app main.page-home .home-modeles__heading h1 {
    margin: 0 0 12px !important;
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 800;
    line-height: 1.3;
    color: #081229;
  }
  
  html.kastor-native-app main.page-home .home-modeles__heading .section-intro {
    margin: 0 auto !important;
    color: #48586b;
    font-size: 14px;
    line-height: 1.55;
  }
  
  html.kastor-native-app main.page-home .home-modeles__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 20px !important;
  }
  
  html.kastor-native-app main.page-home .home-modele-card:last-child {
    max-width: none;
    width: auto;
    grid-column: auto;
    margin: 0;
  }
  
  html.kastor-native-app main.page-home .home-modele-card__media { height: auto; aspect-ratio: 4 / 3; }
  
  html.kastor-native-app main.page-home .home-modele-card__body { padding: 14px; }
  
  html.kastor-native-app main.page-home .home-modele-card h3 { font-size: 19px; }
  
  html.kastor-native-app main.page-home .home-modele-card__features { margin-top: 12px; }
}
@media screen and (max-width: 350px) {
  
  html.kastor-native-app main.page-home .kastor-home-quick__grid { gap: 8px; }
  
  html.kastor-native-app main.page-home .kastor-home-quick__tile { font-size: 11px; min-height: 114px; }
  
  html.kastor-native-app main.page-home .home-modeles__grid { grid-template-columns: 1fr !important; }
}
