/* Atlantis Bento — direction « Liquid Glass » */

:root {
  --bg: #eef1f7;
  --txt: #1d1d1f;
  --txt2: #565b6b;
  --txt3: #7c8193;
  --glass: rgba(255, 255, 255, .55);
  --glass-2: rgba(255, 255, 255, .72);
  --fill: rgba(255, 255, 255, .62);
  --rim: rgba(255, 255, 255, .6);
  --rim-top: rgba(255, 255, 255, .95);
  --hair: rgba(29, 29, 31, .08);
  --shadow: 0 10px 30px rgba(30, 50, 90, .08);
  --shadow-hi: 0 24px 50px rgba(30, 50, 90, .16);
  --accent: #0066cc;
  --green: #1a7f37;
  --red: #c4001a;
  --orange: #b25000;
  --b1: #bcd7ff; --b2: #e3d4ff; --b3: #c9f0ff;
  --r: 28px;
  --gap: 20px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-std: cubic-bezier(.25, .1, .25, 1);
  color-scheme: light;
}
html.is-dark {
  --bg: #05070d;
  --txt: #f5f5f7;
  --txt2: #a9aebd;
  --txt3: #868b9a;
  --glass: rgba(40, 44, 58, .46);
  --glass-2: rgba(52, 56, 72, .7);
  --fill: rgba(255, 255, 255, .1);
  --rim: rgba(255, 255, 255, .09);
  --rim-top: rgba(255, 255, 255, .2);
  --hair: rgba(255, 255, 255, .09);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-hi: 0 24px 50px rgba(0, 0, 0, .5);
  --accent: #4aa8ff;
  --green: #30d158;
  --red: #ff6961;
  --orange: #ffb340;
  --b1: #13305e; --b2: #2e1a5a; --b3: #0b3b4f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.atl {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .6s var(--ease-std), color .6s var(--ease-std);
}
a { color: var(--accent); }
.atl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(0, 125, 250, .6); outline-offset: 3px; }

/* ---------- Fond : trois halos qui dérivent lentement ---------- */
.atl-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.atl-bg i {
  position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  filter: blur(60px); opacity: .9; transition: background-color .8s var(--ease-std);
  animation: atl-drift 46s ease-in-out infinite alternate;
}
.atl-bg i:nth-child(1) { background: var(--b1); left: -20vmax; top: -30vmax; }
.atl-bg i:nth-child(2) { background: var(--b2); right: -25vmax; top: 5vmax; animation-duration: 58s; animation-delay: -12s; }
.atl-bg i:nth-child(3) { background: var(--b3); left: 10vmax; bottom: -40vmax; animation-duration: 64s; animation-delay: -30s; }
@keyframes atl-drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(.96); }
}

