/* SimpleMap : pages publiques (en-tête, pied de page, connexion, pages légales) et compléments communs. */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
/* Connexion, inscription, mot de passe */
.sm-auth h1 { color: var(--bs-primary); font-weight: 700; }
.sm-auth .card .btn[type="submit"] { padding-top: .6rem; padding-bottom: .6rem; font-weight: 600; }
.sm-legal h1 { color: var(--bs-primary); }
.sm-auth { max-width: 460px; margin: 0 auto; }
.sm-legal { max-width: 820px; }
.sm-legal h2 { margin-top: 1.5rem; }
.sm-steps li { margin-bottom: .5rem; }
.sm-code { font-family: var(--bs-font-monospace); letter-spacing: .12em; text-transform: uppercase; }
.sm-trackcard { border-left: 4px solid var(--bs-primary); padding: .25rem .75rem; }
.sm-disabled label { opacity: .55; }
details > summary { cursor: pointer; font-weight: 600; }
@media (max-width: 575.98px) {
    main.container { padding-left: 16px; padding-right: 16px; }
}

/* En-tête fin : logo, deux liens, un menu (langue et thème), un bouton discret. Mobile d'abord : les liens passent
   sur une seconde ligne. */
/* z-index au-dessus du menu de l'application (1020 à 1040, styles.css), sinon le menu déroulant passe dessous. */
.sm-topbar { position: relative; z-index: 1050; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-body-bg);
    padding: max(.25rem, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) .25rem max(16px, env(safe-area-inset-left)); }
.sm-bar { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "brand tools" "links links"; align-items: center; column-gap: .75rem; }
.sm-brand { grid-area: brand; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; text-decoration: none; color: var(--bs-emphasis-color); }
.sm-logo { width: 2rem; height: 2rem; flex: 0 0 auto; }
.sm-logo-dial { fill: var(--sm-logo-dial); }
.sm-logo-other, .sm-logo-route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sm-logo-other { stroke: #8f89d8; stroke-width: 5; }
.sm-logo-route { stroke: #fff; stroke-width: 7.5; }
.sm-logo-node { fill: #8cc4ee; stroke: #fff; stroke-width: 3; }
.sm-wordmark { font-family: var(--sm-serif); font-size: 1.35rem; font-weight: 400; letter-spacing: -.01em; }
.sm-wordmark b { font-weight: 700; }
.sm-links { grid-area: links; display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.sm-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bs-body-color); font-weight: 600; text-decoration: none; border-bottom: 2px solid transparent; }
.sm-links a:hover { border-bottom-color: var(--bs-border-color); }
.sm-links a[aria-current="page"] { border-bottom-color: var(--sm-sun); }
.sm-tools { grid-area: tools; justify-self: end; display: flex; align-items: center; gap: .25rem; }
.sm-prefs > button { min-height: 44px; min-width: 44px; color: var(--bs-body-color); font-weight: 600; text-decoration: none; }
.sm-prefs .dropdown-header { color: var(--bs-secondary-color); font: 700 .875rem var(--bs-font-sans-serif); }
.sm-prefs .dropdown-item { min-height: 44px; display: flex; align-items: center; }
.sm-account { min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width: 359.98px) {
    .sm-bar { column-gap: .25rem; }
    .sm-wordmark { font-size: 1.1rem; }
    .sm-logo { width: 1.7rem; height: 1.7rem; }
    .sm-prefs > button { padding-inline: .25rem !important; }
    .sm-account { padding-inline: .4rem; }
}
@media (min-width: 768px) {
    .sm-bar { grid-template-columns: auto 1fr auto; grid-template-areas: "brand links tools"; column-gap: 2rem; }
}
.sm-skip { position: absolute; left: -999rem; }
.sm-skip:focus { left: .5rem; top: .5rem; z-index: 2000; padding: .5rem 1rem; background: var(--sm-surface); }

/* Pied de page : mentions en taille de texte courante, cibles de 44 px. */
.sm-footer { border-top: 1px solid var(--bs-border-color); padding: 1rem 0 max(1rem, env(safe-area-inset-bottom)); font-size: 1rem; }
.sm-footer nav { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
.sm-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }

/* Crédit photo, sous l'image (jamais dessus). */
.sm-credit { margin: 0; padding: .35rem 16px; font-size: .875rem; color: var(--bs-secondary-color); text-align: right; }

/* Bandeau photo des pages Offres et Guide : aucun texte sur l'image. */
.sm-banner { margin: 0; }
.sm-banner img { display: block; width: 100%; height: clamp(9rem, 28vw, 19rem); object-fit: cover; }

/* Retour par glissé vers la droite : flèche qui suit le doigt */
.sm-swipe-hint { position: fixed; left: 0; top: 50%; z-index: 2000; width: 44px; height: 44px; border-radius: 50%;
                 display: flex; align-items: center; justify-content: center; font-size: 1.4rem; pointer-events: none;
                 background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 4px 14px rgba(0,0,0,.2);
                 opacity: 0; transform: translate(-48px, -50%) scale(.7); transition: background-color .15s; }
.sm-swipe-hint.ready { background: var(--bs-primary); color: var(--sm-on-primary); }

/* Transitions entre les écrans de l'application */
@keyframes sm-in-forward { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes sm-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.sm-enter-forward { animation: sm-in-forward .22s ease-out; }
.sm-enter-back { animation: sm-in-back .22s ease-out; }
@media (prefers-reduced-motion: reduce) {
    .sm-enter-forward, .sm-enter-back { animation: none; }
    .sm-swipe-hint { transition: none; }
}

/* En-tête d'écran de l'application : retour + fil d'Ariane */
.sm-screen-head .sm-back { display: inline-flex; align-items: center; gap: .25rem; flex: 0 0 auto; min-height: 44px; padding: .35rem .75rem; }
.sm-screen-head .sm-back i { font-size: 1.1rem; }
.sm-screen-head .breadcrumb { --bs-breadcrumb-divider: '›'; }
.sm-screen-head .min-w-0 { min-width: 0; }
@media (max-width: 575.98px) { .sm-screen-head .sm-back span { display: none; } .sm-screen-head .sm-back { padding: .35rem .6rem; } }
