/* V7 final — correction structurelle globale, mobile d'abord */
:root{--lsg-v7-tabbar:68px;--lsg-v7-safe:env(safe-area-inset-bottom,0px)}
html,body{width:100%;max-width:100%;min-height:100%;overflow-x:hidden}
body.lsg-app,body.lsg-production-home{min-height:100dvh;display:flex!important;flex-direction:column!important;background:#fff!important}
body.lsg-app>main,body.lsg-production-home>main{position:relative!important;z-index:1!important;flex:1 0 auto!important;width:100%!important;min-height:0!important;margin:0!important}
body.lsg-app>footer,body.lsg-production-home>footer,body.lsg-app>.lsg-footer{position:static!important;inset:auto!important;transform:none!important;float:none!important;clear:both!important;z-index:1!important;flex:0 0 auto!important;width:100%!important;margin:0!important;background:#f8fafc!important}

/* Modales au-dessus de tout; barre masquée lorsqu'une modale est ouverte. */
[role="dialog"],#reglement-modal,#cguModal,#mentionsLegalesModal,#privacyModal,#plansComparisonModal,#cookieSettingsModal,#lsgMoreSheet,#homeInfoPanel{z-index:2147483640!important}
body:has(#reglement-modal:not(.hidden)[aria-hidden="false"]) .lsg-mobile-tabbar,
body:has(#cguModal:not(.hidden)[aria-hidden="false"]) .lsg-mobile-tabbar,
body:has(#mentionsLegalesModal:not(.hidden)[aria-hidden="false"]) .lsg-mobile-tabbar,
body:has(#privacyModal:not(.hidden)[aria-hidden="false"]) .lsg-mobile-tabbar,
body:has(#plansComparisonModal:not(.hidden)[aria-hidden="false"]) .lsg-mobile-tabbar,
body:has(#lsgMoreSheet:not([hidden])) .lsg-mobile-tabbar,
body:has(#homeInfoPanel:not(.hidden)[aria-hidden="false"]) .lsg-mobile-tabbar{visibility:hidden!important;pointer-events:none!important}

@media(max-width:900px){
  .lsg-mobile-tabbar{display:grid!important;visibility:visible;opacity:1;pointer-events:auto}
  body.lsg-app,body.lsg-production-home{padding-bottom:0!important}
  body.lsg-app>footer,body.lsg-production-home>footer,body.lsg-app>.lsg-footer{margin-bottom:calc(var(--lsg-v7-tabbar) + var(--lsg-v7-safe))!important}
  .lsg-mobile-tabbar{height:calc(var(--lsg-v7-tabbar) + var(--lsg-v7-safe))!important;min-height:0!important;padding:4px 7px var(--lsg-v7-safe)!important}
  .lsg-mobile-tab{min-height:58px!important;padding:6px 2px 5px!important;border-radius:16px!important;gap:2px!important}
  .lsg-mobile-tab svg{width:23px!important;height:23px!important}
  .lsg-mobile-tab span{font-size:10px!important;line-height:1.1!important}

  /* Header plus compact. */
  .lsg-topbar-inner{min-height:58px!important;padding:7px 12px!important;gap:8px!important}
  .lsg-brand-mark{width:36px!important;height:36px!important;flex-basis:36px!important;border-radius:12px!important}
  .lsg-brand-mark img{width:33px!important;height:33px!important}
  .lsg-brand-copy strong{font-size:14px!important}
  .lsg-brand-copy small{display:none!important}
  .lsg-icon-button{width:38px!important;height:38px!important;border-radius:13px!important}
  .lsg-mobile-user-pill{max-width:52vw!important;height:38px!important;padding:0 9px!important;gap:6px!important}
  .lsg-mobile-user-name{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important}
  .lsg-mobile-user-badge{display:inline-flex!important;flex:0 0 auto!important}
  .lsg-mobile-user-badge svg{width:18px!important;height:18px!important}

  /* Footer réellement compact, sans recouvrement. */
  footer .max-w-5xl{padding:10px 12px!important;gap:4px!important}
  footer .footer-social{margin:2px 0!important;gap:8px!important;font-size:11px!important;flex-direction:row!important}
  footer .footer-social-label{width:auto!important}
  footer .footer-social-icon{width:15px!important;height:15px!important}
  footer .footer-legal-wrap{margin:2px 0 0!important}
  footer .footer-legal-links{gap:4px 8px!important;font-size:9px!important;line-height:1.35!important}
  footer .footer-legal-links>span:first-child{flex:0 0 auto!important}
  footer .text-xs,footer .sm\:text-sm{font-size:10px!important;line-height:1.35!important}
  footer .text-sm,footer .sm\:text-base{font-size:11px!important;line-height:1.35!important}
  footer .text-lg{font-size:14px!important}
  footer .border-t{margin:2px 0!important}
}

/* Accueil : identité LSG historique et proportions compactes. */
body.lsg-production-home .lsg-home-minimal{min-height:0!important;padding:12px 12px 18px!important;background:linear-gradient(180deg,#f4edff 0%,#fff 48%,#fff7db 100%)!important}
body.lsg-production-home .lsg-home-shell{gap:12px!important}
body.lsg-production-home .lsg-home-hero{padding:17px 14px 16px!important;border-radius:24px!important;background:radial-gradient(circle at 50% 0%,rgba(255,212,59,.22),transparent 38%),linear-gradient(145deg,#16072e 0%,#3d0f70 56%,#7024d5 100%)!important;box-shadow:0 14px 34px rgba(60,15,112,.20)!important}
body.lsg-production-home .lsg-next-draw{padding:6px 11px!important;border-radius:12px!important;font-size:9px!important}
body.lsg-production-home .lsg-next-draw strong{font-size:14px!important;color:#ffd43b!important}
body.lsg-production-home .lsg-home-kicker{margin:12px 0 2px!important;font-size:10px!important;color:#dec9ff!important}
body.lsg-production-home .lsg-home-jackpot{font-size:clamp(44px,13vw,62px)!important;color:#ffd21c!important}
body.lsg-production-home .lsg-home-schedule{margin:8px 0 13px!important;font-size:13px!important}
body.lsg-production-home .lsg-home-primary{padding:12px 16px!important;border-radius:16px!important;font-size:15px!important;background:#ffd21c!important}
body.lsg-production-home .lsg-home-free-note{margin-top:8px!important;font-size:11px!important}
body.lsg-production-home .lsg-home-plans{padding:14px!important;border-radius:22px!important}
body.lsg-production-home .lsg-section-heading{margin-bottom:10px!important}
body.lsg-production-home .lsg-section-heading h2{font-size:22px!important}
body.lsg-production-home .lsg-plan-grid{gap:9px!important}
body.lsg-production-home .lsg-plan-card{min-height:128px!important;padding:13px!important;border-radius:18px!important}
body.lsg-production-home .lsg-plan-top h3{font-size:18px!important}
body.lsg-production-home .lsg-plan-top span{font-size:12px!important}
body.lsg-production-home .lsg-plan-main{margin:12px 0 0!important;font-size:22px!important}
body.lsg-production-home .lsg-plan-main small{font-size:10px!important}
body.lsg-production-home .lsg-plan-extra{font-size:10px!important}
body.lsg-production-home .lsg-plan-button{padding:9px!important;font-size:12px!important;border-radius:12px!important}
body.lsg-production-home .lsg-plan-popular{top:-9px!important;font-size:8px!important;padding:4px 8px!important}
body.lsg-production-home .lsg-home-code{margin-top:10px!important}
body.lsg-production-home .lsg-home-code input,body.lsg-production-home .lsg-home-code button{min-height:44px!important;font-size:12px!important}

@media(max-width:720px){
  body.lsg-production-home header{padding:10px 12px!important}
  body.lsg-production-home header .h-9{height:32px!important}
  body.lsg-production-home header .text-xl{font-size:17px!important}
  body.lsg-production-home #homeInfoBtn{width:38px!important;height:38px!important}
  body.lsg-production-home .lsg-plan-grid{grid-template-columns:1fr!important}
}

/* Tirages : une carte équilibrée, centrée et lisible. */
@media(max-width:640px){
  body.lsg-page-draws main>.max-w-6xl{padding:0 12px 14px!important}
  body.lsg-page-draws main section.text-center{padding:14px 12px!important;margin:10px auto!important}
  body.lsg-page-draws main section.text-center h1{font-size:22px!important}
  body.lsg-page-draws .draws-filter{padding:11px!important;gap:8px!important}
  body.lsg-page-draws .draws-filter-actions button,body.lsg-page-draws .draws-filter-actions a{min-height:42px!important;font-size:12px!important}
  body.lsg-page-draws .draws-table tbody{gap:10px!important}
  body.lsg-page-draws .draws-table tr{grid-template-columns:1fr 1fr!important;grid-template-areas:"date draw" "jackpot jackpot" "reward reward"!important;gap:8px 10px!important;padding:13px!important;border-radius:18px!important}
  body.lsg-page-draws .draws-table td{font-size:13px!important;line-height:1.25!important}
  body.lsg-page-draws .draws-table td:before{margin-bottom:4px!important;font-size:9px!important}
  body.lsg-page-draws .draw-num{min-height:40px!important;padding:0 10px!important;font-size:21px!important;border-radius:12px!important;letter-spacing:.10em!important}
  body.lsg-page-draws .draws-table td[data-label="Jackpot"]{padding-top:8px!important;gap:6px!important;font-size:15px!important}
  body.lsg-page-draws .draws-table td[data-label="Récompenses"]{padding:8px 10px!important;font-size:11px!important;border-radius:12px!important}
  body.lsg-page-draws .draws-table td[data-label="Récompenses"]:has(.text-slate-400){display:none!important}
}

/* Compte : beaucoup moins de texte et cartes plus courtes. */
@media(max-width:767px){
  body.lsg-page-account .account-wrap{padding:0 12px 14px!important}
  body.lsg-page-account .account-grid{gap:10px!important}
  body.lsg-page-account .card{padding:14px!important;border-radius:18px!important}
  body.lsg-page-account .card h2{font-size:18px!important;margin-bottom:8px!important}
  body.lsg-page-account .soft{font-size:11.5px!important;line-height:1.35!important}
  body.lsg-page-account .hr{margin:9px 0!important}
  body.lsg-page-account .kpi{font-size:13px!important}
  body.lsg-page-account .badge{font-size:12px!important;padding:7px 9px!important}
  body.lsg-page-account .account-legal-details{margin-top:6px!important}
  body.lsg-page-account .account-legal-details summary{font-size:10px!important}
  body.lsg-page-account .account-legal-details p{font-size:10px!important;line-height:1.35!important}
  body.lsg-page-account p:not(.soft):not(.account-secondary-note){margin-top:5px!important;margin-bottom:5px!important}
}
/* V8.1 compact goals + home/play header stability */
.lsg-goals-compact{padding:14px 16px;border:1px solid #e9ddff;border-radius:20px;background:#fff;box-shadow:0 10px 28px rgba(76,29,149,.07)}
.lsg-goals-compact-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.lsg-goals-eyebrow{display:block;color:#7c3aed;font-size:10px;font-weight:900;letter-spacing:.14em;text-transform:uppercase}.lsg-goals-compact h2{margin:2px 0 2px;font-size:17px;line-height:1.15;color:#211433;font-weight:950}.lsg-goals-compact p{margin:0;color:#62586e;font-size:12px}.lsg-goals-more{flex:0 0 auto;border:0;border-radius:11px;padding:8px 10px;background:#f3e8ff;color:#6d28d9;font-size:11px;font-weight:900}.lsg-goals-progress-line{height:8px;margin-top:11px;border-radius:99px;background:#eee7f8;overflow:hidden}.lsg-goals-progress-line span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#6d28d9,#facc15)}.lsg-goals-meta{display:flex;justify-content:space-between;margin-top:6px;color:#6b6474;font-size:11px}.lsg-goals-meta strong{color:#29143f}.lsg-goals-modal[hidden]{display:none!important}.lsg-goals-modal{position:fixed;inset:0;z-index:2147483200}.lsg-goals-backdrop{position:absolute;inset:0;border:0;background:rgba(15,7,28,.55)}.lsg-goals-sheet{position:absolute;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));max-height:75vh;overflow:auto;padding:18px;border-radius:24px;background:#fff;box-shadow:0 24px 70px rgba(24,10,46,.32)}.lsg-goals-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.lsg-goals-sheet-head h2{margin:0;font-size:20px;font-weight:950;color:#211433}.lsg-goals-sheet-head button{width:38px;height:38px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;font-size:23px}.lsg-goals-list{display:grid;gap:9px}.lsg-goal-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:12px;border:1px solid #e8e2ef;border-radius:15px;background:#faf9fc}.lsg-goal-row.is-done{background:#f0fdf4;border-color:#bbf7d0}.lsg-goal-icon{font-size:22px}.lsg-goal-row strong{font-size:13px;color:#211433}.lsg-goal-row p{margin:2px 0 0;font-size:11px;color:#6b6474}.lsg-goal-state{font-size:10px;font-weight:900;color:#7c3aed}.lsg-goal-row.is-done .lsg-goal-state{color:#15803d}
@media(max-width:420px){.lsg-goals-compact{padding:12px 13px}.lsg-goals-compact h2{font-size:15px}.lsg-goals-compact p{font-size:11px}.lsg-goals-more{padding:7px 8px}}
.lsg-home-mobile-head{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;z-index:30}.lsg-home-mobile-brand{display:flex;align-items:center;gap:8px;min-width:0;flex:1}.lsg-home-mobile-brand img{width:38px;height:38px;flex:0 0 38px}.lsg-home-mobile-brand span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px;font-weight:900;line-height:1;background:linear-gradient(90deg,#4f46e5,#06b6d4,#3b82f6);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.lsg-home-mobile-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;position:relative;z-index:40}.lsg-home-user-pill{display:inline-flex;align-items:center;gap:5px;max-width:39vw;height:40px;padding:0 8px;border-radius:14px;background:#eef2ff;color:#4338ca;text-decoration:none;font-weight:900;box-shadow:0 6px 18px rgba(79,70,229,.12)}.lsg-home-user-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.lsg-home-user-badge{display:inline-flex;flex:0 0 auto}.lsg-home-user-badge svg{width:19px;height:19px}.lsg-home-info-btn{display:inline-grid!important;place-items:center!important;width:40px!important;height:40px!important;flex:0 0 40px!important;border:1px solid #e2e8f0!important;border-radius:14px!important;background:#fff!important;color:#4f46e5!important;box-shadow:0 6px 18px rgba(15,23,42,.08)!important;position:relative!important;z-index:50!important;pointer-events:auto!important;touch-action:manipulation!important}.lsg-home-info-btn svg{width:24px;height:24px;pointer-events:none}
@media(max-width:390px){.lsg-home-mobile-brand span{display:none}.lsg-home-user-pill{max-width:58vw}.lsg-home-user-name{font-size:10px}}