/* ---------- Mise en page : pleine largeur ---------- */
.atl-wrap {
  position: relative; z-index: 1;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) max(clamp(16px, 2.6vw, 64px), env(safe-area-inset-right)) 32px max(clamp(16px, 2.6vw, 64px), env(safe-area-inset-left));
}
.atl-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.atl-date { margin: 0 0 4px; font-size: 17px; color: var(--txt2); }
.atl-hello { margin: 0; font-size: clamp(34px, 3.4vw, 52px); font-weight: 700; letter-spacing: -.028em; line-height: 1.05; }
.atl-hello-btn { all: unset; cursor: pointer; border-radius: 10px; }
.atl-hello-btn [data-name] { background: linear-gradient(90deg, var(--accent), #a35cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.atl-hello-btn:focus-visible { outline: 3px solid rgba(0, 125, 250, .6); outline-offset: 4px; }
.atl-foot { text-align: center; font-size: 12px; color: var(--txt3); margin: 30px 0 0; letter-spacing: 0; line-height: 1.7; }

.atl-grid {
  --cols: 4; --cell: 200px; --gap: 20px;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-auto-rows: var(--cell);
  grid-auto-flow: dense;
  gap: var(--gap);
}
/* Avant le premier calcul du script : rangement automatique pour éviter tout saut. */
html:not(.is-ready) .atl-grid > .atl-t[data-s="w"] { grid-column: span 2; }

/* ---------- Tuiles ---------- */
.atl-t {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  --pad: clamp(14px, calc(var(--cell, 200px) * .1), 24px);
  padding: var(--pad);
  border: 0; border-radius: var(--r);
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), var(--shadow);
  color: inherit; font: inherit; text-align: left; text-decoration: none;
  overflow: hidden;
  opacity: 0;
  transform: translateY(28px) scale(.985);
  animation: atl-rise .9s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 55ms + 80ms);
  transition: transform .5s var(--ease-std), box-shadow .5s var(--ease-std), background-color .6s var(--ease-std);
  -webkit-tap-highlight-color: transparent;
}
@keyframes atl-rise { to { opacity: 1; transform: none; } }
.atl-t.is-link { cursor: pointer; }
.atl-grid > .atl-t { -webkit-touch-callout: none; container-type: size; }
@media (hover: hover) {
  .atl-t.is-link:hover { transform: scale(1.012); box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), var(--shadow-hi); }
}
.atl-t.is-link:active { transform: scale(.985); transition-duration: .15s; }
.atl-shine {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(255, 255, 255, .38), transparent 42%);
  opacity: 0; transition: opacity .4s var(--ease-std);
}
html.is-dark .atl-shine { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -30%), rgba(255, 255, 255, .1), transparent 42%); }
@media (hover: hover) { .atl-t:hover .atl-shine { opacity: 1; } }
.atl-t > *:not(.atl-shine) { position: relative; }
.atl-t > .atl-eyebrow, .atl-t > .atl-h, .atl-t > .atl-clock, .atl-t .atl-eyebrow, .atl-open { flex-shrink: 0; }

.atl-eyebrow { margin: 0 0 8px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--txt2); }
.atl-h { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.16; }
.atl-p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; color: var(--txt2); letter-spacing: -.01em; }
.atl-muted { color: var(--txt2); }
.atl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.atl-row > :first-child { color: var(--txt2); }
.atl-row + .atl-row { border-top: 1px solid var(--hair); }
.atl-t.is-link .atl-eyebrow { padding-right: 36px; }
.atl-chev {
  position: absolute !important; right: calc(var(--pad) - 4px); top: calc(var(--pad) - 6px); width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--fill); color: var(--txt);
  transition: transform .4s var(--ease);
}
.atl-t.is-link:hover .atl-chev { transform: translateX(2px); }
.atl-spacer { flex: 1 1 auto; }
.atl-up { color: var(--green); }
.atl-down { color: var(--red); }
.atl-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 980px; background: var(--fill); letter-spacing: -.01em; }
.atl-dot { width: 8px; height: 8px; border-radius: 50%; background: #30d158; flex: 0 0 auto; }
.atl-dot.is-warn { background: #ff9f0a; }
.atl-dot.is-bad { background: #ff453a; }
.atl-stale { font-size: 11px; color: var(--txt3); margin-top: 8px; }

/* Squelettes de chargement */
.atl-sk { display: block; height: 12px; border-radius: 6px; margin: 10px 0; background: linear-gradient(90deg, var(--hair) 0%, var(--fill) 50%, var(--hair) 100%); background-size: 200% 100%; animation: atl-sk 1.4s linear infinite; }
@keyframes atl-sk { to { background-position: -200% 0; } }
.atl-fade { animation: atl-fade .6s var(--ease) both; }
@keyframes atl-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Bouton rond, fenêtre « Apparence » ---------- */
.atl-round {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--txt); background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), var(--shadow);
  transition: transform .3s var(--ease-std);
}
.atl-round:active { transform: scale(.94); }
.atl-appearance { position: relative; }
.atl-pop {
  position: absolute; right: 0; top: calc(100% + 12px); z-index: 30;
  width: 330px; max-width: calc(100vw - 32px); padding: 20px; border-radius: 24px;
  background: var(--glass-2);
  -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), var(--shadow-hi);
  transform-origin: top right;
  animation: atl-pop .35s var(--ease) both;
}
.atl-pop[hidden] { display: none; }
@keyframes atl-pop { from { opacity: 0; transform: scale(.92) translateY(-6px); } to { opacity: 1; transform: none; } }
.atl-pop-h { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
.atl-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; border-radius: 12px; background: var(--hair); }
.atl-seg button { border: 0; background: transparent; color: var(--txt); font: inherit; font-size: 14px; font-weight: 500; padding: 8px 0; border-radius: 10px; cursor: pointer; min-height: 36px; transition: background-color .3s var(--ease-std), box-shadow .3s; }
.atl-seg button[aria-checked="true"] { background: var(--glass-2); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.atl-pop-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 15px; font-weight: 500; }
.atl-pop-row small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--txt2); }
.atl-switch { position: relative; flex: 0 0 51px; width: 51px; height: 31px; border: 0; padding: 0; border-radius: 16px; background: var(--hair); cursor: pointer; transition: background-color .25s var(--ease-std); }
.atl-switch span { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .3s var(--ease); }
.atl-switch[aria-checked="true"] { background: #34c759; }
.atl-switch[aria-checked="true"] span { transform: translateX(20px); }
.atl-pop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.atl-chip { border: 0; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; color: var(--txt); text-align: left; padding: 10px 12px; min-height: 40px; border-radius: 12px; background: var(--fill); transition: box-shadow .25s, background-color .25s; }
.atl-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }
.atl-pop-lock { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hair); font-size: 15px; text-decoration: none; }

