/* Styles de base des éléments Bubble rendus par le moteur.
   Les styles propres à chaque élément viennent de app.json (render.js). */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #111D36; color: #F5F7FB; font-family: Poppins, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
#gm-root { min-height: 100vh; }
.gm-page { width: 100%; }
/* Comme Bubble : overflow-wrap (un mot trop long se coupe) sans réduire la largeur minimale d'un mot. */
.gm-text { white-space: normal; overflow-wrap: break-word; }
.gm-text a { color: inherit; }
.gm-image { display: block; max-width: 100%; }
.gm-clickable { cursor: pointer; }
.gm-disabled { pointer-events: none; }
.gm-button { border: 0; cursor: pointer; font: inherit; color: inherit; background: none; }
.gm-button:disabled { cursor: default; }
.gm-input { font: inherit; outline: none; padding: 0 12px; background: transparent; }
.gm-input::placeholder { color: var(--ph, #AAB6CA); }
/* Pas d'anneau de focus ajouté : chaque champ a son propre état « focus » dans Bubble (bordure). L'anneau bleu ajouté
   ici faisait une double bordure (champ « Autre » de la création, zone de message ; retours du 12/11/2026). */
.gm-input:focus, .gm-input:focus-visible { outline: none; box-shadow: none; }
input[type=number].gm-input::-webkit-inner-spin-button { opacity: .4; }
/* Case à cocher Bubble : case native du navigateur, fond blanc, marges 3 px 3 px 3 px 4 px, collée au libellé */
.gm-checkbox { display: flex; align-items: center; gap: 0; cursor: pointer; }
.gm-checkbox input { width: 13px; height: 13px; margin: 3px 3px 3px 4px; background-color: #fff; flex: none; }
/* Curseur Bubble (jQuery UI) : marge intérieure 8 px, barre à 3 px des bords, poignée centrée sur la valeur
   (elle déborde de la barre de 9,5 px aux extrémités), aussi haute que l'élément. */
.gm-slider { position: relative; padding: 8px; box-sizing: border-box; }
.gm-slider::before { content: ''; position: absolute; left: 11px; right: 12px; top: 8px; bottom: 8px; box-sizing: border-box;
  background: var(--sl-bar); border: 1px solid var(--sl-border); border-radius: 4px; pointer-events: none; }
.gm-slider input { -webkit-appearance: none; appearance: none; position: absolute; left: 1.5px; right: 2.5px; top: 0; bottom: 0;
  width: auto; height: 100%; margin: 0; padding: 0; background: transparent; cursor: pointer; outline: none; }
.gm-slider input::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.gm-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 19px; height: var(--sl-h, 26px); box-sizing: border-box;
  background: var(--sl-handle); border: 1px solid var(--sl-border); border-radius: 4px; }
.gm-slider input::-moz-range-track { height: 100%; background: transparent; }
.gm-slider input::-moz-range-thumb { width: 19px; height: var(--sl-h, 26px); box-sizing: border-box;
  background: var(--sl-handle); border: 1px solid var(--sl-border); border-radius: 4px; }
.gm-picture { display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; position: relative; }
.gm-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gm-html { display: contents; }
.gm-rg { min-width: 0; }
.gm-rg::-webkit-scrollbar { width: 0; height: 0; }
.gm-cell { min-width: 0; }
.gm-icon { user-select: none; }
.gm-icon > * { font-size: inherit; line-height: 1; }
/* Lecteur audio (extension Bubble) : barre de progression ; partie lue = AAQ, reste = AAR estompé. */
.gm-audio { display: flex; align-items: center; }
.gm-audio-bar { flex: 1; height: 4px; background: color-mix(in srgb, var(--audio-rest, #55b3f1) 35%, transparent); border-radius: 2px; overflow: hidden; }
.gm-audio-bar i { display: block; height: 100%; width: 0; background: var(--audio-done, #37A7EE); }

/* Popups Bubble : fond grisé + boîte centrée */
.gm-popup-backdrop { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.gm-popup-backdrop[hidden] { display: none; }
.gm-popup { box-sizing: border-box; }

/* Alerte d'erreur façon Bubble */
#gm-alert { position: fixed; top: 0; left: 0; right: 0; z-index: 3000; background: #F35F6D; color: #fff; padding: 12px 16px; text-align: center; font-size: 14px; transform: translateY(-100%); transition: transform .25s; }
#gm-alert.show { transform: none; }

/* Boîte de dialogue maison */
.gm-modal-backdrop { position: fixed; inset: 0; z-index: 2000; background: rgba(17, 29, 54, .85); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gm-modal { background: #22304A; border: 1px solid #34445F; border-radius: 22px; padding: 20px; width: 100%; max-width: 420px; }
.gm-modal h2 { margin: 0 0 10px; font-size: 18px; text-align: center; }
.gm-modal p { color: #AAB6CA; font-size: 14px; line-height: 1.5; } .gm-modal a { color: #37A7EE; }
.gm-modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.gm-modal-actions button { flex: 1; border: 1px solid #34445F; background: transparent; color: #F5F7FB; border-radius: 12px; padding: 11px; font: 600 14px Poppins, sans-serif; cursor: pointer; }
.gm-modal-actions button.primary { background: linear-gradient(to right, #37A7EE, #2E76EB); border: 0; }
.gm-boot { min-height: 100vh; display: grid; place-items: center; } .gm-boot img { width: 64px; }
