/* QasbaGuard — page de la qasba de Mehdia : le recit et l'habillage de la scene 3D. Couleurs et polices du site (site.css). */
.q-page main { overflow-x: clip; }
.q-hero { padding: 56px 0 44px; background: radial-gradient(120% 90% at 80% 0%, #1d3a44 0%, var(--night) 62%); border-bottom: 1px solid var(--line); }
.q-sur { margin: 0 0 10px; font: 600 13px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--jade-2); }
.q-hero h1 { margin: 0 0 16px; font: 700 clamp(34px, 6vw, 62px)/1.05 var(--f-display); color: var(--sand); }
.q-ar { display: block; margin-top: 10px; font-size: .62em; color: var(--gold); }
.q-chapo { max-width: 760px; margin: 0 0 22px; font-size: 19px; color: var(--sand); }
.q-note { max-width: 760px; margin: 14px 0 0; font-size: 14.5px; color: var(--mute); }
.q-entrer { display: inline-flex; align-items: center; gap: 12px; font-size: 18px; padding: 14px 26px; cursor: pointer; }
/* un petit cube en perspective : on comprend qu'on entre dans une scene en 3D */
.q-cube { position: relative; width: 20px; height: 20px; flex: none; }
.q-cube::before, .q-cube::after { content: ""; position: absolute; inset: 0; border: 2px solid currentColor; border-radius: 2px; }
.q-cube::before { transform: translate(-3px, 3px); } .q-cube::after { transform: translate(3px, -3px); opacity: .55; }
.q-appel { margin: 0; }
.q-promesse { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.q-promesse li { padding: 6px 12px; font: 600 13px/1.2 var(--f-body); color: var(--sand); border: 1px solid var(--line); border-radius: 999px; background: rgba(232, 184, 77, .08); }

/* ---------- la scene ---------- */
.q-scene { position: relative; height: 100vh; height: 100svh; min-height: 480px; background: #0a1418; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.q-scene[hidden] { display: none; }
.q-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.q-scene canvas:active { cursor: grabbing; }
.q-attente { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 20px; text-align: center; background: #0a1418; color: var(--gold); font: 600 20px/1.3 var(--f-display); z-index: 6; transition: opacity .8s; }
.q-attente.q-fini { opacity: 0; pointer-events: none; }
.q-attente p { margin: 0; min-height: 1.3em; }
/* un rempart qui se releve, merlon apres merlon (transform et opacity seulement : l'animation continue meme quand la page calcule) */
.q-att-mur { position: relative; display: flex; gap: 7px; padding-bottom: 20px; }
.q-att-mur::after { content: ""; position: absolute; left: -9px; right: -9px; bottom: 0; height: 20px; background: var(--gold); border-radius: 2px; opacity: .92; }
.q-att-mur i { width: 19px; height: 24px; background: var(--gold); clip-path: polygon(0 100%, 0 34%, 50% 0, 100% 34%, 100% 100%); animation: q-merlon 2.4s ease-in-out infinite both; }
.q-att-mur i:nth-child(2) { animation-delay: .16s; } .q-att-mur i:nth-child(3) { animation-delay: .32s; } .q-att-mur i:nth-child(4) { animation-delay: .48s; }
.q-att-mur i:nth-child(5) { animation-delay: .64s; } .q-att-mur i:nth-child(6) { animation-delay: .8s; } .q-att-mur i:nth-child(7) { animation-delay: .96s; }
@keyframes q-merlon { 0% { opacity: 0; transform: translateY(18px); } 22%, 72% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(18px); } }
.q-att-barre { width: min(240px, 60vw); height: 4px; background: rgba(232, 184, 77, .2); border-radius: 999px; overflow: hidden; }
.q-att-barre b { display: block; height: 100%; background: var(--gold); transform: scaleX(.04); transform-origin: left center; transition: transform .5s ease-out; }
[dir="rtl"] .q-att-barre b { transform-origin: right center; }
.q-attente.q-echec .q-att-mur, .q-attente.q-echec .q-att-barre { display: none; }
.q-voile { position: absolute; inset: 0; background: #f4e3c2; opacity: 0; pointer-events: none; z-index: 3; transition: opacity .7s; }
.q-voile.q-on { opacity: .82; }
.q-haut { position: absolute; top: 14px; left: 16px; right: 150px; z-index: 4; pointer-events: none; text-shadow: 0 2px 12px rgba(0, 0, 0, .65); }
.q-an { margin: 0; font: 700 clamp(34px, 7vw, 64px)/1 var(--f-display); color: #fff; font-variant-numeric: tabular-nums; }
.q-heg { font: 600 clamp(13px, 2.2vw, 18px)/1 var(--f-body); color: var(--gold); white-space: nowrap; }
.q-titre { margin: 6px 0 0; font: 600 clamp(16px, 2.6vw, 22px)/1.2 var(--f-display); color: var(--sand); }
.q-outils { position: absolute; top: 14px; right: 14px; z-index: 5; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.q-outils button, .q-carnet-b { font: 600 13.5px/1 var(--f-body); color: var(--sand); background: rgba(11, 22, 28, .72); border: 1px solid rgba(235, 225, 205, .28); border-radius: 999px; padding: 9px 14px; cursor: pointer; backdrop-filter: blur(6px); }
.q-outils button:hover, .q-carnet-b:hover { border-color: var(--gold); color: var(--gold); }
.q-outils button[aria-pressed="true"] { background: var(--gold); color: #1a1408; border-color: var(--gold); }
/* la voix de la visite : un petit haut-parleur dessine, barre quand elle est coupee */
.q-outils button[hidden] { display: none; }
.q-outils .q-son { position: relative; padding-inline-start: 34px; background: rgba(11, 22, 28, .72); color: var(--sand); border-color: rgba(235, 225, 205, .28); }
.q-outils .q-son[aria-pressed="true"] { color: var(--gold); border-color: var(--gold); background: rgba(11, 22, 28, .72); }
.q-son::before { content: ""; position: absolute; inset-inline-start: 13px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: currentColor; clip-path: polygon(0 30%, 35% 30%, 100% 0, 100% 100%, 35% 70%, 0 70%); }
.q-son[aria-pressed="false"]::after { content: ""; position: absolute; inset-inline-start: 10px; top: 50%; width: 18px; height: 2px; margin-top: -1px; background: currentColor; transform: rotate(-38deg); }
.q-son[aria-pressed="false"] { opacity: .8; }
/* la musique : une croche dessinee (meme bouton, meme barre quand elle est coupee) */
.q-mus::before { width: 12px; height: 14px; margin-top: -7px; clip-path: polygon(46% 0, 58% 0, 58% 4%, 88% 18%, 96% 34%, 92% 50%, 86% 36%, 72% 26%, 58% 22%, 58% 82%, 54% 92%, 44% 99%, 30% 100%, 14% 98%, 4% 91%, 2% 82%, 8% 72%, 20% 66%, 34% 64%, 46% 68%); }
/* la langue : un globe, et sa petite liste des sept langues (a gauche du bouton sur grand ecran, au-dessus sur telephone) */
.q-outils.q-ouvert { z-index: 7; }
.q-langue { display: flex; }          /* la liste se place par rapport a toute la rangee (.q-outils) : elle ne passe pas sous les boutons plus larges */
.q-outils .q-langue-b { display: grid; place-items: center; width: 36px; height: 32px; padding: 0; flex: none; }
.q-langue-b svg { width: 17px; height: 17px; }
.q-outils .q-langue-b[aria-expanded="true"] { color: var(--gold); border-color: var(--gold); }
.q-langue-l { position: absolute; top: 0; right: calc(100% + 8px); display: grid; gap: 2px; min-width: 150px; padding: 6px; background: rgba(16, 33, 42, .96); border: 1px solid var(--gold); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.q-langue-l[hidden] { display: none; }
.q-langue-l a { display: block; padding: 8px 12px; border-radius: 8px; font: 600 14px/1.25 var(--f-body); color: var(--sand); text-decoration: none; white-space: nowrap; text-align: start; }
.q-langue-l a:lang(ar) { font-family: "Noto Sans Arabic", var(--f-body); }
html[dir="ltr"] .q-langue-l a { text-align: left; } html[dir="rtl"] .q-langue-l a { text-align: right; }          /* les sept noms alignes du meme cote, quel que soit leur sens d'ecriture */
.q-langue-l a:hover, .q-langue-l a:focus-visible { background: rgba(232, 184, 77, .16); color: var(--gold); }
.q-langue-l a[aria-current="true"] { background: var(--gold); color: #1a1408; }
.q-langue-l.q-attend a { opacity: .55; pointer-events: none; }
.q-langue-m { max-width: 230px; margin: 4px 4px 2px; font: 500 13px/1.4 var(--f-body); color: var(--sand-2); white-space: normal; }
.q-langue-m[hidden] { display: none; }
.q-langue-m a { display: inline; padding: 0; white-space: normal; color: var(--gold); text-decoration: underline; }
/* invitation : la visite guidee luit doucement tant qu'on ne l'a pas lancee */
.q-outils button.q-invite { position: relative; color: #1a1408; background: var(--gold); border-color: var(--gold); }
.q-outils button.q-invite::before { content: ""; display: inline-block; margin-inline-end: 8px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent currentColor; }
[dir="rtl"] .q-outils button.q-invite::before { transform: scaleX(-1); }
/* droite a gauche : le carnet reste a gauche de l'ecran, son bouton aussi (sinon il passe sous la rangee de boutons, a droite) */
[dir="rtl"] .q-carnet { align-items: flex-end; }
.q-outils button.q-invite::after { content: ""; position: absolute; inset: -1px; border-radius: 999px; box-shadow: 0 0 0 0 rgba(232, 184, 77, .75), 0 0 18px 2px rgba(232, 184, 77, .55); animation: q-invite 1.8s ease-out infinite; pointer-events: none; }
@keyframes q-invite { 0% { box-shadow: 0 0 0 0 rgba(232, 184, 77, .75), 0 0 18px 2px rgba(232, 184, 77, .55); } 70% { box-shadow: 0 0 0 14px rgba(232, 184, 77, 0), 0 0 26px 6px rgba(232, 184, 77, .2); } 100% { box-shadow: 0 0 0 0 rgba(232, 184, 77, 0), 0 0 18px 2px rgba(232, 184, 77, .55); } }

/* points a decouvrir : des losanges poses sur les lieux */
.q-points { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.q-point { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; will-change: transform; }
.q-point::before { content: ""; position: absolute; inset: 6px; transform: rotate(45deg); background: var(--gold); border: 2px solid #fff; box-shadow: 0 0 0 0 rgba(232, 184, 77, .7); animation: q-pouls 2.2s infinite; }
.q-point span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px/1 var(--f-body); color: #1a1408; }
.q-point.q-vu::before { background: var(--jade); animation: none; }
.q-points.q-calme .q-point:not(.q-actif) { opacity: .3; }
.q-dans .top { display: none; }
.q-point.q-vu span { color: #fff; }
.q-point em { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; white-space: nowrap; font: 600 12px/1.2 var(--f-body); font-style: normal; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); opacity: 0; transition: opacity .2s; pointer-events: none; }
.q-point:hover em, .q-point:focus-visible em { opacity: 1; }
@keyframes q-pouls { 0% { box-shadow: 0 0 0 0 rgba(232, 184, 77, .7); } 70% { box-shadow: 0 0 0 14px rgba(232, 184, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 184, 77, 0); } }

/* carnet : le recit de l'epoque et les lieux */
.q-carnet { position: absolute; left: 14px; bottom: 96px; z-index: 4; width: min(360px, calc(100vw - 28px)); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.q-carnet-c { max-height: 38vh; overflow: auto; padding: 14px 16px; background: rgba(11, 22, 28, .82); border: 1px solid var(--line); border-radius: var(--r); backdrop-filter: blur(8px); font-size: 14.5px; line-height: 1.5; color: var(--sand); touch-action: pan-y; }
.q-carnet.q-plie .q-carnet-c, .q-carnet.q-plie .q-progres { display: none; }
.q-carnet-c p { margin: 0 0 9px; }
.q-carnet-c ol { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.q-carnet-c ol button { width: 100%; text-align: start; font: 500 14px/1.3 var(--f-body); color: var(--sand); background: none; border: 0; border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.q-carnet-c ol button:hover { background: rgba(232, 184, 77, .14); }
.q-carnet-c ol button::before { content: "◆ "; color: var(--gold); }
.q-carnet-c ol button.q-vu::before { content: "✓ "; color: var(--jade-2); }
.q-progres { margin: 0; padding: 6px 12px; font: 600 12.5px/1.2 var(--f-mono); color: var(--gold); background: rgba(11, 22, 28, .78); border-radius: 999px; }

/* fiche d'un lieu */
.q-fiche { position: absolute; right: 14px; bottom: 96px; z-index: 5; width: min(380px, calc(100vw - 28px)); max-height: 52vh; display: flex; flex-direction: column; overflow: hidden; padding: 18px 18px 14px; background: rgba(16, 33, 42, .95); border: 1px solid var(--gold); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); color: var(--sand); }
.q-fiche[hidden] { display: none; }
.q-fiche h3 { margin: 0 0 8px; margin-inline-end: 62px; font: 700 20px/1.2 var(--f-display); color: var(--gold); cursor: pointer; }
/* le texte defile a l'interieur : le titre et les deux boutons restent en place */
.q-fiche-c { min-height: 0; overflow: auto; touch-action: pan-y; scrollbar-width: thin; }
.q-fiche.q-suite::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 1px; height: 34px; border-radius: 0 0 var(--r) var(--r); background: linear-gradient(0deg, rgba(16, 33, 42, .98), rgba(16, 33, 42, 0)); pointer-events: none; }
.q-fiche p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.q-fiche-x { position: absolute; top: 8px; inset-inline-end: 10px; width: 30px; height: 30px; font-size: 22px; line-height: 1; color: var(--sand); background: none; border: 0; cursor: pointer; }
.q-sceau { align-self: flex-start; margin: 0 0 8px; padding: 4px 10px; font: 700 12px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: #1a1408; background: var(--gold); border-radius: 999px; }
.q-sceau[hidden] { display: none; }
/* fiche reduite a son titre : l'image redevient visible */
.q-fiche-r { position: absolute; top: 8px; inset-inline-end: 42px; width: 30px; height: 30px; background: none; border: 0; cursor: pointer; }
.q-fiche-r::before { content: ""; position: absolute; left: 10px; top: 7px; width: 9px; height: 9px; border: solid var(--sand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.q-fiche.q-reduit { padding-top: 12px; padding-bottom: 10px; }
.q-fiche.q-reduit .q-fiche-r::before { top: 12px; transform: rotate(225deg); }
.q-fiche.q-reduit .q-fiche-c, .q-fiche.q-reduit .q-sceau, .q-fiche.q-reduit::after { display: none; }
.q-fiche.q-reduit h3 { margin-bottom: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* frise du temps */
.q-frise { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; gap: 6px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); overflow-x: auto; background: linear-gradient(0deg, rgba(8, 16, 20, .92), rgba(8, 16, 20, 0)); scrollbar-width: none; touch-action: pan-x; }
.q-frise::-webkit-scrollbar { display: none; }
.q-frise button { flex: 1 0 auto; min-width: 104px; padding: 9px 10px 8px; text-align: center; color: var(--sand-2); background: rgba(11, 22, 28, .74); border: 1px solid rgba(235, 225, 205, .2); border-radius: 12px; cursor: pointer; backdrop-filter: blur(6px); }
.q-frise button b { display: block; font: 700 19px/1 var(--f-display); color: var(--sand); font-variant-numeric: tabular-nums; }
.q-frise button small { display: block; margin-top: 4px; font: 500 11.5px/1.15 var(--f-body); }
.q-frise button:hover { border-color: var(--gold); }
.q-frise button[aria-current="true"] { background: var(--gold); border-color: var(--gold); color: #3a2c0c; }
.q-frise button[aria-current="true"] b { color: #1a1408; }
.q-aide { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); z-index: 3; margin: 0; padding: 7px 14px; max-width: calc(100vw - 28px); text-align: center; font: 500 13px/1.3 var(--f-body); color: #fff; background: rgba(0, 0, 0, .45); border-radius: 999px; pointer-events: none; transition: opacity .8s; }
.q-aide.q-fini { opacity: 0; }

/* ---------- le recit ---------- */
.q-recit { padding: 46px 20px 70px; max-width: 860px; }
.q-h2 { margin: 0 0 26px; font: 700 clamp(26px, 4vw, 36px)/1.15 var(--f-display); color: var(--sand); }
.q-ep { margin: 0 0 44px; padding: 0 0 6px 20px; border-inline-start: 3px solid var(--line); }
.q-ep h3 { margin: 0 0 12px; font: 700 clamp(21px, 3vw, 27px)/1.2 var(--f-display); color: var(--gold); }
.q-ep p { margin: 0 0 14px; }
.q-cit { margin: 18px 0; padding: 16px 18px; background: var(--night-2); border: 1px solid var(--line); border-inline-start: 4px solid var(--gold); border-radius: 0 var(--r) var(--r) 0; }
.q-cit p[lang="ar"] { font: 500 22px/2.15 "Noto Sans Arabic", var(--f-body); color: var(--sand); }
.q-cit footer { font-size: 13.5px; color: var(--mute); }
.q-quete { margin: 24px 0 8px; font: 700 20px/1.2 var(--f-display); color: var(--jade-2); }
.q-lieux { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.q-lieux li { padding: 14px 16px; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); }
.q-lieux h4 { margin: 0 0 6px; font: 700 17px/1.25 var(--f-display); color: var(--sand); }
.q-lieux p { margin: 0; font-size: 15.5px; color: var(--sand-2); }
/* numero du rempart devant son titre (compteur : attr() ne lirait que l attribut du titre lui-meme) */
.q-lieux { counter-reset: rempart; } .q-lieux li[data-rempart] { counter-increment: rempart; }
.q-lieux li[data-rempart] h4::before { content: counter(rempart) " · "; color: var(--gold); }
.q-fin { margin: 18px 0 0; padding: 16px 18px; background: rgba(0, 184, 148, .1); border: 1px solid var(--jade); border-radius: var(--r); }
.q-fin[hidden] { display: none; }
.q-fin h4 { margin: 0 0 6px; font: 700 18px/1.2 var(--f-display); color: var(--jade-2); }
.q-fin p { margin: 0; }
.q-sources ul { padding-inline-start: 20px; }
.q-sources li { margin: 0 0 8px; }

@media (max-width: 720px) {
  .q-hero { padding: 36px 0 30px; }
  .q-outils { flex-direction: row; top: auto; bottom: 86px; right: 10px; }
  .q-outils button { padding: 8px 11px; font-size: 12.5px; }
  .q-outils #q-ecran { display: none; }          /* la rangee doit tenir sur un telephone : le plein ecran y sert peu */
  /* voix et musique deviennent des boutons-icones : leur nom reste lu par les lecteurs d'ecran (texte masque a l'oeil seulement) */
  .q-outils .q-son { width: 34px; height: 30.5px; padding: 0; flex: none; }
  .q-outils .q-son span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .q-son::before { inset-inline-start: 10px; } .q-son[aria-pressed="false"]::after { inset-inline-start: 7px; }
  .q-outils .q-langue-b { width: 34px; height: 30.5px; }
  .q-langue-l { top: auto; bottom: calc(100% + 8px); right: 0; }
  .q-haut { right: 16px; }
  .q-carnet { left: 10px; bottom: 86px; flex-direction: column-reverse; }
  .q-carnet-b { padding: 8px 11px; font-size: 12.5px; }
  .q-carnet-c { max-height: 30vh; }
  .q-fiche { right: 10px; left: 10px; width: auto; bottom: 128px; max-height: 34vh; max-height: 34svh; padding: 14px 14px 10px; }
  .q-fiche h3 { font-size: 18px; }
  .q-frise button { min-width: 88px; }
  .q-aide { top: 108px; font-size: 12px; }
}
@media (max-width: 380px) { .q-outils button.q-invite::before { content: none; } .q-outils { gap: 5px; } .q-outils button, .q-carnet-b { padding: 8px 8px; font-size: 12px; } .q-outils .q-son, .q-outils .q-langue-b { width: 31px; height: 30px; } .q-son::before { inset-inline-start: 9px; } .q-son[aria-pressed="false"]::after { inset-inline-start: 6px; } }
/* 320 px : avec le globe, la rangee se resserre encore pour rester sur une ligne a cote du Carnet */
@media (max-width: 345px) { .q-outils { gap: 3px; right: 6px; } .q-carnet { left: 6px; } .q-outils button, .q-carnet-b { padding: 8px 6px; font-size: 11.5px; } .q-outils .q-son, .q-outils .q-langue-b { width: 28px; height: 29.5px; } .q-langue-b svg { width: 15px; height: 15px; } .q-son::before { inset-inline-start: 8px; } .q-son[aria-pressed="false"]::after { inset-inline-start: 5px; } }
/* tablette debout : les deux panneaux ne tiennent pas cote a cote */
@media (min-width: 721px) and (max-width: 900px) { .q-carnet { width: min(340px, calc(100vw - 28px)); } .q-fiche { width: min(360px, calc(100vw - 28px)); } }
/* telephone couche : peu de hauteur, tout se resserre */
@media (max-height: 520px) {
  .q-scene { min-height: 0; }
  .q-haut { top: 8px; left: 12px; }
  .q-an { font-size: 30px; } .q-titre { font-size: 15px; margin-top: 2px; }
  .q-outils { flex-direction: row; top: 8px; bottom: auto; right: 10px; gap: 6px; }
  .q-langue-l { top: calc(100% + 8px); bottom: auto; right: 0; max-height: calc(100svh - 70px); overflow: auto; }
  .q-outils .q-langue-b { width: 32px; height: 28px; }
  .q-outils button { padding: 7px 10px; font-size: 12px; }
  .q-aide { display: none; }
  .q-carnet { left: 10px; bottom: 62px; width: min(330px, 46vw); }
  .q-carnet-c { max-height: calc(100svh - 190px); font-size: 13.5px; padding: 10px 12px; }
  .q-fiche { right: 10px; left: auto; bottom: 62px; width: min(360px, 48vw); max-height: calc(100svh - 130px); padding: 12px 14px 10px; }
  .q-fiche h3 { font-size: 17px; } .q-fiche p { font-size: 13.5px; }
  .q-frise { padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); }
  .q-frise button { min-width: 84px; padding: 6px 8px 5px; }
  .q-frise button b { font-size: 16px; } .q-frise button small { display: none; }
}
/* doigts : des cibles plus grandes */
@media (pointer: coarse) {
  .q-point { width: 46px; height: 46px; margin: -23px 0 0 -23px; } .q-point::before { inset: 10px; }
  .q-fiche-x, .q-fiche-r { width: 40px; height: 40px; top: 4px; } .q-fiche-x { inset-inline-end: 4px; } .q-fiche-r { inset-inline-end: 44px; }
  .q-fiche-r::before { left: 15px; top: 11px; } .q-fiche.q-reduit .q-fiche-r::before { top: 16px; }
  .q-fiche h3 { margin-inline-end: 78px; }
}
@media (prefers-reduced-motion: reduce) { .q-point::before, .q-att-mur i, .q-outils button.q-invite::after { animation: none; } }
/* encart de fin : la page est offerte par QasbaGuard */
.q-qg { margin: 10px 0 0; padding: 18px 20px; display: grid; gap: 12px; justify-items: start; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); }
.q-qg p { margin: 0; color: var(--sand-2); }
/* droite a gauche : la bordure doree des citations est a droite, les coins arrondis aussi */
[dir="rtl"] .q-cit { border-radius: var(--r) 0 0 var(--r); }
/* arabe entierement vocalise : un peu plus d'interligne pour que les voyelles ne se touchent pas */
.q-page :lang(ar) p, .q-page :lang(ar) li { line-height: 2; }
.q-page :lang(ar) h3, .q-page :lang(ar) h4, .q-page :lang(ar) .q-h2, .q-page h1:lang(ar), .q-titre:lang(ar) { font-family: "Noto Sans Arabic", var(--f-body); line-height: 1.6; }
/* le nom arabe sous le titre suit le sens de la page (a gauche en francais, en anglais, en tifinagh...) */
html[dir="ltr"] .q-ar { text-align: left; }
/* pendant la visite en 3D, le bandeau « choisissez votre langue » du site ne doit pas couvrir la frise ni la fiche */
.q-dans .langbar { display: none !important; }