/* ---------- Fenêtre de détail (agrandie depuis la tuile) ---------- */
.atl-sheet-root { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; }
.atl-sheet-root[hidden] { display: none; }
.atl-sheet-veil { position: absolute; inset: 0; background: rgba(10, 14, 28, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.atl-sheet {
  position: relative; width: min(720px, 100%); max-height: min(84vh, 900px); overflow: auto; overscroll-behavior: contain;
  padding: 32px 32px 28px; border-radius: 32px; outline: none;
  background: var(--glass-2);
  -webkit-backdrop-filter: blur(50px) saturate(180%); backdrop-filter: blur(50px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), 0 40px 80px rgba(10, 20, 50, .3);
}
.atl-sheet-x { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; }
.atl-sheet-title { margin: 0 44px 18px 0; font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; }
.atl-sheet-body { font-size: 15px; }
.atl-sheet-body h3 { margin: 22px 0 8px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--txt2); }
.atl-list { list-style: none; margin: 0; padding: 0; }
.atl-list li { padding: 12px 0; border-top: 1px solid var(--hair); display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
.atl-list li:first-child { border-top: 0; }
.atl-list a { text-decoration: none; color: inherit; }
.atl-list small { color: var(--txt2); font-size: 13px; white-space: nowrap; }
.atl-cols { columns: 2 240px; column-gap: 28px; font-size: 14px; }
.atl-cols li { break-inside: avoid; border: 0; padding: 4px 0; display: block; }
.atl-note { font-size: 12px; color: var(--txt3); margin-top: 18px; }

/* ---------- Connexion ---------- */
.atl-login { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.atl-login-form { width: min(340px, 100%); }
.atl-login-field {
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 22px; border-radius: 980px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), var(--shadow);
  animation: atl-rise .9s var(--ease) both; opacity: 0; transform: translateY(16px);
}
.atl-login-field input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; color: var(--txt); font: inherit; font-size: 17px; outline: none; letter-spacing: .02em; }
.atl-login-field input::placeholder { color: var(--txt3); letter-spacing: -.01em; }
.atl-login-field:focus-within { box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), 0 0 0 4px rgba(0, 125, 250, .3), var(--shadow); }
.atl-login-go { flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; background: var(--txt); color: var(--bg); transition: transform .25s var(--ease-std), opacity .25s; }
.atl-login-go:active { transform: scale(.92); }
.atl-login-go:disabled, .atl-login-field input:disabled { opacity: .4; cursor: not-allowed; }
.atl-login-msg { min-height: 20px; margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--red); }
.atl-login-form.is-error .atl-login-field { animation: atl-rise .01s both, atl-shake .5s var(--ease-std) .05s; }
@keyframes atl-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-10px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }

