/* =====================================================================
   KCK-IT Desk 6 — « Vivant », façon iPhone
   Couleur d'accentuation, Night Shift, taille du texte, densité,
   réduire la transparence / les animations, reflets Liquid Glass,
   transition « zoom », gestes de Mail, widgets de l'accueil,
   graphiques façon Santé, écran Apparence.
   ===================================================================== */

/* ---------- Couleur d'accentuation (couleurs système d'iOS) ---------- */
:root[data-accent="indigo"] { --accent: var(--indigo); }
:root[data-accent="purple"] { --accent: var(--purple); }
:root[data-accent="pink"] { --accent: var(--pink); }
:root[data-accent="orange"] { --accent: var(--orange); }
:root[data-accent="green"] { --accent: var(--green); }
:root { --bg-a: color-mix(in srgb, var(--accent) 42%, transparent); }
:root[data-theme="light"] { --bg-a: color-mix(in srgb, var(--accent) 20%, transparent); }
.brand-logo {
    background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 78%, white), color-mix(in srgb, var(--accent) 80%, var(--indigo)));
    box-shadow: 0 8px 20px -6px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* ---------- Réduire la transparence ---------- */
:root[data-glass="solid"] { --glass: #15161B; --glass-2: #1C1D23; --glass-3: #26272E; --glass-strong: #15161B; --blur: none; }
:root[data-glass="solid"][data-theme="light"] { --glass: #FFFFFF; --glass-2: #FFFFFF; --glass-3: #F4F5F8; --glass-strong: #FFFFFF; }
:root[data-glass="solid"] body::before { opacity: .45; }

/* ---------- Affichage compact ---------- */
:root[data-density="compact"] .row { min-height: 52px; padding-block: 7px; }
:root[data-density="compact"] .row--tall { min-height: 60px; }
:root[data-density="compact"] .card { padding: 15px; }
:root[data-density="compact"] .card--flush { padding: 0; }
:root[data-density="compact"] .set-row { min-height: 48px; padding-block: 9px; }
:root[data-density="compact"] .kpi { padding: 12px 14px 11px; }
:root[data-density="compact"] .stack { gap: 12px; }
:root[data-density="compact"] .section { margin-top: 20px; }
:root[data-density="compact"] .hero { padding-bottom: 14px; }
:root[data-density="compact"] .slot { padding-block: 10px; }

/* ---------- Taille du texte (le contenu des pages, comme « Zoom de l'affichage ») ---------- */
.stage { zoom: var(--zoom, 1); }
.stage .page { min-height: calc(100dvh / var(--zoom, 1)); }
@media (max-width: 640px) { .stage { zoom: min(var(--zoom, 1), 1.1); } }

/* ---------- Night Shift : teinte chaude le soir ---------- */
body::after {
    content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity 1.4s ease;
    background: rgb(255 140 40 / calc(.08 + var(--warmth, .5) * .24)); mix-blend-mode: multiply;
}
:root[data-warm] body::after { opacity: 1; }

/* ---------- Réduire les animations (réglage du Desk, en plus de celui de l'appareil) ---------- */
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
}
:root[data-motion="reduce"] .live-dot { animation: none; }

/* ---------- Reflets « Liquid Glass » : la lumière suit la souris ---------- */
.list { position: relative; }
@media (hover: hover) and (pointer: fine) {
    :is(.card, .list, .kpi, .widget, .slot)::after {
        content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s ease;
        padding: 1px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
        background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), rgba(255, 255, 255, .12) 45%, transparent 70%);
    }
    :root[data-theme="light"] :is(.card, .list, .kpi, .widget, .slot)::after { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 1), rgba(255, 255, 255, .4) 45%, transparent 70%); }
    :is(.card, .list, .widget).is-lit { background-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .045), transparent 55%); }
    :root[data-theme="light"] :is(.card, .list, .widget).is-lit { background-image: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 55%); }
    .is-lit::after { opacity: 1; }
    :root[data-glass="solid"] :is(.card, .list, .kpi, .widget, .slot)::after { display: none; }
}

/* ---------- Transition « zoom » (iOS) ---------- */
.page.zoom-under { animation: zoom-under .5s var(--ease) both; }
@keyframes zoom-under { to { transform: scale(.94); opacity: 0; filter: brightness(.7); } }
.page.is-zooming { will-change: transform, clip-path; z-index: 3; }

