/* GOSY 20/11/2026 — Agenda / Plan & Défi, visual and navigation-only.
   Only public particulier pages; Pro, Admin, DB, APIs and card destinations untouched. */

/* CALENDRIER — 7 equal real columns, narrow screens, fewer exaggerated margins. */
body.gosy-premium-agenda main.shell{width:min(100% - 20px,1180px)}
body.gosy-premium-agenda .page-hero{
  min-height:0!important;margin:9px 0 5px!important;padding:12px 14px!important;
  border-radius:18px!important
}
body.gosy-premium-agenda .page-hero h1{margin:0 0 3px!important;font-size:clamp(29px,8vw,37px)!important}
body.gosy-premium-agenda .page-hero p{font-size:12px!important;margin:0!important;line-height:1.4!important}
body.gosy-premium-agenda .gw21-agenda-row{margin:6px 0 4px!important}
body.gosy-premium-agenda .month-nav{margin:9px 0 6px!important;gap:9px!important;min-height:40px}
body.gosy-premium-agenda .month-nav h2{font-size:clamp(17px,4.7vw,23px)!important;margin:0;text-align:center;line-height:1.1}
body.gosy-premium-agenda .month-nav .btn{min-height:39px!important;padding:6px 11px!important;flex:0 0 auto}
body.gosy-premium-agenda .month-grid{
  display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:4px!important;min-width:0!important;width:100%!important;
  margin:0!important;overflow:visible!important;
}
body.gosy-premium-agenda .month-grid>*{min-width:0!important;max-width:100%!important}
body.gosy-premium-agenda .month-grid .month-label{padding:1px!important;display:grid;place-items:center}
body.gosy-premium-agenda .month-grid .month-label img{
  width:min(100%,25px)!important;height:25px!important;max-width:100%;object-fit:contain
}
body.gosy-premium-agenda .month-grid .month-day{
  display:flex;align-items:center;justify-content:flex-start;flex-direction:column;
  min-height:66px!important;padding:5px 2px!important;
  border-radius:10px!important;overflow:hidden!important;text-align:center;
  font-variant-numeric:tabular-nums
}
body.gosy-premium-agenda .month-grid .day-number{font-size:15px!important;line-height:1.2!important}
body.gosy-premium-agenda .month-grid .activity-count{
  display:block!important;width:auto!important;max-width:100%!important;
  font-size:9px!important;line-height:1.15!important;margin:3px 0 0!important;
  border-radius:9px!important;padding:3px 5px!important;overflow:hidden!important
}
body.gosy-premium-agenda .month-grid.gosy-agenda-counts-enhanced .activity-count[data-gosy-count]{font-size:0!important}
body.gosy-premium-agenda .month-grid.gosy-agenda-counts-enhanced .activity-count[data-gosy-count]::before{
  content:attr(data-gosy-count);font-size:13px!important;line-height:1.2!important;font-weight:850!important;
}
body.gosy-premium-agenda .month-grid.gosy-agenda-week-only .month-day:not(.gosy-week-active){display:none!important}
body.gosy-premium-agenda .month-grid .gosy-dispo-label{
  align-items:center!important;max-width:100%;margin-top:3px!important;font-size:9px!important;
}
body.gosy-premium-agenda .month-grid .gosy-dispo-label .gosy-dispo-heading{font-size:9px!important}
body.gosy-premium-agenda .month-grid .gosy-dispo-label .gosy-dispo-hour{font-size:8px!important;line-height:1.15!important}
body.gosy-premium-agenda .gosy-agenda-inline-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:8px 0}
body.gosy-premium-agenda .gosy-agenda-week-toggle,
body.gosy-premium-agenda .gosy-agenda-inline-filter{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:41px!important;padding:7px 12px!important;border-radius:13px;
  border:1px solid rgba(121,207,252,.46);background:rgba(16,38,82,.90);
  color:#e9f9ff;font-size:12px;font-weight:770;box-shadow:inset 0 1px rgba(255,255,255,.1);
  cursor:pointer
}
body.gosy-premium-agenda .gosy-agenda-inline-filter{background:linear-gradient(125deg,#152f72,#4a246a)}
body.gosy-premium-agenda .gosy-agenda-inline-filter[hidden]{display:none!important}
body.gosy-premium-agenda.gosy-agenda-inline-filters>button.gosy-ff-tab{display:none!important}
body.gosy-premium-agenda .gosy-agenda-inline-filter .gosy-agenda-filter-count{font-size:11px;color:#9cefff}
body.gosy-premium-agenda .gosy-agenda-inline-actions button:focus-visible,
body.gosy-premium-agenda .gosy-agenda-dispo-details summary:focus-visible{outline:2px solid #fbd48b;outline-offset:3px}

/* DISPONIBILITÉS — same existing form, now collapsible on demand. */
body.gosy-premium-agenda .gosy-agenda-dispo-details{margin:12px 0 15px!important}
body.gosy-premium-agenda .gosy-agenda-dispo-details>summary{
  display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:47px;
  padding:11px 13px;border:1px solid rgba(110,201,233,.35);border-radius:15px;
  background:linear-gradient(115deg,rgba(12,43,82,.90),rgba(34,25,76,.83));
  color:#eaf7ff;font-weight:800;cursor:pointer;list-style:none
}
body.gosy-premium-agenda .gosy-agenda-dispo-details>summary::-webkit-details-marker{display:none}
body.gosy-premium-agenda .gosy-agenda-dispo-details>summary::after{content:'Ouvrir ›';font-size:12px;color:#95e6ff;white-space:nowrap}
body.gosy-premium-agenda .gosy-agenda-dispo-details[open]>summary::after{content:'Réduire⌄'}
body.gosy-premium-agenda .gosy-agenda-dispo-details #availability{
  margin:7px 0 0!important;min-height:0!important;padding:14px!important
}

/* AGENDA — readable results list on iPhone; same links, icons and info. */
body.gosy-premium-agenda .section-head{margin:13px 0 9px!important}
body.gosy-premium-agenda .section-head h2{font-size:clamp(19px,5vw,24px)!important;margin:0 0 4px!important}
body.gosy-premium-agenda .agenda-activities{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;margin:8px 0 18px!important}
body.gosy-premium-agenda .agenda-activities .activity-card{
  width:100%!important;min-width:0!important;max-width:100%!important;
  min-height:146px!important;max-height:190px!important;
  display:grid!important;grid-template-columns:minmax(0,37%) minmax(0,1fr)!important;
  gap:0!important;border-radius:17px!important;overflow:hidden!important;
  border:1px solid color-mix(in srgb,var(--ring,#58c6ff) 64%,transparent)!important;
  box-shadow:0 7px 20px rgba(0,3,20,.29)!important
}
body.gosy-premium-agenda .agenda-activities .activity-card .card-media{
  position:relative!important;inset:auto!important;display:block!important;
  min-width:0!important;width:100%!important;height:100%!important;
  min-height:146px!important;max-height:none!important;aspect-ratio:auto!important;
  background-size:cover!important;background-position:center!important;
}
body.gosy-premium-agenda .agenda-activities .activity-card .card-body{
  position:relative!important;display:flex!important;flex-direction:column!important;
  min-height:0!important;min-width:0!important;gap:4px!important;
  padding:10px 11px!important;background:linear-gradient(160deg,#122348,#0c1731)!important
}
body.gosy-premium-agenda .agenda-activities .activity-card .card-title{
  font-size:15px!important;line-height:1.25!important;margin:0!important;
  display:-webkit-box!important;-webkit-box-orient:vertical!important;
  -webkit-line-clamp:3!important;overflow:hidden!important;
}
body.gosy-premium-agenda .agenda-activities .activity-card .meta{
  font-size:11.5px!important;line-height:1.35!important;overflow-wrap:anywhere!important;
}
body.gosy-premium-agenda .agenda-activities .activity-card .card-foot{
  margin-top:auto!important;padding:2px 0 0!important;font-size:12px!important;
}
body.gosy-premium-agenda .agenda-activities .activity-card .gosy-card-icon{
  top:5px!important;left:5px!important;width:38px!important;height:38px!important
}
body.gosy-premium-agenda .agenda-activities .activity-card .badges{
  bottom:5px!important;left:5px!important;right:5px!important;max-width:calc(100% - 10px)!important;
}
body.gosy-premium-agenda .agenda-activities .activity-card .badges .badge{
  font-size:9px!important;max-width:100%!important;padding:3px 5px!important
}
body.gosy-premium-agenda .agenda-activities .activity-card .card-media::before{
  width:65px!important;height:26px!important;border-radius:8px!important;
  background-size:calc(100% - 9px) auto,100% 100%!important;
}
@media(min-width:740px){body.gosy-premium-agenda .agenda-activities{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* PLAN / DEFI — bring actions and form forward; retain all original controls. */
body.gosy-pd .pd-shell{box-sizing:border-box;padding:18px 0 62px!important;width:min(100% - 24px,1040px)!important}
body.gosy-pd .pd-shell>.pd-kicker{margin-bottom:5px!important;font-size:11px!important}
body.gosy-pd .pd-shell>h1{font-size:clamp(27px,7vw,38px)!important;margin:0 0 7px!important}
body.gosy-pd .pd-shell>.pd-muted{margin:0 0 15px!important;font-size:13px!important;line-height:1.4!important}
body.gosy-pd .gosy-pd-primary-actions{display:grid;gap:8px;margin:10px 0 14px}
body.gosy-pd .gosy-pd-primary-actions .pd-choices{display:block!important;margin:0!important}
body.gosy-pd .gosy-pd-primary-actions .pd-choice{
  display:grid!important;grid-template-columns:43px minmax(0,1fr) 27px!important;
  grid-template-areas:'icon title arrow' 'icon desc arrow'!important;
  gap:3px 10px!important;align-items:center!important;
  padding:12px!important;min-height:82px!important;max-height:none!important;
  border-radius:17px!important;box-shadow:0 7px 22px #0005!important;
}
body.gosy-pd .gosy-pd-primary-actions .pd-choice-icon{
  grid-area:icon!important;width:42px!important;height:42px!important;
  border-radius:12px!important;font-size:22px!important
}
body.gosy-pd .gosy-pd-primary-actions .pd-choice-title{
  grid-area:title!important;font-size:clamp(15px,4.6vw,19px)!important;line-height:1.18!important;min-width:0!important;overflow-wrap:anywhere!important
}
body.gosy-pd .gosy-pd-primary-actions .pd-muted{
  grid-area:desc!important;font-size:11.7px!important;line-height:1.3!important;margin:0!important
}
body.gosy-pd .gosy-pd-primary-actions .pd-choice-arrow{
  grid-area:arrow!important;font-size:0!important;margin:0!important;align-self:center!important;
  width:27px!important;text-align:right!important;overflow:hidden!important
}
body.gosy-pd .gosy-pd-primary-actions .pd-choice-championnat .pd-choice-title{font-size:15px!important;letter-spacing:-.015em!important}
body.gosy-pd .gosy-pd-primary-actions .pd-choice-arrow::after{content:"›";font-size:27px!important;color:#aaf5ff!important}
body.gosy-pd .gp-rules,body.gosy-pd .gosy-swipe-entry{margin:10px 0!important}
body.gosy-pd .pd-account-shortcut{margin:13px 0!important;padding:13px 15px!important}

/* Dedicated Defi form: shorter hero, less quota chrome, visible first step. */
body.gosy-pd .gosy-defis-premium .gd-azur-hero{margin:9px 0 11px!important;min-height:0!important;height:auto!important;border-radius:19px!important}
body.gosy-pd .gosy-defis-premium .gd-azur-content{padding:16px!important}
body.gosy-pd .gosy-defis-premium .gd-azur-hero h1{font-size:clamp(25px,7vw,32px)!important;margin:5px 0 8px!important}
body.gosy-pd .gosy-defis-premium .gd-azur-hero p:not(.pd-kicker){font-size:12.5px!important;line-height:1.4!important;margin:0 0 9px!important}
body.gosy-pd .gosy-defis-premium .gd-azur-tags{gap:5px!important;margin:5px 0!important}
body.gosy-pd .gosy-defis-premium .gosy-hero-action{min-height:34px!important;padding:6px 10px!important;font-size:11px!important}
body.gosy-pd .pd-quotas{gap:5px!important;margin:8px 0!important}
body.gosy-pd .pd-quota{min-width:0!important;flex:0 1 auto!important;gap:2px!important;padding:6px 9px!important;border-radius:10px!important;font-size:11px!important}
body.gosy-pd .pd-quota b{font-size:15px!important}
body.gosy-pd .pd-tabs{margin:9px 0!important;padding:4px!important;border-radius:12px!important}
body.gosy-pd .pd-tabs button{min-height:41px!important;padding:7px 12px!important;font-size:12px!important}
body.gosy-pd .pd-box{margin:9px 0!important;padding:12px!important;border-radius:17px!important}
body.gosy-pd .pd-progress{gap:10px!important;margin-bottom:8px!important;font-size:12px!important}
body.gosy-pd .pd-steps{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
body.gosy-pd .pd-steps .pd-step{
  min-height:69px!important;min-width:0!important;padding:6px 3px!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;
  justify-content:center!important;gap:2px!important;text-align:center!important;border-radius:11px!important;
}
body.gosy-pd .pd-step-icon{font-size:19px!important;line-height:1.1!important}
body.gosy-pd .pd-step strong{font-size:10.7px!important;line-height:1.18!important}
body.gosy-pd .pd-steps .pd-step small{display:none!important}
body.gosy-pd .pd-editor{margin:10px 0!important}
body.gosy-pd .pd-editor fieldset{padding:11px!important;border-radius:13px!important}
body.gosy-pd .pd-editor legend{font-size:17px!important}
body.gosy-pd .pd-controls{gap:7px!important}
body.gosy-pd .pd-controls button{min-height:42px!important;padding:9px 12px!important;font-size:12px!important}

/* Creation Plan: no information removed, but main form moves closer to top. */
body.gosy-orbite-live .gosy-plan-hero{min-height:0!important;height:auto!important;margin:10px 0!important;border-radius:19px!important}
body.gosy-orbite-live .gosy-plan-hero .gp-hero-content{padding:15px!important}
body.gosy-orbite-live .gosy-plan-hero h1{font-size:clamp(25px,7vw,33px)!important;line-height:1.12!important;margin:4px 0 9px!important}
body.gosy-orbite-live .gosy-plan-hero p{font-size:12.5px!important;line-height:1.4!important;margin:0 0 10px!important}

@media(max-width:480px){
 body.gosy-premium-agenda .month-grid{gap:3px!important}
 body.gosy-premium-agenda .month-day{min-height:62px!important}
 body.gosy-pd .gosy-pd-primary-actions .pd-choice-title{font-size:17px!important}
 body.gosy-pd .pd-step strong{font-size:10px!important}
}
@media(prefers-reduced-motion:reduce){
 body.gosy-premium-agenda *,body.gosy-pd .pd-step,body.gosy-pd .pd-choice{transition:none!important;scroll-behavior:auto!important}
}

/* R2 Nov 20 — actual viewport diagnostics and regression prevention */
@media (max-width:650px){
  /* Preserve all five main tabs. The first/header account row scrolls out,
     while the navigation row remains accessible. Safari bottom chrome untouched. */
  body.gosy-premium-agenda .topbar,
  body.gosy-pd .topbar,
  body.gosy-premium-plans.gosy-orbite-live .topbar{
    position:sticky!important;top:-36px!important;
  }
  body.gosy-premium-agenda .topbar .inner,
  body.gosy-pd .topbar .inner,
  body.gosy-premium-plans.gosy-orbite-live .topbar .inner{
    padding-top:5px!important;padding-bottom:4px!important;
  }
  body.gosy-premium-agenda .month-grid .month-day{
    min-height:70px!important;padding:5px 1px!important;
  }
  body.gosy-premium-agenda .month-grid .day-number{font-size:16px!important}
  body.gosy-premium-agenda .month-grid .month-label img{width:min(100%,27px)!important;height:27px!important}
  body.gosy-premium-agenda .month-grid .activity-count{padding:3px 4px!important}
}
/* Former Championnat icon 72×72 physically overflowed the 42px grid track,
   colliding with its title and description. Stronger selector against old theme. */
body.gosy-pd .gosy-pd-primary-actions .pd-choices > .pd-choice.pd-choice-championnat > .pd-choice-icon{
  width:42px!important;height:42px!important;
  min-width:42px!important;min-height:42px!important;
  max-width:42px!important;max-height:42px!important;
  margin:0!important;padding:0!important;
  place-self:center!important;overflow:hidden!important;
  font-size:23px!important;border-radius:12px!important;
}
body.gosy-pd .gosy-pd-primary-actions .pd-choices > .pd-choice.pd-choice-championnat{
  grid-template-columns:43px minmax(0,1fr) 27px!important;
}
/* Prevent old theme rules from forcing long decorative headings to overlap icons */
body.gosy-pd .gosy-pd-primary-actions .pd-choice-title,
body.gosy-pd .gosy-pd-primary-actions .pd-muted{
  min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;
}