/* ---------- Thème saisonnier : calque des particules ---------- */
.atl-season { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 20; pointer-events: none; }

/* ---------- Formats ---------- */
@media (max-width: 734px) {
  :root { --r: 24px; }
  .atl-wrap { padding-top: max(24px, env(safe-area-inset-top)); }
  .atl-h { font-size: 19px; }
  .atl-top { align-items: flex-start; flex-direction: column; }
  .atl-pills { align-self: stretch; justify-content: flex-end; }
  .atl-sheet-root { align-items: flex-end; padding: 0; }
  .atl-sheet { border-radius: 28px 28px 0 0; max-height: 88vh; padding: 28px 22px calc(24px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .atl-t, .atl-login-field, .atl-pop, .atl-fade { animation: none !important; opacity: 1; transform: none; }
  .atl-bg i { animation: none; }
  .atl-sk { animation: none; }
}
@media print { .atl-bg, .atl-season, .atl-pills { display: none; } }

/* ---------- Pastilles de l'en-tête : mode, thème, crayon ---------- */
.atl-pills { display: flex; gap: 10px; align-items: center; position: relative; }
.atl-pill-wrap { position: relative; }
.atl-round svg { pointer-events: none; }
.atl-round[aria-pressed="true"], .atl-round[aria-expanded="true"] { background: var(--txt); color: var(--bg); }
.atl-pen-done { display: none; font-size: 15px; font-weight: 600; }
html.is-editing #atl-pen { width: auto; padding: 0 18px; border-radius: 22px; background: var(--accent); color: #fff; }
html.is-editing #atl-pen svg { display: none; }
html.is-editing #atl-pen .atl-pen-done { display: inline; }
.atl-pop-list { display: grid; gap: 4px; }
.atl-opt { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--txt); font: inherit; font-size: 15px; font-weight: 500; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer; min-height: 44px; }
.atl-opt:hover { background: var(--fill); }
.atl-opt svg { flex: 0 0 auto; }
.atl-opt::after { content: ""; margin-left: auto; width: 18px; height: 18px; }
.atl-opt[aria-checked="true"]::after { background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; color: var(--accent); }
.atl-pop-sm { width: 240px; padding: 10px; }
.atl-pop-name { left: 0; right: auto; top: calc(100% + 12px); transform-origin: top left; width: 320px; }
.atl-tip { width: 300px; overflow: visible; }
.atl-tip::before { content: ""; position: absolute; top: -7px; right: 18px; width: 14px; height: 14px; transform: rotate(45deg); border-radius: 3px 0 0 0;
  background: var(--glass-2); box-shadow: inset 1px 1px 0 var(--rim); }
.atl-tip-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }
.atl-tip-step { margin-right: auto; font-size: 12px; color: var(--txt2); }
.atl-round.is-hint { box-shadow: inset 0 1px 0 var(--rim-top), 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow); }
.atl-pop-name form { display: flex; gap: 8px; margin-top: 10px; }
.atl-pop-name input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 0; background: var(--fill); color: var(--txt); font: inherit; font-size: 17px; box-shadow: inset 0 0 0 1px var(--hair); }
.atl-pop-name input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.atl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border: 0; border-radius: 980px; background: var(--accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .2s var(--ease-std), filter .2s; }
.atl-btn:active { transform: scale(.96); }
.atl-btn.is-ghost { background: var(--fill); color: var(--txt); }
.atl-btn.is-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.atl-btn:disabled { opacity: .5; }
.atl-pop-lock { color: var(--red); }