/* ---------- Gestes : glisser une ligne (Mail) ---------- */
.row[data-swipe] { touch-action: pan-y; }
li.is-swiping, li.is-swiped { position: relative; overflow: hidden; }
:root { --row-solid: #14151A; }
:root[data-theme="light"] { --row-solid: #FFFFFF; }
li.is-swiping > .row, li.is-swiped > .row { position: relative; z-index: 1; background: var(--row-solid); }
li.is-swiped > .row { transition: transform .45s var(--spring-soft); }
.swipe-acts { position: absolute; top: 0; bottom: 0; display: flex; z-index: 0; overflow: hidden; }
.swipe-acts--lead { left: 0; flex-direction: row; }
.swipe-acts--trail { right: 0; flex-direction: row-reverse; }
.swipe-act {
    --c: var(--accent); min-width: 84px; flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; padding: 0 14px; background: var(--c); color: #fff; font-size: 12.5px; font-weight: 650; letter-spacing: -.01em;
    transition: flex-grow .3s var(--spring);
}
.swipe-act .i { width: 22px; height: 22px; transition: transform .35s var(--spring-bounce); }
.swipe-acts.is-full .swipe-act:first-child { flex-grow: 9; }
.swipe-acts.is-full .swipe-act:first-child .i { transform: scale(1.18); }
.swipe-acts--lead.is-full .swipe-act:first-child { justify-content: center; align-items: flex-end; padding-right: 26px; }
.swipe-acts--trail.is-full .swipe-act:first-child { align-items: flex-start; padding-left: 26px; }
.swipe-act--green { --c: var(--green); } .swipe-act--blue { --c: var(--blue); } .swipe-act--orange { --c: var(--orange); }
.swipe-act--purple { --c: var(--purple); } .swipe-act--gray { --c: #8E8E93; } .swipe-act--teal { --c: var(--teal); }

/* ---------- Récompenses : « Terminé » et paiement reçu ---------- */
.reward-check {
    position: fixed; z-index: 260; left: 50%; top: 42%; width: 156px; height: 156px; margin: -78px 0 0 -78px; border-radius: 34px;
    display: grid; place-items: center; align-content: center; gap: 8px; pointer-events: none;
    background: var(--glass-strong); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
    box-shadow: var(--shadow-pop); color: var(--ink); animation: hud-in .5s var(--spring) both, hud-out .35s ease 1.05s forwards;
}
.reward-check svg { width: 74px; height: 74px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.reward-check circle { stroke: var(--green); stroke-width: 3.2; stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .55s .08s var(--ease) forwards; transform: rotate(-90deg); transform-origin: center; }
.reward-check path { stroke: var(--green); stroke-width: 4.2; stroke-dasharray: 34; stroke-dashoffset: 34; animation: draw .34s .45s var(--ease) forwards; }
.reward-check span { font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes hud-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes hud-out { to { opacity: 0; transform: scale(.92); } }
.reward-money {
    position: fixed; z-index: 260; left: 50%; top: calc(64px + var(--safe-t)); transform: translateX(-50%); pointer-events: none;
    display: flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; border-radius: 999px;
    background: var(--glass-strong); -webkit-backdrop-filter: blur(40px) saturate(180%); backdrop-filter: blur(40px) saturate(180%);
    box-shadow: var(--shadow-pop); animation: money-in .55s var(--spring) both, money-out .4s ease 1.9s forwards;
}
.reward-money .coin { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 30%, #6CF08E, var(--green)); box-shadow: 0 6px 16px -6px var(--green); animation: coin-spin .9s var(--ease) both; }
.reward-money .coin .i { width: 18px; height: 18px; stroke-width: 2.4; }
.reward-money b { font-size: 21px; font-weight: 750; letter-spacing: -.02em; color: var(--green); font-variant-numeric: tabular-nums; }
.reward-money small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; }
@keyframes money-in { from { opacity: 0; transform: translate(-50%, -16px) scale(.86); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes money-out { to { opacity: 0; transform: translate(-50%, -10px) scale(.96); } }
@keyframes coin-spin { from { transform: rotateY(0) scale(.6); } to { transform: rotateY(360deg) scale(1); } }

/* Bouton « Annuler » dans l'île */
.toast.has-action { pointer-events: auto; }
.toast-act { margin-left: 6px; border: 0; padding: 6px 12px; border-radius: 999px; background: var(--fill); color: var(--accent); font-weight: 700; font-size: 13.5px; }
.toast-act:active { transform: scale(.95); }

/* =====================================================================
   Accueil : widgets (À suivre, Météo) et frise de la journée
   ===================================================================== */
.widgets { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.widgets.is-single { grid-template-columns: minmax(0, 1fr); }
.widget {
    position: relative; overflow: hidden; border-radius: 26px; padding: 18px 20px; min-height: 172px; color: inherit;
    background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow);
}
.widget-eyebrow { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.widget-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.widget-eyebrow .dot.is-live { animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .35; transform: scale(.75); } }

/* À suivre */
.w-next { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: start; }
.w-next .w-count { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin-top: 6px; font-size: clamp(30px, 3.6vw, 40px); font-weight: 750; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.w-next .w-count small { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--muted); }
.w-next .w-who { min-width: 0; }
.w-next .w-who b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-next .w-who span { display: block; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-next .w-who .w-leave { display: inline-block; margin-top: 6px; padding: 4px 11px; border-radius: 13px; font-style: normal; font-size: 13px; font-weight: 650; line-height: 1.35; color: var(--blue); background: color-mix(in srgb, var(--blue) 13%, transparent); max-width: 100%; }
.w-next .w-who .w-leave[hidden] { display: none; }
.w-next .w-who .w-leave.is-go { color: #fff; background: var(--orange); animation: leave-pulse 2s ease-in-out infinite; }
@keyframes leave-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--orange) 22%, transparent); } }
.w-next .w-acts { display: flex; gap: 8px; align-self: end; }
.w-next .w-bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--fill-2); overflow: hidden; margin-top: 8px; }
.w-next .w-bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, white), var(--accent)); transition: width 1s var(--ease); }
.w-next.is-now .widget-eyebrow { color: var(--green); }
.w-next.is-now .w-bar i { background: linear-gradient(90deg, #6CF08E, var(--green)); }

/* Météo (dégradés de l'app Météo) */
.w-meteo { --sky1: #3D8EF0; --sky2: #8CC2F8; color: #fff; border: 0; background: linear-gradient(170deg, var(--sky1), var(--sky2)); box-shadow: 0 18px 40px -22px var(--sky1); isolation: isolate; }
.w-meteo[data-sky="clear-night"] { --sky1: #0B1633; --sky2: #2A3A66; }
.w-meteo[data-sky="partly-day"] { --sky1: #4A86C8; --sky2: #9DBCDC; }
.w-meteo[data-sky="partly-night"] { --sky1: #121C33; --sky2: #344462; }
.w-meteo[data-sky="cloudy-day"] { --sky1: #6A7C91; --sky2: #A3B1C1; }
.w-meteo[data-sky="cloudy-night"] { --sky1: #1B222E; --sky2: #3A4554; }
.w-meteo[data-sky="rain-day"] { --sky1: #4A5D75; --sky2: #7E90A6; }
.w-meteo[data-sky="rain-night"] { --sky1: #101826; --sky2: #2B3749; }
.w-meteo[data-sky="snow-day"], .w-meteo[data-sky="snow-night"] { --sky1: #7F95AE; --sky2: #C5D2DF; }
.w-meteo[data-sky="storm-day"], .w-meteo[data-sky="storm-night"] { --sky1: #262A40; --sky2: #4B5070; }
.w-meteo[data-sky="fog-day"], .w-meteo[data-sky="fog-night"] { --sky1: #7D858F; --sky2: #B5BBC2; }
.w-meteo .w-place { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 5px; text-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.w-meteo .w-place .i { width: 14px; height: 14px; }
.w-meteo .w-temp { font-size: 54px; font-weight: 300; letter-spacing: -.04em; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
.w-meteo .w-cond, .w-meteo .w-meta { text-shadow: 0 1px 6px rgba(0, 0, 0, .2); }
.w-meteo .w-cond { margin-top: 18px; font-size: 14px; font-weight: 600; }
.w-meteo .w-meta { font-size: 13px; opacity: .85; }
.w-meteo .sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky-sun { position: absolute; right: 18px; top: 16px; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle, #FFE58A, #FFC531 60%); box-shadow: 0 0 40px 12px rgba(255, 210, 80, .45); animation: sun-glow 4s ease-in-out infinite; }
.sky-moon { position: absolute; right: 22px; top: 18px; width: 42px; height: 42px; border-radius: 50%; box-shadow: inset -12px 4px 0 0 #F2F0E6; filter: drop-shadow(0 0 14px rgba(255, 255, 240, .35)); }
.sky-star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; animation: twinkle 3s ease-in-out infinite; }
.sky-cloud { position: absolute; width: 90px; height: 30px; border-radius: 30px; background: rgba(255, 255, 255, .7); filter: blur(1px); animation: drift 38s linear infinite; }
.sky-cloud::before, .sky-cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.sky-cloud::before { width: 44px; height: 44px; left: 14px; top: -20px; }
.sky-cloud::after { width: 34px; height: 34px; left: 44px; top: -14px; }
.sky-cloud.is-dim { background: rgba(225, 232, 240, .26); }
.sky-drop { position: absolute; top: -20px; width: 1.6px; height: 14px; border-radius: 2px; background: linear-gradient(transparent, rgba(255, 255, 255, .8)); animation: rain .9s linear infinite; }
.sky-flake { position: absolute; top: -10px; width: 5px; height: 5px; border-radius: 50%; background: #fff; opacity: .9; animation: snow 5s linear infinite; }
.sky-bolt { position: absolute; inset: 0; background: rgba(255, 255, 255, .0); animation: flash 6s ease-in-out infinite; }
.sky-fog { position: absolute; left: -20%; width: 140%; height: 16px; border-radius: 16px; background: rgba(255, 255, 255, .28); filter: blur(4px); animation: fog 9s ease-in-out infinite alternate; }
@keyframes sun-glow { 50% { box-shadow: 0 0 52px 18px rgba(255, 210, 80, .55); transform: scale(1.04); } }
@keyframes twinkle { 50% { opacity: .2; } }
@keyframes drift { from { transform: translateX(-120px); } to { transform: translateX(520px); } }
@keyframes rain { to { transform: translateY(240px); } }
@keyframes snow { to { transform: translate(18px, 240px); } }
@keyframes flash { 0%, 92%, 100% { background: rgba(255, 255, 255, 0); } 93% { background: rgba(255, 255, 255, .45); } 95% { background: rgba(255, 255, 255, 0); } 96% { background: rgba(255, 255, 255, .3); } }
@keyframes fog { to { transform: translateX(8%); } }

/* Frise de la journée (ligne « maintenant » rouge, comme Calendrier) */
.day-line { position: relative; padding: 16px 18px 12px; }
.day-track { position: relative; height: 54px; margin: 30px 0 4px; border-radius: 14px; background: var(--fill-2); }
.day-hours { position: relative; height: 16px; font-size: 11px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.day-hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.day-hours span:first-child { transform: none; }
.day-hours span:last-child { transform: translateX(-100%); }
.day-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--sep); }
.day-ev {
    --c: var(--blue); position: absolute; top: 6px; bottom: 6px; min-width: 28px; border-radius: 10px; padding: 4px 8px; overflow: hidden;
    background: color-mix(in srgb, var(--c) 26%, transparent); border-left: 3px solid var(--c); color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.25; white-space: nowrap;
    transition: transform var(--t-spring) var(--spring);
}
.day-ev small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.day-ev:hover { transform: translateY(-2px); }
.day-ev--atelier { --c: var(--purple); } .day-ev--distance { --c: var(--teal); } .day-ev--done { --c: var(--green); opacity: .7; }
.day-now { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: var(--red); border-radius: 2px; z-index: 2; transition: left 1s var(--ease); box-shadow: 0 0 10px color-mix(in srgb, var(--red) 60%, transparent); }
.day-now::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.day-now span { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); padding: 2px 7px; border-radius: 8px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =====================================================================
   Graphiques façon Santé / Temps d'écran
   ===================================================================== */
.hchart { position: relative; padding-top: 4px; }
.hchart-callout { min-height: 62px; margin-bottom: 10px; }
.hchart-callout small { display: block; font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hchart-callout b { display: block; font-size: 28px; font-weight: 750; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hchart-callout span { font-size: 13px; color: var(--muted); }
.hchart-plot { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 170px; border-bottom: 1px solid var(--sep); }
.hchart-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--sep); pointer-events: none; }
.hbar { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border: 0; padding: 0; background: none; cursor: pointer; min-width: 0; }
.hbar i {
    display: block; width: min(40px, 72%); height: var(--h); min-height: 3px; border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--c, var(--green)) 88%, white), var(--c, var(--green)));
    transform-origin: bottom; animation: grow .9s var(--spring-soft) both; animation-delay: calc(var(--i, 0) * 45ms);
    transition: opacity .25s ease, filter .25s ease;
}
.hbar.is-now i { --c: var(--accent); }
.hchart.has-pick .hbar:not(.is-picked) i { opacity: .32; filter: saturate(.6); }
.hchart-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed color-mix(in srgb, var(--green) 85%, white); pointer-events: none; animation: fade-in .6s .5s ease both; z-index: 1; }
.hchart-avg span { position: absolute; right: 0; top: -21px; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.hchart-x { display: flex; gap: 10px; margin-top: 8px; }
.hchart-x span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.hchart-x span.is-picked { color: var(--ink); }

.spark { display: block; width: 100%; height: 34px; margin-top: 8px; overflow: visible; animation: spark-reveal 1.3s .15s var(--ease) both; }
.spark path.line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
@keyframes spark-reveal { from { clip-path: inset(-4px 100% -4px 0); } to { clip-path: inset(-4px -4px -4px 0); } }
a.set-row { color: inherit; transition: background-color .18s; }
a.set-row:hover { background: var(--fill-2); }
a.set-row .row-chev { color: var(--faint); margin-left: auto; }

/* =====================================================================
   Réglages → Apparence (Luminosité et affichage)
   ===================================================================== */
.ap-modes { display: flex; justify-content: center; gap: clamp(28px, 8vw, 70px); padding: 22px 16px 16px; }
.ap-mode { display: flex; flex-direction: column; align-items: center; gap: 10px; border: 0; background: none; color: inherit; font-weight: 600; font-size: 15px; }
.ap-phone { position: relative; width: 84px; height: 168px; border-radius: 18px; padding: 8px 7px; border: 2.5px solid transparent; box-shadow: 0 0 0 1px var(--glass-line), 0 14px 30px -18px rgba(0, 0, 0, .6); transition: border-color .25s, transform var(--t-spring) var(--spring); overflow: hidden; }
.ap-mode:active .ap-phone { transform: scale(.96); }
.ap-mode[aria-pressed="true"] .ap-phone { border-color: var(--accent); }
.ap-phone--light { background: linear-gradient(170deg, #F6F7FB, #E3E7F0); }
.ap-phone--dark { background: linear-gradient(170deg, #12131A, #05060A); }
.ap-phone i { display: block; height: 7px; border-radius: 4px; margin-top: 6px; }
.ap-phone--light i { background: rgba(0, 0, 0, .1); } .ap-phone--dark i { background: rgba(255, 255, 255, .12); }
.ap-phone i.big { height: 24px; border-radius: 6px; margin-top: 10px; }
.ap-phone i.acc { background: var(--accent); width: 60%; }
.ap-phone i:first-child { width: 40%; margin-top: 4px; }
.ap-radio { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--faint); display: grid; place-items: center; transition: background-color .2s, border-color .2s; }
.ap-mode[aria-pressed="true"] .ap-radio { background: var(--accent); border-color: var(--accent); color: #fff; }
.ap-radio .i { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--spring-bounce); }
.ap-mode[aria-pressed="true"] .ap-radio .i { opacity: 1; transform: none; }

.ap-colors { display: flex; flex-wrap: wrap; gap: 14px; padding: 16px; }
.ap-color { --c: var(--blue); width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; background: var(--c); display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 0 transparent; transition: transform var(--t-spring) var(--spring), box-shadow .25s; }
.ap-color:active { transform: scale(.9); }
.ap-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--c); }
.ap-color .i { width: 18px; height: 18px; stroke-width: 3; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--spring-bounce); }
.ap-color[aria-pressed="true"] .i { opacity: 1; transform: none; }

.ap-size { display: flex; align-items: center; gap: 14px; padding: 16px; }
.ap-size .a-small { font-size: 13px; font-weight: 600; } .ap-size .a-big { font-size: 23px; font-weight: 600; }
.ap-size input[type=range] { flex: 1; accent-color: var(--accent); }
.ap-preview { margin: 0 16px 16px; padding: 14px 16px; border-radius: 16px; background: var(--fill-2); font-size: calc(15px * var(--pz, 1)); line-height: 1.45; transition: font-size .25s var(--ease); }
.ap-preview b { display: block; font-size: 1.12em; }
.ap-warm { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.ap-warm span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ap-warm input[type=range] { flex: 1; accent-color: #FF9F0A; background: none; }

@media (max-width: 900px) {
    .widgets { grid-template-columns: minmax(0, 1fr); }
    .widget { min-height: 0; }
    .w-meteo { min-height: 150px; }
    .hchart-plot { height: 150px; gap: 6px; }
    .hchart-x { gap: 6px; }
}
@media (max-width: 640px) {
    .w-next { grid-template-columns: minmax(0, 1fr); }
    .w-next .w-acts { justify-self: start; }
    .day-ev small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sky-cloud, .sky-drop, .sky-flake, .sky-bolt, .sky-fog, .sky-sun, .sky-star, .widget-eyebrow .dot.is-live { animation: none !important; }
}
:root[data-motion="reduce"] :is(.sky-cloud, .sky-drop, .sky-flake, .sky-bolt, .sky-fog, .sky-sun, .sky-star) { animation: none !important; }

/* Réglages → Rendez-vous en ligne : plages horaires par jour */
#dp-card { container-type: inline-size; }
.dp-day { display: grid; grid-template-columns: 100px minmax(0, 1fr) 32px; align-items: center; gap: 10px; }
.dp-label b { display: block; font-size: 15px; font-weight: 600; }
.dp-label small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.dp-ranges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }
.dp-ranges:empty { display: block; }
.dp-range { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 6px; border-radius: 14px; background: var(--fill-2); }
.dp-range .dp-time { width: 96px; height: 34px; min-height: 34px; padding: 4px 26px 4px 10px; background-position: right 8px center; background-size: 15px; font-variant-numeric: tabular-nums; }
.dp-range > span { color: var(--muted); font-size: 13px; }
.dp-add { justify-self: end; }
.dp-day:has(.dp-ranges:empty) .dp-label { grid-column: 1 / 3; }
.dp-day:has(.dp-ranges:empty) .dp-ranges { display: none; }
#dp-preview { font-variant-numeric: tabular-nums; }
@container (max-width: 400px) {
    .dp-day { grid-template-columns: minmax(0, 1fr) 32px; row-gap: 8px; }
    .dp-ranges { grid-column: 1 / -1; grid-row: 2; align-items: stretch; }
    .dp-ranges:empty { display: none; }
    .dp-range { justify-content: space-between; }
    .dp-range .dp-time { flex: 1; width: auto; min-width: 0; }
    .dp-day:has(.dp-ranges:empty) .dp-label { grid-column: auto; }
}
/* Fiche : devis accepté en ligne */
.quote-ok { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--green) 45%, transparent), var(--shadow); }
.quote-ok .card-head .i { color: var(--green); }
.quote-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink); background: color-mix(in srgb, var(--orange) 16%, transparent); }
.quote-warn .i { flex: none; width: 17px; height: 17px; margin-top: 1px; color: var(--orange); }
/* Ligne de réglage dont le choix passe dessous quand la carte est étroite */
.set-row--wrap { flex-wrap: wrap; row-gap: 10px; }
.set-row--wrap > .row-main { flex: 1 1 170px; }
.set-row--wrap > .seg { flex: 0 1 auto; margin-left: auto; }

/* Bon de dépôt (demande → Infos) */
.task--depot { --tile: var(--orange); }
.dep-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; margin-bottom: 8px; }
.dep-chips .chip[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, var(--fill-2)); color: var(--ink); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }
.dep-check { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 6px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.dep-check input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); }
#dep-form .err { margin: 10px 0 0; color: var(--red); font-size: 14px; }
.dep-card .kv dd small { font-size: 12.5px; }
@media (max-width: 560px) { .dep-item { grid-template-columns: minmax(0, 1fr) 32px; } .dep-item [name="serial"] { grid-column: 1; grid-row: 2; } .dep-item [data-dep-del] { grid-row: 1 / 3; grid-column: 2; } }
/* Devis : rétractation du client */
.quote-withdrawn { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 50%, transparent), var(--shadow); }
.quote-withdrawn .card-head .i { color: var(--red); }
