/* Cookie consent: the bar across the bottom of the screen and the "Cookies" link of the footer. Uses the colour and font variables of the page it sits on, in dark and light mode.
   "Refuse all" and "Accept all" share one style on purpose: the CNIL asks that refusing be as easy and as visible as accepting. */
.ck{position:fixed;left:0;right:0;bottom:0;z-index:110;max-height:100dvh;overflow-y:auto;font:400 13px/1.45 var(--body);color:var(--text-primary);background:#1b1950;border-top:1px solid var(--line);box-shadow:0 -8px 30px rgba(4,4,26,.35);text-shadow:none;padding:9px max(24px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))}
.ck[hidden],.ck [hidden]{display:none}
html[data-theme="light"] .ck{background:#fff;box-shadow:0 -8px 30px rgba(40,30,120,.14)}
.ck :focus-visible,.ck-open:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
/* Discreet on purpose (asked by the founder): small type, low bar. Do not go below these sizes: the CNIL asks that the information stay visible and readable,
   and the two buttons stay equal. On a touch screen the buttons keep a 44px height so they are easy to tap. */
/* one line on a wide screen: the words on the left, the three choices on the right */
.ck-in{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:28px;align-items:center;max-width:1240px;margin:0 auto}
.ck-head{grid-column:1;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.ck-head h2{font:700 13px/1.3 var(--display);margin:0;max-width:none}
.ck-x{flex:none;width:44px;height:44px;margin:-8px -10px 0 0;font:400 26px/1 var(--body);color:var(--text-primary);background:none;border:0;border-radius:50%;cursor:pointer}
.ck-x:hover{background:rgba(128,128,255,.16)}
.ck-first{display:contents}
.ck-copy{grid-column:1}
.ck-text{font-size:12.5px;color:var(--text-secondary);margin:1px 0 0;max-width:none}
.ck-policy{font-size:12.5px;font-weight:600;color:var(--accent);margin-left:auto}
.ck-actions{grid-column:2;grid-row:1 / span 2;display:flex;align-items:center;gap:8px}
.ck-btn{min-height:34px;min-width:120px;font:600 13px var(--body);color:var(--text-primary);background:rgba(128,128,255,.12);border:1px solid var(--accent);border-radius:10px;padding:0 14px;white-space:nowrap;cursor:pointer;transition:background .3s var(--ease)}
.ck-btn:hover{background:rgba(128,128,255,.3)}
.ck-more{min-height:34px;font:600 12.5px var(--body);color:var(--text-secondary);background:none;border:0;padding:0 8px;text-decoration:underline;text-underline-offset:3px;white-space:nowrap;cursor:pointer}
.ck-more:hover{color:var(--text-primary)}

/* "Manage cookies": the bar grows and shows each purpose with its switch */
.ck-d .ck-head,.ck-detail{grid-column:1 / -1}
.ck-detail{max-width:760px}
.ck-item{padding:12px 0;border-top:1px solid var(--line)}
.ck-item:first-child{border-top:0;padding-top:4px}
.ck-switch{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;cursor:pointer}
.ck-name{font-weight:600}
.ck-switch input{position:absolute;opacity:0;width:1px;height:1px}
.ck-switch i{flex:none;position:relative;width:46px;height:26px;border-radius:999px;background:rgba(128,128,255,.25);border:1px solid var(--line);transition:background .25s var(--ease)}
.ck-switch i::after{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:var(--text-primary);transition:transform .25s var(--ease)}
.ck-switch input:checked+i{background:var(--grad);border-color:transparent}
.ck-switch input:checked+i::after{transform:translateX(20px);background:#fff}
.ck-switch input:focus-visible+i{outline:2px solid var(--accent);outline-offset:3px}
.ck-who{font-size:12px;color:var(--text-secondary);margin:6px 0 0;max-width:none}
.ck-who a{color:var(--accent)}
.ck-always{font-size:12px;color:var(--text-secondary);margin:0;padding-top:12px;border-top:1px solid var(--line);max-width:none}
.ck-end{display:flex;flex-wrap:wrap;align-items:center;gap:6px 18px;margin-top:14px}

/* the footer link looks like its neighbours, which are plain links */
footer .legal .ck-open{font:inherit;letter-spacing:inherit;text-transform:inherit;color:var(--text-secondary);background:none;border:0;padding:6px 0;cursor:pointer}
footer .legal .ck-open:hover{color:var(--text-primary)}
@media (pointer:coarse){footer .legal .ck-open{min-height:44px;display:inline-flex;align-items:center}}

/* the bar covers the bottom of the screen: the "Talk to Apollo or Stella" button moves up, above it */
html.ck-on .fa-launch{bottom:calc(var(--ck-h,0px) + 16px)}

/* narrower screens: the words first, then the two equal buttons side by side, then "Manage cookies" */
@media (max-width:960px){
  .ck{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
  .ck-in{grid-template-columns:minmax(0,1fr)}
  .ck-actions{grid-column:1;grid-row:auto;display:grid;grid-template-columns:1fr 1fr;gap:2px 8px;margin-top:8px}
  .ck-actions .ck-more{grid-column:1 / -1;order:3;justify-self:center}
  .ck-btn{min-width:0}
}
@media (pointer:coarse){.ck-btn,.ck-more{min-height:44px}}
@media (prefers-reduced-motion:reduce){.ck-btn,.ck-switch i,.ck-switch i::after{transition:none}}