/* ---------- Mode édition ---------- */
.atl-editbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: -8px 0 18px; padding: 12px 14px 12px 20px; border-radius: 22px; background: var(--glass); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), var(--shadow); font-size: 14px; color: var(--txt2); animation: atl-pop .35s var(--ease) both; }
.atl-editbar[hidden] { display: none; }
.atl-editbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
html.is-editing .atl-grid > .atl-t { -webkit-user-drag: none; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; animation: atl-rise .01s both, atl-jiggle .32s ease-in-out infinite alternate; animation-delay: 0s, calc(var(--j, 0) * -80ms); }
html.is-editing .atl-grid > .atl-t > *:not(.atl-sizes):not(.atl-shine) { pointer-events: none; }
html.is-editing .atl-grid > .atl-t.is-dragging { cursor: grabbing; z-index: 30; animation: none; box-shadow: inset 0 1px 0 var(--rim-top), inset 0 0 0 1px var(--rim), 0 30px 60px rgba(0, 0, 0, .28); opacity: .96; }
@keyframes atl-jiggle { from { rotate: -.45deg; } to { rotate: .45deg; } }
.atl-sizes { position: absolute !important; z-index: 5; left: 50%; bottom: 10px; translate: -50% 0; display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--glass-2); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 6px 20px rgba(0, 0, 0, .18), inset 0 0 0 1px var(--rim); animation: atl-pop .3s var(--ease) both; }
.atl-sizes button { width: 34px; height: 30px; border: 0; border-radius: 11px; background: transparent; color: var(--txt); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.atl-sizes button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.atl-sizes button[aria-checked="true"] { background: var(--accent); color: #fff; }
.atl-sizes button[aria-checked="true"] svg { fill: currentColor; fill-opacity: .25; }

/* ---------- Notification ---------- */
.atl-toast { position: fixed; z-index: 60; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); translate: -50% 20px; opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 980px; background: var(--txt); color: var(--bg); font-size: 15px; font-weight: 500; box-shadow: var(--shadow-hi); transition: opacity .3s var(--ease-std), translate .45s var(--ease); }
.atl-toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Fenêtre : bouton retour des sous-pages ---------- */
.atl-sheet-back { position: absolute; left: 18px; top: 18px; height: 34px; padding: 0 14px 0 10px; border-radius: 17px; border: 0; background: var(--fill); color: var(--accent); font: inherit; font-size: 15px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.atl-sheet-back[hidden] { display: none; }
.atl-sheet-back:not([hidden]) ~ .atl-sheet-title { margin-top: 44px; }

/* ---------- Habillage des outils noixdecitron (variables lues dans leur Shadow DOM) ---------- */
html { --atl-t-bg: rgba(255,255,255,.5); --atl-t-soft: rgba(255,255,255,.42); --atl-t-card: rgba(255,255,255,.62); --atl-t-border: rgba(29,29,31,.1); --atl-t-txt: #1d1d1f; --atl-t-txt2: #3a3f4b; --atl-t-dim: #5d6274; --atl-t-accent: #0071e3; --atl-t-accent2: #2997ff; --atl-t-ink: #ffffff; --atl-t-pop: rgba(255,255,255,.96); --atl-t-rimtop: rgba(255,255,255,.9); --atl-t-rim: rgba(255,255,255,.55); --atl-t-shadow: 0 10px 40px -12px rgba(30,40,80,.22); --atl-t-stage: radial-gradient(120% 120% at 50% 0%, rgba(0,113,227,.16) 0%, rgba(255,255,255,.7) 65%); }
html.is-dark { --atl-t-bg: rgba(40,44,58,.46); --atl-t-soft: rgba(255,255,255,.04); --atl-t-card: rgba(255,255,255,.07); --atl-t-border: rgba(255,255,255,.1); --atl-t-txt: #f5f5f7; --atl-t-txt2: #d4d7de; --atl-t-dim: #a9aebd; --atl-t-accent: #2997ff; --atl-t-accent2: #6cb6ff; --atl-t-ink: #05070d; --atl-t-pop: rgba(30,33,45,.97); --atl-t-rimtop: rgba(255,255,255,.14); --atl-t-rim: rgba(255,255,255,.08); --atl-t-shadow: 0 16px 50px -16px rgba(0,0,0,.6); --atl-t-stage: radial-gradient(120% 120% at 50% 0%, rgba(41,151,255,.22) 0%, rgba(20,26,40,.75) 70%); }
