/* Accueil GHE uniquement : recto Aujourd'hui / Demain, verso semaine en cours.
   Les fonds des dates sont neutres ; les badges de shifts conservent leur couleur.
   Ni carte du profil, ni calendrier du mois, ni autres agendas ne sont modifiés. */
.ghe-weekflip-stage{
  position:relative;
  box-sizing:border-box;
  width:100%;min-width:0;margin:0 auto 12px;
  perspective:1400px;isolation:isolate;
}
.ghe-weekflip-track{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  width:100%;min-width:0;transform-style:preserve-3d;
  transition:transform .6s cubic-bezier(.22,.74,.2,1),height .28s ease;
}
.ghe-weekflip-stage[data-side="back"] .ghe-weekflip-track{transform:rotateY(180deg)}
.ghe-weekflip-face{
  grid-row:1;grid-column:1;
  box-sizing:border-box!important;width:100%;min-width:0;
  min-height:170px;margin:0!important;padding:10px 9px 12px!important;
  backface-visibility:hidden!important;-webkit-backface-visibility:hidden!important;
  transform-style:preserve-3d;
  display:flex!important;flex-direction:column!important;gap:10px!important;
  align-items:stretch!important;
  border:1px solid rgba(47,119,145,.18)!important;
  border-radius:22px!important;
  background:linear-gradient(150deg,#fff,#f8fafb)!important;
  box-shadow:0 12px 30px rgba(20,69,89,.1),inset 0 1px 0 #fff!important;
  overflow:hidden!important;
}
.ghe-weekflip-front{transform:rotateY(0)}
.ghe-weekflip-back{transform:rotateY(180deg);padding:14px 10px 12px!important}
.ghe-weekflip-front>.hc-days-grid{width:100%;min-width:0;margin:0!important}
.ghe-weekflip-turn{
  box-sizing:border-box!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  gap:10px!important;align-self:center!important;
  min-height:36px!important;padding:7px 16px!important;margin:2px auto 0!important;
  border:1px solid #ccdce2!important;border-radius:999px!important;
  background:linear-gradient(180deg,#fff,#f1f6f7)!important;
  color:#335b6a!important;font:900 .76rem/1.12 system-ui,sans-serif!important;
  box-shadow:0 3px 8px rgba(16,77,96,.06)!important;
  cursor:pointer;touch-action:manipulation;
}
.ghe-weekflip-turn>span{font-size:1.2rem}
.ghe-weekflip-turn:focus-visible,.ghe-weekflip-day:focus-visible{
  outline:3px solid #168da8!important;outline-offset:2px!important;
}
.ghe-weekflip-back-header{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:4px 8px;padding:0 2px!important;
}
.ghe-weekflip-back-header strong{
  font:950 .86rem/1.15 system-ui,sans-serif;color:#244a59;letter-spacing:.035em;
}
.ghe-weekflip-back-header small{
  font:800 .69rem/1.15 system-ui,sans-serif;color:#617c86;
}
.ghe-weekflip-workdays,.ghe-weekflip-weekend{
  box-sizing:border-box!important;display:grid!important;align-items:stretch!important;
  width:100%;min-width:0;margin:0!important;padding:0!important;
}
.ghe-weekflip-workdays{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:5px!important;
}
.ghe-weekflip-weekend{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
.ghe-weekflip-day.stip-week-day{
  --weekflip-marker:#bdcdd4;
  box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;
  width:100%!important;min-width:0!important;min-height:112px!important;
  height:100%!important;padding:0!important;margin:0!important;
  overflow:hidden!important;
  border:1px solid #cfdde2!important;border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 3px 7px rgba(27,71,88,.06)!important;
  text-align:center!important;cursor:pointer!important;transform:none!important;
}
.ghe-weekflip-day.code-m{--weekflip-marker:var(--stip-shift-m,#1784ec)}
.ghe-weekflip-day.code-j{--weekflip-marker:var(--stip-shift-j,#00ab68)}
.ghe-weekflip-day.code-j4{--weekflip-marker:var(--stip-shift-j4,#ff9600)}
.ghe-weekflip-day.code-s{--weekflip-marker:var(--stip-shift-s,#f4cb00)}
.ghe-weekflip-day.code-n{--weekflip-marker:var(--stip-shift-n,#202830)}
.ghe-weekflip-day.selected{
  outline:2px solid #28798d!important;outline-offset:1px!important;
}
.ghe-weekflip-day.today{
  box-shadow:0 0 0 2px #1e849c16,0 3px 8px #14587014!important;
}
.ghe-weekflip-day-head{
  box-sizing:border-box!important;
  display:flex!important;flex-flow:column nowrap!important;
  align-items:center!important;justify-content:center!important;
  flex:0 0 48px!important;min-height:48px!important;
  gap:2px!important;width:100%!important;
  margin:0!important;padding:5px 0!important;
  background:#f1f5f6!important;color:#30515f!important;
  border-bottom:3px solid color-mix(in srgb,var(--weekflip-marker) 48%,#dae4e8)!important;
}
.ghe-weekflip-day.today .ghe-weekflip-day-head{
  background:#e9f1f3!important;
}
.ghe-weekflip-day.code-s .ghe-weekflip-day-head{color:#30515f!important}
.ghe-weekflip-day-head small{
  font:900 .63rem/1 system-ui,sans-serif!important;letter-spacing:.02em!important;
}
.ghe-weekflip-day-head b{font:950 1.08rem/1 system-ui,sans-serif!important}
.ghe-weekflip-day-body{
  box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:flex-start!important;
  gap:0!important;width:100%!important;min-width:0!important;
  flex:1 0 auto!important;padding:9px 1px 7px!important;
  background:#fff!important;
}
.ghe-weekflip-shift{
  box-sizing:border-box!important;
  display:grid!important;place-items:center!important;
  flex:0 0 28px!important;
  width:100%!important;min-width:0!important;min-height:28px!important;
  margin:0!important;padding:0!important;
}
/* Memes badges que le calendrier mensuel ; geometry locale au verso. */
.ghe-weekflip-shift .stip-month-shift-badge{
  --stip-month-shift-bg:var(--stip-accent,#628293);
  --stip-month-shift-ink:#fff;
  box-sizing:border-box!important;
  min-width:28px!important;height:27px!important;
  display:inline-grid!important;place-items:center!important;
  padding:0 5px!important;
  border:1px solid color-mix(in srgb,var(--stip-month-shift-bg) 68%,#fff)!important;
  border-radius:10px!important;
  background:var(--stip-month-shift-bg)!important;
  color:var(--stip-month-shift-ink)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28),0 3px 7px color-mix(in srgb,var(--stip-month-shift-bg) 17%,transparent)!important;
  font:950 .69rem/1 system-ui,sans-serif!important;white-space:nowrap!important;
}
.ghe-weekflip-shift .code-m{--stip-month-shift-bg:var(--stip-shift-m,#1784ec)}
.ghe-weekflip-shift .code-j{--stip-month-shift-bg:var(--stip-shift-j,#00ab68)}
.ghe-weekflip-shift .code-j4{--stip-month-shift-bg:var(--stip-shift-j4,#ff9600)}
.ghe-weekflip-shift .code-s{
  --stip-month-shift-bg:var(--stip-shift-s,#f4cb00);
  --stip-month-shift-ink:#332b00;
}
.ghe-weekflip-shift .code-n{--stip-month-shift-bg:var(--stip-shift-n,#202830)}
.ghe-weekflip-rest-code{
  display:block!important;font:950 .85rem/1 system-ui,sans-serif!important;color:#425f6c;
}
/* L'icone de repos n'existe pas sur ce verso : seules les marques
   de rendez-vous/loisirs sont visibles sous le code du shift. */
.ghe-weekflip-day .stip-week-events{
  box-sizing:border-box!important;
  display:flex!important;flex-flow:column nowrap!important;
  align-items:center!important;justify-content:flex-start!important;
  align-self:center!important;
  gap:5px!important;flex:0 0 auto!important;
  width:100%!important;height:auto!important;min-height:0!important;
  margin:7px auto 0!important;padding:0!important;
  overflow:visible!important;
}
.ghe-weekflip-day .stip-week-events.is-empty{visibility:hidden!important}
.ghe-weekflip-day .stip-week-event{
  display:grid!important;place-items:center!important;align-self:center!important;
  flex:0 0 23px!important;min-width:23px!important;min-height:23px!important;
  width:23px!important;height:23px!important;
  margin:0 auto!important;padding:0!important;
  font-size:1.2rem!important;line-height:1!important;
}
.ghe-weekflip-day .hc-rolling-event-overflow{
  margin:0!important;font-size:.62rem!important;
}
.ghe-weekflip-return{margin-top:3px!important}
.ghe-weekflip-unavailable{
  color:#4e7381;font:800 .8rem/1.4 system-ui,sans-serif;text-align:center;
}
@media(max-width:390px){
  .ghe-weekflip-back{padding-inline:7px!important}
  .ghe-weekflip-workdays{gap:3px!important}
  .ghe-weekflip-weekend{gap:5px!important}
  .ghe-weekflip-day-head small{font-size:.58rem!important}
  .ghe-weekflip-day-head b{font-size:1rem!important}
}
@media(prefers-reduced-motion:reduce){.ghe-weekflip-track{transition:none!important}}

/* Complément : teintes liées au code de shift, sans aplats bleus uniformes.
   Les deux faces se partagent une seule rangée CSS Grid, hauteur intrinsèque
   égale au maximum de leurs contenus (même pendant le retournement). */
.ghe-weekflip-track{
  height:auto!important;
  grid-template-rows:auto!important;
  align-items:stretch!important;
}
.ghe-weekflip-face{align-self:stretch!important;}
.ghe-weekflip-day.stip-week-day.work{
  border-color:color-mix(in srgb,var(--weekflip-marker) 67%,#d4e1e4)!important;
  box-shadow:0 3px 9px color-mix(in srgb,var(--weekflip-marker) 13%,transparent)!important;
}
.ghe-weekflip-day.work .ghe-weekflip-day-head{
  background:color-mix(in srgb,var(--weekflip-marker) 17%,white)!important;
  border-bottom-color:color-mix(in srgb,var(--weekflip-marker) 80%,#cbdde2)!important;
  color:#253d49!important;
}
.ghe-weekflip-day.work .ghe-weekflip-day-body{
  background:color-mix(in srgb,var(--weekflip-marker) 5%,white)!important;
}
.ghe-weekflip-day.today.work .ghe-weekflip-day-head{
  background:color-mix(in srgb,var(--weekflip-marker) 23%,white)!important;
}
/* Lundi suivant : une ligne premium, discrète, sans appel à l'action redondant.
   Le badge garde sa teinte de service et toute la ligne reste cliquable. */
.ghe-weekflip-monday-preview.stip-week-day{
  --weekflip-marker:#a6b9c2;
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  column-gap:9px!important;row-gap:0!important;
  flex:0 0 auto!important;
  width:100%!important;min-width:0!important;
  min-height:51px!important;height:auto!important;
  margin:0!important;padding:7px 12px!important;
  border:1px solid color-mix(in srgb,var(--weekflip-marker) 29%,#cddfe5)!important;
  border-left:2px solid color-mix(in srgb,var(--weekflip-marker) 60%,#cddfe5)!important;
  border-radius:12px!important;
  background:linear-gradient(95deg,color-mix(in srgb,var(--weekflip-marker) 6%,white),#ffffff 76%)!important;
  box-shadow:0 2px 8px #22485e0b!important;
  color:#254958!important;
  text-align:left!important;
  cursor:pointer!important;
  touch-action:manipulation;
  transform:none!important;
}
.ghe-weekflip-monday-preview.code-m{--weekflip-marker:var(--stip-shift-m,#1784ec)}
.ghe-weekflip-monday-preview.code-j{--weekflip-marker:var(--stip-shift-j,#00ab68)}
.ghe-weekflip-monday-preview.code-j4{--weekflip-marker:var(--stip-shift-j4,#ff9600)}
.ghe-weekflip-monday-preview.code-s{--weekflip-marker:var(--stip-shift-s,#f4cb00)}
.ghe-weekflip-monday-preview.code-n{--weekflip-marker:var(--stip-shift-n,#202830)}
.ghe-weekflip-monday-preview-copy{
  min-width:0!important;
  display:flex!important;align-items:center!important;justify-content:flex-start!important;
  gap:0!important;
}
.ghe-weekflip-monday-preview-copy strong{
  min-width:0;white-space:nowrap;
  color:#25485a!important;
  font:850 clamp(.79rem,2.8vw,.94rem)/1.15 system-ui,sans-serif!important;
  letter-spacing:-.025em!important;
  text-transform:capitalize!important;
}
.ghe-weekflip-monday-preview-schedule{
  display:inline-flex!important;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:8px!important;min-width:0!important;
}
.ghe-weekflip-monday-preview-schedule .ghe-weekflip-shift{
  width:auto!important;min-width:30px!important;
  min-height:30px!important;flex:0 0 auto!important;
}
.ghe-weekflip-monday-preview-schedule .ghe-weekflip-shift .stip-month-shift-badge{
  height:30px!important;min-width:30px!important;
  border-radius:9px!important;
  font-size:.76rem!important;
}
.ghe-weekflip-preview-time{
  font:850 clamp(.69rem,2.35vw,.82rem)/1.15 system-ui,sans-serif!important;
  letter-spacing:-.018em;color:#305970!important;
  white-space:nowrap!important;
}
.ghe-weekflip-preview-time-note{
  max-width:128px;
  font:750 clamp(.65rem,2.1vw,.74rem)/1.2 system-ui,sans-serif!important;
  color:#627f8c!important;text-align:right!important;
}
.ghe-weekflip-monday-preview:disabled{opacity:.7;cursor:default!important}

/* CTA principal validé : plus explicite, visible, relief maîtrisé.
   Exclusivement sur la face Aujourd'hui / Demain. */
.ghe-weekflip-front>.ghe-weekflip-turn{
  position:relative;isolation:isolate;overflow:hidden;
  width:calc(100% - 22px)!important;max-width:465px!important;
  min-height:54px!important;margin:10px auto 2px!important;
  padding:12px 15px!important;
  display:flex!important;gap:10px!important;
  border:1px solid #80adeb!important;border-radius:17px!important;
  background:linear-gradient(115deg,#116fc9 0%,#226bd6 55%,#546bd0 100%)!important;
  box-shadow:0 5px 14px #2059a62f,inset 0 1px 0 #ffffff86!important;
  color:white!important;font:900 clamp(.98rem,3.65vw,1.18rem)/1.18 system-ui,sans-serif!important;
  letter-spacing:-.018em;text-shadow:0 1px 2px #082b6342;
  transition:transform .15s ease,box-shadow .15s ease;
}
.ghe-weekflip-front>.ghe-weekflip-turn::before{
  content:"";position:absolute;inset:0 0 57% 0;z-index:-1;
  background:linear-gradient(180deg,#ffffff24,#ffffff00);pointer-events:none;
}
.ghe-weekflip-front>.ghe-weekflip-turn .ghe-weekflip-turn-icon{
  font-size:1.2em;line-height:1;
}
.ghe-weekflip-front>.ghe-weekflip-turn .ghe-weekflip-turn-chevron{
  font-size:1.6em;line-height:.6;margin-left:auto;opacity:.95;font-weight:500;
}
.ghe-weekflip-front>.ghe-weekflip-turn:active{
  transform:translateY(1px) scale(.99);
  box-shadow:0 3px 7px #215ed133,0 1px 0 #fff8 inset!important;
}
.ghe-weekflip-front>.ghe-weekflip-turn:focus-visible{
  outline:3px solid #2054b2!important;outline-offset:5px!important;
}
@media(max-width:375px){
  .ghe-weekflip-front>.ghe-weekflip-turn{padding:11px!important;font-size:.9rem!important;gap:7px!important}
}
@media(prefers-reduced-motion:reduce){.ghe-weekflip-front>.ghe-weekflip-turn{transition:none}}

/* Repère léger : la ligne du lundi suffit à elle-même. */
.ghe-weekflip-next-divider{
  display:flex;align-items:center;gap:10px;
  margin:11px 2px 4px;
  color:#78909a;font-size:.6rem;font-weight:800;
  letter-spacing:.09em;line-height:1.15;
}
.ghe-weekflip-next-divider::before,
.ghe-weekflip-next-divider::after{
  content:"";height:1px;flex:1;
  background:linear-gradient(90deg,transparent,#cbdde4);
}
.ghe-weekflip-next-divider::after{
  background:linear-gradient(90deg,#cbdde4,transparent);
}
.ghe-weekflip-monday-preview.stip-week-day:focus-visible{
  outline:2px solid #0a7890!important;outline-offset:3px!important;
}
@media(max-width:390px){
  .ghe-weekflip-monday-preview.stip-week-day{
    grid-template-columns:minmax(0,1fr) auto!important;
    min-height:49px!important;padding:7px 9px!important;
    column-gap:5px!important;
  }
  .ghe-weekflip-monday-preview-copy strong{font-size:.78rem!important}
  .ghe-weekflip-monday-preview-schedule{gap:5px!important}
  .ghe-weekflip-preview-time{font-size:.69rem!important}
}
