/* JaiRDV en app installée : bouton « Installer », fiche d'aide iPhone, « Mes établissements ». Chargé partout (site, pages des établissements, espace pro). */
html:not(.can-install) [data-install] { display: none !important; }

.install-card { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; padding: 14px 16px; margin: 0 0 18px;
  box-shadow: inset 0 0 0 1px #dbe4f5, 0 8px 24px rgba(20, 40, 80, .06); text-align: left; }
.install-card > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.install-card strong { font-size: 15px; color: #1d2a3d; }
.install-card span { font-size: 13.5px; color: #66708a; line-height: 1.4; }
.install-card button, .install-card > a { flex: none; min-height: 44px; }
.install-ic { flex: none; width: 48px; height: 48px; border-radius: 13px; background: #edf1fa; display: grid; place-items: center; }
.done .install-card { margin: 22px 0 0; }

.install-sheet { position: fixed; inset: 0; z-index: 1000; background: rgba(12, 22, 40, .45); display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.install-sheet-in { position: relative; width: 100%; max-width: 420px; background: #fff; color: #1d2a3d; border-radius: 22px; padding: 26px 22px 20px; text-align: center;
  font-family: inherit; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); animation: sheet-up .22s ease-out; }
.install-sheet-in img { border-radius: 14px; box-shadow: 0 4px 14px rgba(20, 40, 80, .15); }
.install-sheet h2 { font-size: 20px; margin: 12px 0 10px; }
.install-sheet ol { text-align: left; margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 15px; line-height: 1.45; }
.install-sheet ol svg { vertical-align: -4px; color: #1865e0; }
.install-note { font-size: 13px; color: #66708a; margin: 14px 0 0; }
.install-x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: 0; background: none; font-size: 28px; line-height: 1; color: #66708a; cursor: pointer; border-radius: 50%; }
.install-x:hover, .install-x:focus-visible { background: #edf1fa; }
@keyframes sheet-up { from { transform: translateY(30px); opacity: 0; } }
@media (min-width: 700px) { .install-sheet { align-items: center; } }
@media (prefers-reduced-motion: reduce) { .install-sheet-in { animation: none; } }

/* Espace pro */
.app-install-btn { font: inherit; font-weight: 600; font-size: 14px; color: #1865e0; background: #edf1fa; border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; min-height: 40px; }
.app-install-btn:hover { background: #dfe8fb; }
.linkbtn { font: inherit; color: #1865e0; background: none; border: 0; padding: 10px 6px; cursor: pointer; text-decoration: underline; min-height: 44px; }

.push-bar { display: flex; align-items: center; justify-content: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 16px; background: #eaf2ff; color: #16325c;
  font-size: 14px; font-weight: 600; text-align: center; }
.push-bar[hidden], [data-push-on][hidden], [data-push-off][hidden], [data-push-test][hidden] { display: none !important; }
.push-bar-act { display: inline-flex; gap: 8px; }
.push-bar button { font: inherit; font-size: 14px; border: 0; border-radius: 999px; padding: 8px 16px; min-height: 40px; cursor: pointer; }
.push-yes { background: #1865e0; color: #fff; }
.push-later { background: transparent; color: #4a5b78; text-decoration: underline; }

/* Mes rendez-vous / Mes établissements */
.account-more { max-width: 460px; margin: 26px auto 0; }
.account-more .center { text-align: center; margin-top: 18px; }
.myplaces-wrap { margin: 8px 0 22px; }
.myplaces { display: grid; gap: 10px; margin-bottom: 8px; }
.myplace { position: relative; display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 18px; padding: 12px 16px; text-decoration: none; color: #1d2a3d;
  box-shadow: 0 1px 2px rgba(20, 40, 80, .05); min-height: 64px; }
.myplace:hover { box-shadow: inset 0 0 0 1px #1865e0; }
.mp-dot { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--c, #1865e0); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.mp-tx { flex: 1; display: grid; min-width: 0; }
.mp-tx strong { font-size: 15.5px; }
.mp-tx small { font-size: 13px; color: #66708a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-go { flex: none; font-weight: 700; font-size: 14px; color: #1865e0; }
.mp-x { flex: none; width: 36px; height: 36px; margin-right: -8px; border: 0; background: none; color: #8a93ab; font-size: 22px; cursor: pointer; border-radius: 50%; }
.mp-x:hover { background: #edf1fa; color: #1d2a3d; }
/* Le champ du code ne doit jamais élargir le cadre (gros chiffres espacés sur un téléphone étroit). */
.login-form input { width: 100%; min-width: 0; box-sizing: border-box; }
.login-form label { min-width: 0; }
.code-input { font-size: 26px !important; letter-spacing: 6px; text-align: center; font-weight: 700; padding-left: 6px !important; padding-right: 0 !important; }
@media (max-width: 520px) { .login-box { padding: 26px 18px; } }

/* « Mes rendez-vous » dans l'app d'un établissement (salon_layout.php) */
.salon-top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid #e2e7f0; border-top: 4px solid var(--brand, #1865e0); padding-top: env(safe-area-inset-top); }
.salon-top-in { max-width: 820px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 10px; min-height: 52px;
  color: #1d2a3d; text-decoration: none; font-size: 17px; }
.salon-top-in .ico { color: var(--brand, #1865e0); }
.salon-top-logo { display: grid; place-items: center; height: 38px; max-width: 110px; }
.salon-top-logo img { max-height: 38px; max-width: 110px; object-fit: contain; }
.salon-foot { text-align: center; color: #66708a; font-size: 13px; padding: 8px 16px 32px; }
.salon-foot a { color: inherit; }

/* Fenêtre d'installation : textes, bouton, code QR */
.install-lead { color: #46526b; margin: 0 0 16px; line-height: 1.5; }
.install-go { font: inherit; font-weight: 800; font-size: 17px; border: 0; border-radius: 999px; padding: 14px 30px; min-height: 52px; color: #fff; cursor: pointer;
  background: var(--brand, #1865e0); width: 100%; }
.install-qr { width: 200px; margin: 0 auto; padding: 10px; background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 1px #e2e7f0; }
.install-qr svg { display: block; width: 100%; height: auto; }
/* Page d'un établissement dans SON app : bouton « Mes rendez-vous » à la place du retour vers JaiRDV */
.salon-mine { display: none !important; }
.in-salon-app .salon-mine { display: inline-flex !important; }
.in-salon-app .home-btn:not(.salon-mine) { display: none !important; }
.salon-mine svg { fill: none; }

/* Logo de l'établissement : médaillon blanc qui chevauche la photo de couverture (page du salon) */
.identity.has-logo { padding-top: 22px; }
.brand-logo { display: inline-grid; place-items: center; height: 96px; min-width: 96px; max-width: min(240px, 70%); box-sizing: border-box; padding: 12px 14px;
  margin: -70px 0 14px; background: #fff; border-radius: 22px; box-shadow: 0 10px 28px rgba(20, 40, 80, .16), 0 0 0 1px rgba(20, 40, 80, .05); }
.brand-logo img { display: block; max-height: 72px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
@media (max-width: 600px) { .brand-logo { height: 80px; min-width: 80px; padding: 10px 12px; margin-top: -62px; border-radius: 18px; } .brand-logo img { max-height: 60px; } }
/* Cartes d'établissement (accueil, recherche) : petit médaillon du logo sur la photo */
.place-img { position: relative; }
.place-logo { position: absolute; left: 12px; bottom: 12px; display: grid; place-items: center; height: 52px; min-width: 52px; max-width: 60%; box-sizing: border-box; padding: 6px 8px;
  background: #fff; border-radius: 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.place-logo img { display: block; max-height: 40px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.result .place-img .place-logo { height: 60px; }
/* « Mes établissements » : logo dans la pastille */
.mp-dot.has-logo { background: #fff; box-shadow: inset 0 0 0 1px #e2e7f0; padding: 5px; box-sizing: border-box; }
.mp-dot.has-logo img { width: 100%; height: 100%; object-fit: contain; }
/* Espace pro sur téléphone : les formulaires ne doivent pas dépasser de l'écran (champs côte à côte → une colonne) */
.grid-side > *, .form > *, .row > * { min-width: 0; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea { min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } .card .btn { white-space: normal; height: auto; text-align: center; } }
/* Réglages › Mon app : aperçu de l'icône telle que sur le téléphone */
.myapp-preview { display: grid; justify-items: center; gap: 6px; padding: 18px; border-radius: 18px; background: linear-gradient(160deg, #3a4a6b, #1b2438); color: #fff; font-size: 13px; font-weight: 600; }
.myapp-preview img { border-radius: 20px; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); background: #fff; }
.myapp-warn { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fff4e5; color: #8a4b00; font-size: 14px; font-weight: 600; }
/* Réglages › Vitrine */
.logo-field { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-field > div:last-child { flex: 1 1 260px; display: grid; gap: 8px; }
.logo-preview { flex: none; width: 104px; height: 104px; border-radius: 22px; background: #fff; display: grid; place-items: center; padding: 10px; box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(20, 40, 80, .1), 0 0 0 1px rgba(20, 40, 80, .06); }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-preview.empty { box-shadow: none; border: 2px dashed #c9d3e6; color: #8a93ab; font-size: 13px; text-align: center; line-height: 1.3; }

/* « Télécharger l'app » (toujours visible sur le site, masqué dans l'app installée) */
.btn-app { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 700; font-size: 15px; border-radius: 999px; padding: 10px 16px; min-height: 44px;
  text-decoration: none; white-space: nowrap; color: #fff; background: linear-gradient(120deg, #1865e0 0%, #199ef2 70%, #16b6f5 100%); box-shadow: 0 6px 16px rgba(24, 101, 224, .25); }
.btn-app:hover { filter: brightness(1.06); color: #fff; }
@media (max-width: 860px) { .btn-app { padding: 9px 12px; font-size: 14px; } }
@media (max-width: 520px) { .btn-app { padding: 9px 11px; gap: 5px; } }

.app-pill { position: absolute; z-index: 3; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; background: #1865e0; color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); min-height: 36px; }
.app-pill:hover { background: #1556c2; color: #fff; }
.app-pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.app-band { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: linear-gradient(120deg, #1865e0 0%, #199ef2 70%, #16b6f5 100%); color: #fff; border-radius: 28px; padding: 40px clamp(22px, 5vw, 56px); }
.app-band-tx { flex: 1 1 380px; }
.app-band h2 { margin: 6px 0 10px; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -.02em; line-height: 1.15; }
.app-band p { margin: 0; color: #e6f1ff; max-width: 560px; }
.app-band .kicker { color: #d7e9ff; }
.app-band-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn-white { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #1865e0; font-weight: 800; font-size: 16px; border-radius: 999px; padding: 14px 26px; min-height: 50px; text-decoration: none; box-shadow: 0 10px 24px rgba(0, 0, 0, .15); }
.btn-white:hover { color: #0f4fb8; transform: translateY(-1px); }
.app-band-ic { flex: none; display: grid; justify-items: center; gap: 8px; font-weight: 700; font-size: 14px; margin: 0 auto; }
.app-band-ic img { border-radius: 26px; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); transform: rotate(-6deg); }

/* Page /app */
.app-hero { background: radial-gradient(1200px 500px at 85% -10%, #dbe9ff 0, transparent 60%), var(--bg, #f4f6fb); }
.app-hero-in { max-width: 1200px; margin: 0 auto; padding: 56px max(16px, env(safe-area-inset-left)) 64px; display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.app-hero-tx { flex: 1 1 440px; }
.app-hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -.03em; margin: 10px 0 16px; }
.app-hero h1 span { background: linear-gradient(120deg, #1865e0, #16b6f5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.app-cta { margin-top: 26px; display: grid; gap: 10px; justify-items: start; }
.btn-grad.app-big { font-size: 18px; padding: 16px 30px; min-height: 56px; }
.app-note { margin: 0; font-size: 14px; color: #66708a; }
.app-installed { display: none; margin-top: 22px; font-weight: 700; }
.is-app .app-installed { display: block; }
.is-app .app-cta { display: none; }
.app-visual { flex: 1 1 300px; position: relative; display: grid; place-items: center; min-height: 440px; }
.app-phone { width: 270px; background: #f4f6fb; border-radius: 38px; padding: 18px 14px 24px; border: 10px solid #0c1a2e; box-shadow: 0 30px 60px rgba(12, 30, 60, .25); display: grid; gap: 10px; transform: rotate(3deg); }
.ap-top { display: flex; align-items: center; gap: 8px; font-size: 16px; padding: 4px 4px 6px; }
.ap-card { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 16px; padding: 10px; box-shadow: 0 1px 2px rgba(20, 40, 80, .06); }
.ap-date { width: 44px; height: 48px; border-radius: 12px; background: #edf1fa; color: #1865e0; display: grid; place-items: center; align-content: center; font-size: 10px; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.ap-date b { font-size: 18px; }
.ap-tx { display: grid; min-width: 0; } .ap-tx strong { font-size: 13.5px; } .ap-tx small { font-size: 12px; color: #66708a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-sec { font-size: 12px; font-weight: 800; color: #66708a; text-transform: uppercase; letter-spacing: .06em; margin: 6px 4px 0; }
.ap-place { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 9px 10px; font-size: 13px; font-weight: 700; }
.ap-place i { width: 26px; height: 26px; border-radius: 50%; background: var(--c); flex: none; }
.ap-place span { flex: 1; } .ap-place em { font-style: normal; color: #1865e0; font-size: 12px; }
.app-icon-float { position: absolute; left: calc(50% - 260px); bottom: 4%; display: grid; justify-items: center; gap: 6px; font-weight: 700; font-size: 13px; background: #fff; padding: 14px 16px 10px; border-radius: 22px; box-shadow: 0 16px 40px rgba(12, 30, 60, .16); transform: rotate(-6deg); }
.app-icon-float img { border-radius: 18px; }
.app-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.app-steps article { background: #fff; border-radius: 18px; padding: 26px; box-shadow: 0 1px 2px rgba(20, 40, 80, .05); }
.app-steps h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 19px; }
.app-steps ol { margin: 0; padding-left: 22px; display: grid; gap: 10px; line-height: 1.5; }
.app-steps .ico.xs { margin: 0 2px; color: #1865e0; }
.app-qr p { margin: 0 0 12px; color: #66708a; }
.app-qr .qr { width: 160px; }
.app-qr .qr svg { display: block; width: 100%; height: auto; }
.center { text-align: center; }
@media (max-width: 860px) { .app-hero-in { padding-top: 32px; } .app-visual { min-height: 400px; } }
@media (max-width: 600px) { .app-icon-float { display: none; } }
@media (max-width: 520px) { .app-cta, .app-cta .btn-grad { width: 100%; } .app-cta { justify-items: stretch; } .app-band-cta a { flex: 1 1 100%; justify-content: center; } }

/* Dans l'app installée : pas de bouton « Installer » ni « Télécharger l'app », marges des encoches */
.is-app [data-install], .is-app .app-dl { display: none !important; }
@media (max-width: 560px) { .install-card { flex-wrap: wrap; } .install-card > div { flex: 1 1 200px; } .install-card button, .install-card > a { width: 100%; justify-content: center; } .mp-go { display: none; } }
