/* ═══════════════════════════════════════════════════════════════════════════
   Mamifa — Feuille de style (sans framework, sans build)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary:      #013861;
    --primary-dark: #012a49;
    --primary-soft: #e6eef5;
    --accent:       #2a7fc1;
    --accent-soft:  #e4f0fa;
    --ink:          #0f1f2e;
    --ink-2:        #4b5563;
    --muted:        #7c8494;
    --line:         #dbe3ec;
    --bg:           #f3f6fa;
    --card:         #ffffff;
    --danger:       #d64545;
    --danger-soft:  #fdecec;
    --success:      #2f9e63;
    --success-soft: #e6f6ed;
    --warning:      #d08a12;
    --warning-soft: #fff5df;
    --info-soft:    #e9f0fb;
    --sidebar-bg:   #012a49;
    --sidebar-ink:  #bfd0e0;
    --radius:       14px;
    --radius-sm:    9px;
    --shadow:       0 6px 24px -10px rgba(15, 31, 46, .18);
    --shadow-lg:    0 24px 60px -24px rgba(15, 31, 46, .35);
    --font:         'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --sidebar-w:    264px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5rem; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .9rem; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.lead { font-size: 1.15rem; }
.hide-mobile { display: inline; }
@media (max-width: 767px) { .hide-mobile { display: none !important; } }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .65rem 1.2rem; border-radius: 999px; border: 2px solid transparent;
    font-weight: 700; line-height: 1; white-space: nowrap; text-decoration: none !important;
    transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px -10px var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { background: #333a4a; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; border-color: #c9d5e1; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: #eaf2fa; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b93838; }
.btn-sm { padding: .45rem .9rem; font-size: .88rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent;
    color: var(--ink-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: rgba(31, 36, 48, .07); color: var(--ink); text-decoration: none; }
.icon-btn--danger:hover { background: var(--danger-soft); color: var(--danger); }

/* ── Formulaires ─────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-weight: 700; font-size: .9rem; }
.field > span em { font-style: normal; font-weight: 400; }
.field small { margin-top: .15rem; }
.field input, .field select, .field textarea, .input {
    width: 100%; padding: .7rem .9rem; border-radius: var(--radius-sm);
    border: 1.5px solid var(--line); background: #fff; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
    border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft);
}
.input--sm { padding: .4rem .6rem; font-size: .88rem; width: auto; }
.field--highlight { padding: .9rem; border-radius: var(--radius-sm); background: var(--primary-soft); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.inline-form .input { flex: 1 1 200px; min-width: 0; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--primary); }
.divider { display: flex; align-items: center; gap: 1rem; color: var(--muted); font-size: .85rem; margin: 1.2rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.pwd-meter { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: -.4rem; }
.pwd-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .25s, background .25s; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch__track { position: absolute; inset: 0; background: #c9d5e1; border-radius: 26px; transition: background .2s; }
.switch__track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px var(--accent-soft); }

.color-picker { display: flex; gap: .6rem; flex-wrap: wrap; }
.color-dot { position: relative; width: 32px; height: 32px; cursor: pointer; }
.color-dot input { position: absolute; opacity: 0; inset: 0; }
.color-dot span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--c); border: 3px solid transparent; transition: transform .15s, border-color .15s; }
.color-dot input:checked + span { border-color: var(--ink); transform: scale(1.1); }

/* ── Cartes, badges, avatars, notices ────────────────────────────────────── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; border: 1px solid rgba(0,0,0,.03); }
.card--danger { border: 1px solid #f3c9c9; }
.card--danger h3 { color: var(--danger); }
.badge { display: inline-flex; align-items: center; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--line); color: var(--ink-2); vertical-align: middle; }
.badge--on { background: var(--success-soft); color: var(--success); }
.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem; border-radius: 999px; background: rgba(255,255,255,.18); color: #fff; font-size: .85rem; font-weight: 700; backdrop-filter: blur(6px); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-dark); margin-bottom: .5rem; }

.avatar {
    --avatar: var(--primary);
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 40px; height: 40px; border-radius: 50%; background: var(--avatar); color: var(--avatar-ink, #fff);
    font-weight: 800; font-size: .9rem; text-decoration: none !important; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar--img { background: var(--line); }
/* Envoi de photo (Mon compte) */
.avatar-upload { display: flex; align-items: center; gap: 1rem; }
.avatar-upload .avatar--lg { width: 88px; height: 88px; font-size: 1.8rem; }
.avatar-upload__actions { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.avatar-upload__btn { cursor: pointer; }
.color-dot--custom span { display: flex; align-items: center; justify-content: center; color: var(--ink-2); font-size: .8rem; border: 3px dashed var(--line); }
.color-dot--custom input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.color-dot--custom input[type=radio]:checked + span { border-style: solid; border-color: var(--ink); }
.avatar--sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar--xs { width: 22px; height: 22px; font-size: .65rem; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.4rem; }
.avatar--more { background: var(--line); color: var(--ink-2); }
.avatar--add { background: #fff; color: var(--primary); border: 2px dashed var(--primary); }
.member-stack { display: flex; align-items: center; }
.member-stack .avatar { border: 2px solid var(--bg); margin-left: -8px; }
.member-stack .avatar:first-child { margin-left: 0; }

.notice { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--radius-sm); font-size: .93rem; margin-bottom: 1rem; }
.notice i { margin-top: .15rem; }
.notice--info { background: var(--info-soft); color: #274a7c; }
.notice--tip  { background: var(--warning-soft); color: #6c4a08; }

.flash-zone { padding-top: 1rem; }
.flash { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: .6rem; font-weight: 600; }
.flash i { margin-top: .2rem; }
.flash--success { background: var(--success-soft); color: #1e6b43; }
.flash--error   { background: var(--danger-soft);  color: #9a2c2c; }
.flash--warning { background: var(--warning-soft); color: #6c4a08; }
.flash--info    { background: var(--info-soft);    color: #274a7c; }

.big-emoji { font-size: 3.2rem; line-height: 1; margin-bottom: .6rem; }
.back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 700; font-size: .9rem; margin-bottom: .8rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   SITE PUBLIC
   ═══════════════════════════════════════════════════════════════════════════ */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(243, 246, 250, .85); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0,0,0,.3); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none !important; }
.brand--light { color: #fff; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { font-weight: 700; color: var(--ink-2); }
.site-nav a:hover { color: var(--ink); text-decoration: none; }
/* Les boutons pleins gardent leur texte blanc, quel que soit le conteneur (nav, footer, cartes) */
.site-nav a.btn-primary, .site-nav a.btn-primary:hover, .site-nav a.btn-secondary, .site-nav a.btn-secondary:hover,
.site-footer a.btn-primary, .site-footer a.btn-primary:hover,
a.btn-primary, a.btn-primary:hover, a.btn-secondary, a.btn-secondary:hover, a.btn-danger, a.btn-danger:hover { color: #fff; }
.site-nav a.btn-ghost, .site-nav a.btn-ghost:hover { color: var(--ink); }
.burger { display: none; background: none; border: 0; font-size: 1.4rem; color: var(--ink); }
@media (max-width: 767px) {
    .burger { display: block; }
    .site-nav { position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 1rem 1rem; display: none; }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: .8rem .2rem; border-bottom: 1px solid var(--line); }
    .site-nav .btn { margin-top: .8rem; border-bottom: 0; }
}

.hero { position: relative; min-height: 88vh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(1,42,73,.92) 0%, rgba(1,42,73,.62) 45%, rgba(42,127,193,.45) 100%); }
.hero__inner { position: relative; padding: 5rem 0; max-width: 700px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin: 1rem 0; }
.hero h1 em { font-style: normal; color: #b9d8f2; }
.hero .lead { font-size: 1.2rem; color: rgba(255,255,255,.9); max-width: 560px; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.6rem 0; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero__proof { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: .9rem; color: rgba(255,255,255,.85); font-weight: 600; }
.hero__proof i { color: #b9d8f2; margin-right: .3rem; }

.section { padding: 5rem 0; }
.section--alt { background: #fff; }
.section__head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.6rem; }
.feature { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature img { height: 190px; width: 100%; object-fit: cover; }
.feature__body { padding: 1.4rem; }
.feature__icon { --tool-color: var(--primary); display: inline-flex; width: 46px; height: 46px; align-items: center; justify-content: center; border-radius: 13px; background: color-mix(in srgb, var(--tool-color) 14%, white); color: var(--tool-color); font-size: 1.2rem; margin-bottom: .8rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 1.6rem; border-radius: var(--radius); background: var(--bg); }
.steps__num { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checks li { display: flex; gap: .7rem; align-items: flex-start; margin-bottom: .6rem; font-weight: 600; }
.checks i { color: var(--success); margin-top: .3rem; }

.mock { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1rem 1.2rem 1.2rem; transform: rotate(-1.5deg); }
.mock__bar { display: flex; gap: 6px; margin-bottom: 1rem; }
.mock__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock__row { display: flex; align-items: center; gap: .7rem; padding: .7rem .4rem; border-bottom: 1px solid var(--line); font-weight: 600; }
.mock__row i { color: var(--primary); }
.mock__row--done { color: var(--muted); text-decoration: line-through; }
.mock__row--done i { color: var(--success); }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--primary); margin-left: 1px; vertical-align: text-bottom; animation: blink 1s steps(2) infinite; }
@keyframes blink { to { visibility: hidden; } }
.mock__foot { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; font-size: .8rem; color: var(--muted); }

.cta { background: linear-gradient(120deg, var(--primary) 0%, #2a7fc1 100%); color: #fff; padding: 4.5rem 0; }
.cta__inner { text-align: center; max-width: 680px; }
.cta p { color: rgba(255,255,255,.9); font-size: 1.1rem; margin-bottom: 1.6rem; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.prose code { background: var(--line); padding: .1rem .4rem; border-radius: 5px; font-size: .9em; }
/* Pages légales */
.legal .lead { font-size: 1.1rem; color: var(--ink-2); margin: .6rem 0 1.4rem; }
.legal-updated { color: var(--muted); font-size: .9rem; margin: -.4rem 0 1.2rem; }
.legal-toc { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.6rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.legal-toc a { font-size: .85rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; background: var(--bg); color: var(--primary-dark); }
.legal-toc a:hover { background: var(--primary); color: #fff; }
.legal-identity { display: inline-block; font-style: normal; line-height: 1.5; padding: .9rem 1.2rem; margin: .4rem 0 1rem; background: #fff; border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; box-shadow: var(--shadow); }
.legal-note { margin: 1rem 0 1.4rem; padding: .9rem 1.1rem; background: color-mix(in srgb, var(--primary) 8%, white); border: 1px solid color-mix(in srgb, var(--primary) 20%, white); border-radius: var(--radius-sm); font-size: .95rem; }
.legal h2 { scroll-margin-top: 90px; }
/* Lien de parenté */
.kinship-badge { display: inline-flex; align-items: center; gap: .3rem; margin-left: .4rem; padding: .1rem .55rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: .78rem; font-weight: 700; vertical-align: middle; }
.kinship-form { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; }
.kinship-form .input--sm { max-width: 220px; }

.site-footer { background: var(--sidebar-bg); color: var(--sidebar-ink); padding-top: 3.5rem; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
@media (max-width: 720px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; margin-bottom: .8rem; }
.site-footer li { margin-bottom: .45rem; }
.site-footer a { color: var(--sidebar-ink); }
.site-footer a:hover { color: #fff; }
.site-footer .muted { color: #8fa3b8; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 1.2rem; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .5rem 1.6rem; font-size: .8rem; color: #7d93a8; }
.swiss-made { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: #b9d8f2; padding: .3rem .7rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); transition: background .15s, color .15s; }
.swiss-made:hover { background: rgba(255,255,255,.08); color: #fff; }
.flag-ch { flex: none; border-radius: 3px; vertical-align: -3px; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }

/* Auth */
.auth { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; }
.auth__card { width: 100%; max-width: 480px; padding: 2rem; }
.auth__head { text-align: center; margin-bottom: 1.6rem; }
.auth__head img { margin: 0 auto .8rem; }
.auth__head h1 { font-size: 1.7rem; }
.auth__alt { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: .92rem; }
body.app .auth { min-height: auto; padding: 1rem 0; }

.error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3rem 1rem; }
.error-page__code { font-size: 5rem; font-weight: 900; color: var(--line); line-height: 1; }

/* ═══════════════════════════════════════════════════════════════════════════
   APP (connecté)
   ═══════════════════════════════════════════════════════════════════════════ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: var(--sidebar-bg); color: var(--sidebar-ink);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar__brand { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.2rem .8rem; }
.sidebar__brand .brand { font-size: 1.35rem; }
.sidebar__close { display: none; color: var(--sidebar-ink); }
.sidebar__family { padding: .4rem 1rem .8rem; border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: .6rem; }
.family-switcher summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; padding: .55rem .6rem; border-radius: var(--radius-sm); }
.family-switcher summary::-webkit-details-marker { display: none; }
.family-switcher summary:hover { background: rgba(255,255,255,.06); }
.family-switcher__name { display: flex; align-items: center; gap: .5rem; padding: .55rem .6rem; color: #fff; font-weight: 800; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.family-switcher summary .family-switcher__name { padding: 0; }
.family-switcher__menu { margin-top: .3rem; background: rgba(255,255,255,.05); border-radius: var(--radius-sm); padding: .3rem; }
.family-switcher__menu button, .family-switcher__new { display: flex; width: 100%; align-items: center; gap: .5rem; padding: .55rem .6rem; border: 0; background: none; color: var(--sidebar-ink); border-radius: 7px; text-align: left; font-weight: 600; }
.family-switcher__menu button:hover, .family-switcher__new:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.family-switcher__menu .muted { margin-left: auto; color: #8fa3b8; }

.sidebar__nav { padding: 0 .8rem; flex: 1; }
.sidebar__section { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #7d93a8; padding: 1rem .6rem .35rem; }
.sidebar__link {
    --tool-color: #8fc1ec;
    display: flex; align-items: center; gap: .75rem; padding: .65rem .8rem; border-radius: var(--radius-sm);
    color: var(--sidebar-ink); font-weight: 700; margin-bottom: .15rem; transition: background .15s, color .15s;
}
.sidebar__link i { width: 20px; text-align: center; color: var(--tool-color); opacity: .9; }
.sidebar__link:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar__link.is-active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar__footer { padding: .8rem; border-top: 1px solid rgba(255,255,255,.07); }
.user-chip { display: flex; align-items: center; gap: .7rem; padding: .4rem .5rem; }
.user-chip__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.user-chip__meta strong { color: #fff; }
.user-chip__meta .muted { color: #8fa3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .icon-btn { color: var(--sidebar-ink); }
.user-chip .icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-backdrop { display: none; }

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .8rem; padding: .9rem 1.6rem; background: rgba(243,246,250,.9); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.topbar__burger { display: none; }
.topbar__title { font-size: 1.15rem; margin: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__actions { display: flex; gap: .5rem; }
.app-content { padding: 1.4rem 1.6rem 3rem; flex: 1; }
.app-main .flash-zone { padding: 1rem 1.6rem 0; }

@media (max-width: 1023px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
    .sidebar.is-open { transform: none; }
    .sidebar__close { display: inline-flex; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(1,42,73,.55); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .25s; }
    .sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }
    .topbar__burger { display: inline-flex; }
    .topbar, .app-content, .app-main .flash-zone { padding-left: 1rem; padding-right: 1rem; }
}

/* Dashboard */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.dash-head p { margin: 0; }
.dash-head__title { font-size: 1.7rem; margin: 0; }

.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 1.3rem; align-items: start; }
.tool-launcher { display: none; flex-direction: column; gap: .8rem; }
@media (max-width: 767px) {
    .widgets, .widgets--static, .widgets.grid-stack.is-grid { display: none !important; }
    .tool-launcher { display: flex; }
}
.tool-card {
    --tool-color: var(--primary);
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; background: #fff; border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; border: 1px solid rgba(0,0,0,.03);
}
.tool-card:active { transform: scale(.99); }
.tool-card--ghost { background: transparent; border: 2px dashed var(--line); box-shadow: none; color: var(--muted); }
.tool-card__icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; flex-shrink: 0; background: color-mix(in srgb, var(--tool-color) 14%, white); color: var(--tool-color); font-size: 1.3rem; }
.tool-card--ghost .tool-card__icon { background: var(--line); color: var(--muted); }
.tool-card__body { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }

/* Widgets */
.widget { --tool-color: var(--primary); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(0,0,0,.03); display: flex; flex-direction: column; overflow: hidden; }
.widget--full { box-shadow: none; }
.widget__head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .9rem 1rem .7rem 1.1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.widget__head h3 { display: flex; align-items: center; gap: .6rem; margin: 0; font-size: 1.05rem; }
.widget__icon { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 9px; background: color-mix(in srgb, var(--tool-color) 14%, white); color: var(--tool-color); }
.widget__actions { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.widget__actions .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 767px) {
    /* Titre sur sa ligne, actions dessous : rien ne dépasse, même à 320 px */
    .widget--full .widget__head h3 { flex: 1 1 100%; }
    .widget--full .widget__actions { flex: 1 1 100%; justify-content: space-between; }
}
.widget__foot { padding: .6rem 1.1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.tool-page .widget { min-height: 60vh; }

/* Liste de courses */
.shop-list { padding: .3rem 0; max-height: 520px; overflow-y: auto; }
.widget--full .shop-list { max-height: none; }
.shop-list__loading, .shop-list__empty { padding: 1.2rem 1.1rem; text-align: center; }
.shop-item { display: flex; align-items: center; gap: .6rem; padding: .15rem .7rem .15rem 1rem; border-bottom: 1px solid #eaf0f6; transition: background .15s; }
.shop-item:last-of-type { border-bottom: 0; }
.shop-item:hover, .shop-item:focus-within { background: #f5f8fb; }
.shop-item__check { appearance: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid #bccbd9; background: #fff; cursor: pointer; flex-shrink: 0; position: relative; transition: background .15s, border-color .15s; }
.shop-item__check:checked { background: var(--success); border-color: var(--success); }
.shop-item__check:checked::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.shop-item__input { flex: 1; border: 0; background: transparent; padding: .7rem .3rem; font-weight: 600; outline: none; min-width: 0; border-radius: 6px; }
.shop-item__input:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--tool-color); }
.shop-item__input::placeholder { color: #9fb0c2; font-weight: 500; }
.shop-item--done .shop-item__input { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.shop-item__by { font-size: .7rem; color: #9fb0c2; white-space: nowrap; }
.shop-item__del { opacity: 0; width: 30px; height: 30px; }
.shop-item:hover .shop-item__del, .shop-item:focus-within .shop-item__del { opacity: 1; }
@media (hover: none) { .shop-item__del { opacity: .55; } }
.shop-item--new { border-top: 1px dashed var(--line); }
.shop-item--new .shop-item__check { visibility: hidden; }
.shop-item--saving .shop-item__input { color: var(--muted); }
.shop-item--flash { animation: itemFlash 1.2s ease; }
@keyframes itemFlash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.shop-list__divider { padding: .4rem 1.1rem .2rem; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #9fb0c2; }
[data-shopping-status].is-saving { color: var(--warning); }
[data-shopping-status].is-error { color: var(--danger); }

/* Calendrier */
.cal { padding: .8rem 1rem .4rem; }
.cal__month { font-weight: 800; font-size: 1.05rem; text-transform: capitalize; margin-bottom: .6rem; }
.cal__weekdays, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal__weekdays span { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; padding-bottom: .3rem; }
.cal__day { min-height: 68px; border-radius: 8px; background: #f5f8fb; padding: .25rem .3rem; cursor: pointer; border: 1.5px solid transparent; transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.cal__day:hover { border-color: var(--tool-color); background: #fff; }
.cal__day--out { opacity: .4; }
.cal__day--today .cal__num { background: var(--tool-color); color: #fff; }
.cal__num { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: .78rem; font-weight: 800; }
.cal__ev { font-size: .68rem; font-weight: 700; color: #fff; padding: 1px 5px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--ev, var(--accent)); }
.cal__ev--timed { background: color-mix(in srgb, var(--ev, var(--accent)) 16%, white); color: var(--ink); border-left: 3px solid var(--ev, var(--accent)); }
.cal__more { font-size: .65rem; color: var(--muted); font-weight: 700; }
.widget--full .cal__day { min-height: 96px; }
@media (max-width: 480px) {
    .cal__day { min-height: 54px; padding: .15rem; }
    .cal__ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
    .cal__ev--timed { border-left: 0; background: var(--ev, var(--accent)); }
    .cal__more { font-size: .6rem; }
}
.cal__upcoming { padding: .6rem 1.1rem 1rem; border-top: 1px solid var(--line); }
.cal__upcoming h4 { margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; }
.up-ev { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; cursor: pointer; border-radius: 6px; }
.up-ev:hover { background: #f5f8fb; }
.up-ev__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ev, var(--accent)); flex-shrink: 0; }
.up-ev__date { font-size: .78rem; font-weight: 800; color: var(--muted); min-width: 92px; }
.up-ev__title { font-weight: 700; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Réglages */
.settings { display: flex; flex-direction: column; gap: 1.3rem; max-width: 860px; }
.settings h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.settings h3 i { color: var(--primary); }
.tool-toggles { display: flex; flex-direction: column; gap: .6rem; }
.tool-toggle { --tool-color: var(--primary); display: flex; align-items: center; gap: 1rem; padding: .8rem; border-radius: var(--radius-sm); background: var(--bg); }
.tool-toggle__body { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.member-list { display: flex; flex-direction: column; }
.member { display: flex; align-items: center; gap: .9rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.member__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.member__meta .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member__actions { display: flex; align-items: center; gap: .3rem; }
/* Mobile : rôle et retrait passent sous le nom, sinon ils écrasent le badge et le sélecteur de parenté */
@media (max-width: 600px) {
    .member { flex-wrap: wrap; row-gap: .5rem; }
    .member__meta { flex: 1 1 60%; }
    .member__actions { flex: 1 1 100%; justify-content: flex-start; gap: .5rem; padding-left: calc(40px + .9rem); }
    .member__actions form { min-width: 0; }
    .member__actions .input--sm { flex: 1 1 auto; max-width: 220px; min-width: 0; }
    .member__meta strong { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
    .kinship-badge { margin-left: 0; max-width: 100%; }
    .kinship-form .input--sm { max-width: 100%; }
}
.profile-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-row > .field { flex: 1 1 220px; min-width: 0; }
.profile-row .input, .profile-row input[type=text] { max-width: 100%; }
@media (max-width: 600px) { .profile-row { flex-direction: column; align-items: stretch; } .avatar-upload { align-items: flex-start; } }
.chart-box { position: relative; height: 180px; }

.invite-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.invite-tab { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; color: var(--ink-2); }
.invite-tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.invite-form { display: flex; flex-direction: column; gap: .9rem; }
.invite-form__field { display: flex; flex-direction: column; gap: .3rem; }
.invite-result { margin-top: 1rem; padding: 1rem; border-radius: var(--radius-sm); background: var(--accent-soft); display: flex; flex-direction: column; gap: .7rem; }
.invite-result__link { display: flex; gap: .5rem; flex-wrap: wrap; }
.invite-result__link .input { flex: 1 1 220px; font-size: .88rem;  min-width: 0; }
.invite-result__actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.invite-list li { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.invite-list li > i { width: 22px; text-align: center; color: var(--muted); }
.invite-list__meta { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.invite-list__meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Modales & toasts ────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(1,42,73,.6); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; transition: opacity .18s; }
.modal-backdrop.is-open { opacity: 1; }
.modal { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; max-width: 460px; max-height: calc(100vh - 2rem); overflow-y: auto; transform: translateY(12px) scale(.98); transition: transform .18s; }
.modal-backdrop.is-open .modal { transform: none; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem .5rem; }
.modal__head h3 { margin: 0; font-size: 1.15rem; }
.modal__body { padding: .5rem 1.3rem 1rem; }
.modal__foot { display: flex; justify-content: flex-end; gap: .6rem; padding: .6rem 1.3rem 1.2rem; flex-wrap: wrap; }
.modal__foot .btn-danger-link { margin-right: auto; background: none; border: 0; color: var(--danger); font-weight: 700; }
@media (max-width: 560px) {
    .modal-backdrop { align-items: flex-end; padding: 0; }
    .modal { border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; transform: translateY(40px); }
}

.toast-stack { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: .5rem; align-items: center; pointer-events: none; width: min(420px, calc(100% - 2rem)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); width: 100%; animation: toastIn .22s ease; }
.toast--success i { color: #6fd69a; }
.toast--error i { color: #ff8d8d; }
.toast--info i { color: #9ec3ff; }
.toast__action { margin-left: auto; background: none; border: 0; color: #b9d8f2; font-weight: 800; }
.toast.is-leaving { animation: toastOut .22s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADMINISTRATION
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar__section--admin { color: #8fc1ec; margin-top: .6rem; border-top: 1px solid rgba(255,255,255,.07); padding-top: 1rem; }
.sidebar__link--admin i { color: #8fc1ec; }
.announce { display: flex; align-items: center; gap: .7rem; padding: .6rem 1.6rem; background: var(--primary); color: #fff; font-weight: 600; font-size: .92rem; }
.announce i { color: #8fc1ec; }
@media (max-width: 1023px) { .announce { padding-left: 1rem; padding-right: 1rem; } }

.admin { display: flex; flex-direction: column; gap: 1.3rem; }
.admin h3 { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.admin h3 i { color: var(--primary); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; align-items: start; }
@media (max-width: 900px) { .admin-cols { grid-template-columns: 1fr; } }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .9rem; }
.stat { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; padding: 1rem 1.1rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; border: 1px solid rgba(0,0,0,.03); }
.stat > i { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: 1.1rem; }
.stat > div { display: flex; flex-direction: column; line-height: 1.1; }
.stat strong { font-size: 1.5rem; font-weight: 800; }
.stat span { font-size: .8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat small { flex-basis: 100%; color: var(--muted); font-size: .78rem; }
a.stat:hover { box-shadow: var(--shadow-lg); }
.chart-box--tall { height: 260px; }

.admin-toolbar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.admin-toolbar__search { position: relative; flex: 1 1 240px; }
.admin-toolbar__search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.admin-toolbar__search .input { padding-left: 2.3rem; }

.card--table { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
.table td { padding: .7rem 1rem; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #f8fafc; }
.table tr.is-inactive td { opacity: .55; }
.table .right { text-align: right; }
.cell-user { display: flex; align-items: center; gap: .7rem; }
.badge--admin { background: var(--primary); color: #fff; gap: .3rem; }
.badge--off { background: var(--danger-soft); color: var(--danger); }
.badge--warn { background: var(--warning-soft); color: #8a5a06; }
.pager { display: flex; gap: .3rem; padding: .8rem 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager__link { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 700; color: var(--ink-2); }
.pager__link:hover { background: var(--line); text-decoration: none; }
.pager__link.is-active { background: var(--primary); color: #fff; }

.dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.2rem; margin: 1rem 0 0; font-size: .92rem; }
.dl dt { color: var(--muted); font-weight: 700; }
.dl dd { margin: 0; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.action { padding: 1rem; border-radius: var(--radius-sm); background: var(--bg); display: flex; flex-direction: column; gap: .4rem; }
.action p { margin: 0 0 .3rem; }
.action .btn, .action .inline-form { margin-top: auto; }
.temp-pwd { font-size: 1.05rem; background: #fff; padding: .2rem .6rem; border-radius: 6px; border: 1px dashed var(--warning); user-select: all; }
.audit-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 .8rem; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.audit-list li:last-child { border-bottom: 0; }
.audit-list__action { font-weight: 700; font-family: ui-monospace, monospace; font-size: .8rem; color: var(--primary); }
.audit-list__time { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--bg); cursor: pointer; }
.setting--danger { background: var(--warning-soft); }
.log-view { margin: 0; padding: 1rem 1.2rem; font: .78rem/1.5 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; background: #0f1f2e; color: #d6e2ee; border-radius: 0 0 var(--radius) var(--radius); }

/* ── Page outil sur mobile : le widget occupe toute la largeur de l'écran ── */
@media (max-width: 767px) {
    .app-content--bleed { padding: 0 0 2rem; }
    .app-content--bleed .back-link { margin: .7rem 1rem .4rem; }
    .app-content--bleed .widget--full { border-radius: 0; border-left: 0; border-right: 0; min-height: calc(100vh - 140px); }
    .app-content--bleed .widget__head { padding-left: .9rem; padding-right: .6rem; }
    .app-content--bleed .shop-item { padding-left: .8rem; padding-right: .4rem; }
    .app-content--bleed .shop-item__input { padding-top: .85rem; padding-bottom: .85rem; font-size: 1.02rem; }
    .app-content--bleed .cal { padding-left: .5rem; padding-right: .5rem; }
    .app-content--bleed .cal__upcoming { padding-left: .9rem; padding-right: .9rem; }
}

/* ── Liste de courses : case à cocher à droite (zone du pouce sur mobile) ── */
.shop-item__input { order: 0; }
.shop-item__by    { order: 1; }
.shop-item__del   { order: 2; }
.shop-item__check { order: 3; margin-left: .2rem; }
.shop-item { padding-left: .9rem; padding-right: .9rem; }
.shop-item--new .shop-item__check { display: none; }
@media (max-width: 767px) {
    .shop-item__check { width: 26px; height: 26px; border-radius: 8px; }
    .shop-item__check:checked::after { left: 8px; top: 3px; width: 6px; height: 12px; }
    .shop-item__by { display: none; }
}

/* ── Sécurité : honeypot, 2FA, rappel ────────────────────────────────────── */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.totp-input { font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; letter-spacing: .35em; text-align: center; }
.totp-qr { display: inline-block; background: #fff; padding: 10px; border-radius: 10px; border: 1px solid var(--line); margin: .4rem 0; min-width: 196px; min-height: 196px; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; }
@media (max-width: 760px) { .sec-grid { grid-template-columns: minmax(0, 1fr); } }
.sec-grid > * { min-width: 0; }
.sec-block { padding: 1rem; border-radius: var(--radius-sm); background: var(--bg); min-width: 0; }
.sec-block .input, .sec-block input { min-width: 0; max-width: 100%; }
.sec-block h4 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin-bottom: .6rem; }
.sec-block h4 i { color: var(--primary); }
.notice--security { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid #c9dbea; }
.notice--security > i { color: var(--primary); font-size: 1.3rem; }
.notice--verify { border: 1px solid #c9dbea; background: #eef5fb; color: #013861; margin: 1rem 1.2rem 0; }
.notice--verify > i { color: var(--primary); font-size: 1.3rem; }
.notice--mfa { border-color: #f0c98a; background: #fff8ec; color: #6b4a00; margin: 1rem 1.2rem 0; }
.notice--mfa > i { color: var(--warning); }
/* Approbation de connexion */
.approval { text-align: center; }
.approval__status { margin-top: .8rem; padding: .8rem; border-radius: var(--radius-sm); background: var(--bg); font-size: .92rem; display: flex; gap: .5rem; align-items: center; justify-content: center; flex-wrap: wrap; }
.approval__status.is-ok { background: #e6f6ec; color: #1d6b3a; }
.approval__status.is-error { background: #fdeaea; color: #a12727; }
.approve-details { margin: 1rem 0; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }

/* ── Calendrier : vues jour / semaine / mois, légende, partagés ───────────── */
.seg { display: inline-flex; background: var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg__btn, .seg__opt span { display: inline-flex; align-items: center; justify-content: center; padding: .35rem .8rem; border-radius: 999px; border: 0; background: transparent; font-weight: 700; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.seg__btn.is-active, .seg__opt input:checked + span { background: #fff; color: var(--primary); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg--sm .seg__btn { padding: .3rem .65rem; font-size: .8rem; }
.seg__opt { position: relative; } .seg__opt input { position: absolute; opacity: 0; inset: 0; }
.cal__nav { display: flex; align-items: center; justify-content: space-between; gap: .4rem; margin-bottom: .5rem; }
.cal__title { flex: 1; background: none; border: 0; font-weight: 800; font-size: 1.05rem; color: var(--ink); text-transform: capitalize; padding: .3rem; border-radius: 8px; }
.cal__title:hover { background: var(--bg); }
.cal__legend { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.cal__chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .65rem; border-radius: 999px; font-size: .75rem; font-weight: 700; border: 1.5px solid var(--sc); color: var(--sc); background: transparent; cursor: default; }
.cal__chip.is-on { background: var(--sc); color: #fff; }
.cal__chip--shared { cursor: pointer; }
.cal__chip--shared:not(.is-on) { opacity: .6; text-decoration: line-through; }
.cal__day--we { background: #eef2f6; }
.cal__ev--shared { background: repeating-linear-gradient(135deg, var(--ev) 0 6px, color-mix(in srgb, var(--ev) 75%, white) 6px 10px); color: #fff; }
.cal__ev--shared.cal__ev--other { opacity: .85; }
.cal__ev--shared.cal__ev--timed { background: color-mix(in srgb, var(--ev) 18%, white); color: var(--ink); border-left: 3px dashed var(--ev); }

.cal__week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__wday { background: #f5f8fb; border-radius: 10px; min-height: 180px; display: flex; flex-direction: column; overflow: hidden; }
.cal__wday.is-we { background: #eef2f6; }
.cal__wday.is-today .cal__num { background: var(--tool-color); color: #fff; }
.cal__whead { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .5rem .2rem .3rem; border: 0; background: none; font-weight: 800; cursor: pointer; color: var(--ink); }
.cal__wname { font-size: .7rem; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.cal__wlist { display: flex; flex-direction: column; gap: 3px; padding: 0 .3rem .4rem; }
.cal__wlist .cal__ev { white-space: normal; line-height: 1.25; padding: 3px 6px; }
.cal__wadd { margin: auto; border: 0; background: none; color: #c3cfdb; font-size: 1.1rem; cursor: pointer; padding: .8rem; }
.cal__wadd:hover { color: var(--primary); }
@media (max-width: 767px) {
    .cal__week { grid-template-columns: 1fr; gap: 6px; }
    .cal__wday { min-height: 0; flex-direction: row; align-items: stretch; }
    .cal__whead { flex-direction: row; gap: .5rem; min-width: 84px; justify-content: flex-start; padding: .6rem .6rem; }
    .cal__wlist { flex: 1; padding: .45rem .5rem .45rem 0; justify-content: center; }
    .cal__wadd { margin: 0; padding: .2rem .5rem; }
    .cal__wlist .cal__ev { font-size: .82rem; }
}

.cal__dayview { display: flex; flex-direction: column; gap: .4rem; }
.cal__dsec { margin-bottom: .4rem; }
.cal__dlabel { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin-bottom: .3rem; }
.cal__dlist { display: flex; flex-direction: column; gap: .4rem; }
.cal__drow { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 10px; background: #f5f8fb; border-left: 5px solid var(--ev); cursor: pointer; }
.cal__drow:hover { background: #eef2f6; }
.cal__drow.is-shared { border-left-style: dashed; }
.cal__dtime { min-width: 84px; font-weight: 800; font-size: .88rem; color: var(--ev); }
.cal__dbody { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cal__dbody strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal__empty { text-align: center; padding: 1.6rem 1rem; }
.cal__empty i { font-size: 2rem; color: #c3cfdb; }
.up-ev.is-shared .up-ev__dot { background: repeating-linear-gradient(135deg, var(--ev) 0 3px, #fff 3px 5px); border: 1.5px solid var(--ev); }

/* Calendriers partagés (réglages) */
.shared-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.shared-item { --sc: var(--accent); display: flex; align-items: flex-start; gap: .9rem; padding: .8rem; border-radius: var(--radius-sm); background: var(--bg); border-left: 5px solid var(--sc); flex-wrap: wrap; }
.shared-item__meta { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: .15rem; line-height: 1.3; }
.shared-item__link { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.shared-item__link .input { flex: 1 1 220px; font-size: .8rem; }
.shared-badge { --sc: var(--accent); display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: color-mix(in srgb, var(--sc) 16%, white); color: var(--sc); font-size: 1.15rem; flex-shrink: 0; }
.shared-badge--lg { width: 64px; height: 64px; font-size: 1.8rem; margin: 0 auto .6rem; }
.shared-create > summary { list-style: none; display: inline-flex; cursor: pointer; }
.shared-create > summary::-webkit-details-marker { display: none; }
.icon-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.icon-pick { position: relative; }
.icon-pick input { position: absolute; opacity: 0; inset: 0; }
.icon-pick span { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: #fff; border: 2px solid var(--line); color: var(--ink-2); cursor: pointer; }
.icon-pick input:checked + span { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ── Sélecteur de langue ─────────────────────────────────────────────────── */
.lang-switch { display: inline-flex; flex-wrap: wrap; gap: .15rem; margin-left: .6rem; padding-left: .6rem; border-left: 1px solid var(--line); }
.lang-switch a { font-size: .75rem; font-weight: 800; padding: .25rem .5rem; border-radius: 6px; color: var(--muted); }
.lang-switch a.is-active { background: var(--primary); color: #fff; }
.lang-switch a:hover { text-decoration: none; color: var(--ink); }
.lang-switch--sidebar { border-left: 0; margin: 0 .5rem .5rem; padding: 0; }
.lang-switch--sidebar a { color: var(--sidebar-ink); }
.lang-switch--sidebar a.is-active { background: rgba(255,255,255,.15); color: #fff; }
@media (max-width: 767px) { .site-nav .lang-switch { border-left: 0; padding: .8rem .2rem; margin: 0; } }

/* ── FullCalendar : habillage Mamifa (rendu type Outlook) ────────────────── */
.cal__fc { --fc-border-color: var(--line); --fc-page-bg-color: #fff; --fc-neutral-bg-color: #f5f8fb; --fc-today-bg-color: #eaf2fa;
           --fc-now-indicator-color: var(--danger); --fc-event-border-color: transparent; --fc-highlight-color: rgba(42,127,193,.15);
           --fc-non-business-color: rgba(15,31,46,.035); --fc-small-font-size: .78rem; font-size: .88rem; }
.cal__fc .fc { font-family: var(--font); }
.cal__fc .fc-theme-standard td, .cal__fc .fc-theme-standard th, .cal__fc .fc-theme-standard .fc-scrollgrid { border-color: var(--line); }
.cal__fc .fc-scrollgrid { border-radius: 10px; overflow: hidden; }
.cal__fc .fc-col-header-cell { background: #f8fafc; }
.cal__fc .fc-col-header-cell-cushion { padding: .5rem .3rem; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-decoration: none !important; }
.cal__fc .fc-day-today .fc-col-header-cell-cushion { color: var(--primary); }
.cal__fc .fc-daygrid-day-number { font-weight: 800; font-size: .8rem; color: var(--ink); padding: .3rem .45rem; text-decoration: none !important; }
.cal__fc .fc-day-today .fc-daygrid-day-number { background: var(--tool-color); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; padding: 0; margin: .25rem; }
.cal__fc .fc-day-sat, .cal__fc .fc-day-sun { background: #f8fafc; }
.cal__fc .fc-daygrid-day.fc-day-other { background: #fbfcfd; }
.cal__fc .fc-timegrid-slot { height: 2.2em; }
.cal__fc .fc-timegrid-slot-label-cushion, .cal__fc .fc-timegrid-axis-cushion { font-size: .72rem; color: var(--muted); font-weight: 700; }
.cal__fc .fc-timegrid-now-indicator-line { border-width: 2px 0 0; }
.cal__fc .fc-timegrid-now-indicator-arrow { border-color: var(--danger); border-width: 6px 0 6px 7px; }
.cal__fc .fc-event { border-radius: 6px; font-weight: 700; font-size: .78rem; padding: 1px 4px; box-shadow: 0 1px 2px rgba(0,0,0,.12); cursor: pointer; }
.cal__fc .fc-v-event { border-left: 4px solid rgba(0,0,0,.25); }
.cal__fc .fc-event .fc-event-time { font-weight: 600; opacity: .9; }
.cal__fc .fc-daygrid-event { border-radius: 5px; }
.cal__fc .fc-daygrid-dot-event .fc-event-title { font-weight: 700; }
.cal__fc .fc-daygrid-more-link { font-weight: 800; font-size: .72rem; color: var(--muted); }
.cal__fc .mf-ev--shared { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px); }
.cal__fc .mf-ev--other { opacity: .88; }
.cal__fc .mf-ev--locked { cursor: default; }
.cal__fc .fc-list { border-radius: 10px; }
.cal__fc .fc-list-day-cushion { background: #f8fafc !important; font-weight: 800; }
.cal__fc .fc-list-event:hover td { background: #f5f8fb; }
.cal__fc .fc-list-event-dot { border-width: 6px; }
.cal__fc .fc-popover { border-radius: 10px; box-shadow: var(--shadow-lg); border-color: var(--line); }
.cal__fc .fc-popover-header { background: #f8fafc; font-weight: 800; }
.cal__fc .fc-timegrid-event-harness-inset .fc-timegrid-event { box-shadow: 0 0 0 1px #fff; }
.cal__fc .fc-highlight { border-radius: 6px; }
.cal__fc a.fc-daygrid-week-number { background: transparent; color: #b8c4d0; font-size: .65rem; font-weight: 800; text-decoration: none !important; }
.widget--full .cal__fc .fc-event { font-size: .82rem; }
.cal .cal__nav .cal__title { text-transform: none; }
@media (max-width: 767px) {
    .cal__fc { font-size: .82rem; }
    .cal__fc .fc-timegrid-slot { height: 2.6em; }
    .cal__fc .fc-col-header-cell-cushion { font-size: .68rem; padding: .4rem .1rem; }
    .cal__fc .fc-timegrid-slot-label-cushion { font-size: .66rem; }
    .cal__fc .fc-event { font-size: .72rem; }
    .cal__fc .fc-timegrid-axis-cushion { display: none; }
}

/* ── Tableau de bord : grille GridStack ──────────────────────────────────── */
.dash-head__right { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.dash-tools { display: flex; align-items: center; gap: .2rem; }
.dash-tools .is-error { color: var(--danger); }
.widgets.grid-stack.is-grid { display: block; }              /* GridStack actif : positionnement absolu ; sinon la grille CSS reste */
.widgets--static { display: grid !important; }
.grid-stack > .grid-stack-item > .grid-stack-item-content { overflow: hidden; border-radius: var(--radius); }
.grid-stack .widget { height: 100%; }
.grid-stack .widget__head { cursor: grab; user-select: none; }
.grid-stack.is-locked .widget__head { cursor: default; }
.grid-stack-item.ui-draggable-dragging .widget__head { cursor: grabbing; }
.grid-stack-item.ui-draggable-dragging .widget, .grid-stack-item.ui-resizable-resizing .widget { box-shadow: var(--shadow-lg); }
.grid-stack .grid-stack-placeholder > .placeholder-content { background: var(--primary-soft); border: 2px dashed var(--accent); border-radius: var(--radius); }
.grid-stack > .grid-stack-item > .ui-resizable-se, .grid-stack > .grid-stack-item > .ui-resizable-sw { width: 18px; height: 18px; bottom: 6px; background: none; opacity: 0; transition: opacity .15s; }
.grid-stack > .grid-stack-item > .ui-resizable-se { right: 6px; border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); border-radius: 0 0 6px 0; transform: none; }
.grid-stack > .grid-stack-item > .ui-resizable-sw { left: 6px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); border-radius: 0 0 0 6px; transform: none; }
.grid-stack > .grid-stack-item:hover > .ui-resizable-se, .grid-stack > .grid-stack-item:hover > .ui-resizable-sw { opacity: .8; }
.grid-stack.is-locked > .grid-stack-item > .ui-resizable-handle { display: none; }
/* Widgets qui remplissent la hauteur de leur cellule */
.grid-stack .widget--shopping .shop-list { max-height: none; flex: 1; min-height: 0; }
.grid-stack .widget--calendar .cal { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.grid-stack .widget--calendar .cal__fc { flex: 1; min-height: 0; }
.grid-stack .widget--calendar .cal__upcoming { max-height: 140px; overflow: auto; }
@media (max-width: 767px) { .widgets.grid-stack { display: none; } }

/* ── Sidebar repliable (PC) : icônes seules, largeur réduite ─────────────── */
.sidebar { transition: width .25s ease; }
.sidebar__collapse { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .8rem; margin-bottom: .4rem; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--sidebar-ink); font-weight: 700; font-size: .85rem; cursor: pointer; }
.sidebar__collapse:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar__collapse i { width: 20px; text-align: center; }
@media (max-width: 1023px) { .sidebar__collapse { display: none; } }
@media (min-width: 1024px) {
    html.sb-collapsed { --sidebar-w: 72px; }
    html.sb-collapsed .sidebar__label, html.sb-collapsed .sidebar__section, html.sb-collapsed .brand span,
    html.sb-collapsed .user-chip__meta, html.sb-collapsed .lang-switch--sidebar, html.sb-collapsed .family-switcher__menu { display: none; }
    html.sb-collapsed .sidebar__brand { justify-content: center; padding-left: .6rem; padding-right: .6rem; }
    html.sb-collapsed .sidebar__family { padding: .3rem .6rem .6rem; }
    html.sb-collapsed .family-switcher__name { justify-content: center; padding: .55rem 0; font-size: 0; }
    html.sb-collapsed .family-switcher__name i { font-size: 1.1rem; }
    html.sb-collapsed .family-switcher summary { justify-content: center; padding: .4rem 0; }
    html.sb-collapsed .family-switcher summary > i { display: none; }
    html.sb-collapsed .sidebar__nav { padding: .4rem .6rem; }
    html.sb-collapsed .sidebar__link { justify-content: center; padding: .7rem 0; }
    html.sb-collapsed .sidebar__link i { width: auto; font-size: 1.15rem; }
    html.sb-collapsed .sidebar__section--admin { display: block; font-size: 0; height: 1px; padding: 0; margin: .8rem .4rem .4rem; }
    html.sb-collapsed .sidebar__footer { padding: .6rem .5rem; }
    html.sb-collapsed .sidebar__collapse { justify-content: center; padding: .55rem 0; }
    html.sb-collapsed .user-chip { flex-direction: column; gap: .4rem; padding: .3rem 0; }
    html.sb-collapsed .user-chip .avatar { width: 36px; height: 36px; font-size: .8rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   OUTILS v0.7 — styles communs des widgets pilotés par JS
   ═══════════════════════════════════════════════════════════════════════════ */
.tool-body { padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .6rem; overflow: auto; flex: 1; min-height: 0; }
.widget__badge { font-weight: 700; margin-left: .3rem; }
.tb-nav { display: flex; align-items: center; justify-content: space-between; gap: .4rem; }
.tb-nav__title { flex: 1; text-align: center; display: flex; flex-direction: column; line-height: 1.25; }
.tb-section { border-top: 1px solid var(--line); padding-top: .6rem; }
.tb-section h4 { text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; margin-bottom: .4rem; }
.tb-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 800; margin: .6rem 0 .2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips--scroll { max-height: 140px; overflow: auto; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: .8rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.chip:hover, .chip.is-active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.grid-3 { display: grid; grid-template-columns: 1fr 2fr 1.4fr; gap: .5rem; }
.is-error { color: var(--danger); }
.is-plus { color: var(--success); font-weight: 700; } .is-minus { color: var(--danger); font-weight: 700; }
.notice--gift { background: #fff5df; color: #6c4a08; border: 1px solid #f6e3b4; }
.notice--gift > i { color: var(--warning); font-size: 1.3rem; }

/* Budget */
.bud-cats { display: flex; flex-direction: column; gap: .45rem; }
.bud-cat { padding: .45rem .6rem; border-radius: 8px; background: var(--bg); cursor: pointer; }
.bud-cat:hover { background: #eaf0f6; }
.bud-cat.is-over .bud-bar span { background: var(--danger); }
.bud-cat__head { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; }
.bud-bar { height: 6px; border-radius: 3px; background: #dde6ee; margin: .3rem 0 .15rem; overflow: hidden; }
.bud-bar span { display: block; height: 100%; background: var(--tool-color); border-radius: 3px; transition: width .3s; }
.bud-list { display: flex; flex-direction: column; }
.bud-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: .6rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid #eef2f6; cursor: pointer; font-size: .9rem; }
.bud-item:hover { background: #f8fafc; }
.bud-item__cat { --sc: var(--tool-color); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, white); padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.bud-item__note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bud-shared { border-left: 4px solid var(--sc); padding: .4rem .7rem; border-radius: 8px; background: var(--bg); margin-top: .4rem; font-size: .9rem; }
.bud-shared__row { display: flex; justify-content: space-between; gap: .6rem; padding: .15rem 0; }

/* Corvées */
.ch-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ch-streak { font-weight: 800; color: var(--warning); background: var(--warning-soft); padding: .3rem .7rem; border-radius: 999px; font-size: .85rem; }
.ch-board { display: flex; flex-wrap: wrap; gap: .35rem; }
.ch-player { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem .25rem .3rem; border-radius: 999px; background: var(--bg); font-size: .8rem; font-weight: 700; }
.ch-player.is-leader { background: #fff5df; }
.ch-list { display: flex; flex-direction: column; gap: .45rem; }
.ch-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: 10px; background: var(--bg); transition: transform .15s, opacity .2s; }
.ch-item.is-today { background: #eaf2fa; }
.ch-item.is-overdue { background: var(--danger-soft); }
.ch-item.is-doing { opacity: .4; transform: scale(.98); }
.ch-item__icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #fff; color: var(--tool-color); font-size: 1rem; flex-shrink: 0; }
.ch-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; cursor: pointer; }
.ch-item__body strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-done { border-radius: 12px; padding: .7rem 1rem; font-size: .95rem; box-shadow: 0 6px 16px -8px var(--primary); }
.ch-done:active { transform: scale(.95); }
.ch-recent li { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .85rem; }
.ch-recent li span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; }
.who { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .8rem .4rem; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-weight: 700; cursor: pointer; }
.who:hover { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 767px) { .ch-done span { display: none; } }

/* Repas */
.meal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.meal-day { display: flex; flex-direction: column; gap: 3px; }
.meal-day__head { text-align: center; font-size: .7rem; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.meal-day.is-today .meal-day__head b { background: var(--tool-color); color: #fff; border-radius: 50%; padding: 0 .35rem; }
.meal-slot { display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 58px; padding: .3rem .35rem; border-radius: 8px; border: 1.5px dashed var(--line); background: #fff; text-align: left; cursor: pointer; }
.meal-slot.is-set { border-style: solid; border-color: transparent; background: color-mix(in srgb, var(--tool-color) 12%, white); }
.meal-slot:hover { border-color: var(--tool-color); }
.meal-slot__label { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 800; }
.meal-slot__name { font-size: .78rem; font-weight: 700; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
@media (max-width: 767px) { .meal-grid { grid-template-columns: 1fr; } .meal-day { flex-direction: row; align-items: stretch; } .meal-day__head { min-width: 56px; display: flex; flex-direction: column; justify-content: center; } .meal-slot { flex: 1; min-height: 48px; } }
.rc-list { display: flex; flex-direction: column; }
.rc-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid #eef2f6; cursor: pointer; }
.rc-item strong { flex: 1; }
.rc-pick { display: flex; flex-direction: column; gap: .3rem; max-height: 260px; overflow: auto; }
.rc-pick__item { display: flex; flex-direction: column; align-items: flex-start; padding: .5rem .7rem; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; text-align: left; }
.rc-pick__item:hover, .rc-pick__item.is-active { border-color: var(--primary); background: var(--primary-soft); }
.ing-rows { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .4rem; }
.ing-row { display: grid; grid-template-columns: 1fr 70px 80px auto; gap: .35rem; }
.ing-row .input { padding: .45rem .6rem; font-size: .88rem; }

/* Anniversaires */
.bd-list { display: flex; flex-direction: column; }
.bd-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .4rem; border-bottom: 1px solid #eef2f6; }
.bd-item.is-due { background: #fff8e8; border-radius: 8px; }
.bd-item.is-today { background: #eaf2fa; border-radius: 8px; }
.bd-date { display: flex; flex-direction: column; align-items: center; min-width: 44px; line-height: 1; padding: .3rem 0; border-radius: 8px; background: var(--bg); }
.bd-date b { font-size: 1.1rem; } .bd-date small { font-size: .65rem; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.bd-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; cursor: pointer; }

/* Contacts */
.ct-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .3rem; border-bottom: 1px solid #eef2f6; }
.ct-item.is-emergency { background: var(--danger-soft); border-radius: 8px; }
.ct-body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; cursor: pointer; }
.ct-body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-actions { display: flex; gap: .1rem; }
.ct-actions .icon-btn { color: var(--primary); }

/* Notes */
.nt-grid { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.nt-grid--full { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: start; }
.nt-card { background: var(--bg); border-radius: 10px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .4rem; }
.nt-card.is-pinned { background: #fff8e8; }
.nt-card__head { display: flex; align-items: center; gap: .5rem; }
.nt-card__head strong { flex: 1; }
.nt-list { display: flex; flex-direction: column; }
.nt-item { display: flex; align-items: center; gap: .4rem; }
.nt-item__input { flex: 1; border: 0; background: transparent; padding: .35rem .2rem; font-weight: 600; outline: none; min-width: 0; }
.nt-item.is-done .nt-item__input { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.nt-item__del { opacity: 0; width: 26px; height: 26px; } .nt-item:hover .nt-item__del { opacity: 1; }
.nt-item--new .nt-item__input::placeholder { color: #9fb0c2; }
.nt-text { width: 100%; border: 0; background: transparent; resize: vertical; font: inherit; outline: none; }

/* Véhicule */
.vh-block { display: flex; flex-direction: column; gap: .4rem; }
.vh-head { display: flex; align-items: center; gap: .6rem; }
.vh-head > div { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.vh-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.widget--full .vh-strip { grid-template-columns: repeat(14, 1fr); }
.vh-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem .1rem; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: .7rem; }
.vh-day .avatar { margin: 2px 0; } .vh-day small { font-size: .62rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vh-day.is-booked { border-color: var(--avatar); background: color-mix(in srgb, var(--avatar) 12%, white); }
.vh-day.is-today b { background: var(--tool-color); color: #fff; border-radius: 50%; padding: 0 .35rem; }
.vh-day__name { text-transform: uppercase; color: var(--muted); font-weight: 800; font-size: .6rem; }
@media (max-width: 900px) { .widget--full .vh-strip { grid-template-columns: repeat(7, 1fr); } }

/* Check-in */
.ci-buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
.ci-btn { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .4rem; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font-weight: 800; cursor: pointer; box-shadow: 0 6px 16px -10px var(--primary); }
.ci-btn i { font-size: 1.3rem; } .ci-btn:active { transform: scale(.96); }
.ci-btn--leaving { background: #1b5c8c; } .ci-btn--home { background: #2a7fc1; } .ci-btn--late { background: var(--warning); } .ci-btn--ok { background: var(--success); }
.ci-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.ci-member { display: flex; align-items: center; gap: .6rem; padding: .5rem; border-radius: 10px; background: var(--bg); }
.ci-member > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.ci-feed li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; font-size: .85rem; border-bottom: 1px solid #eef2f6; }
.ci-feed li span:nth-child(2) { flex: 1; }

/* Garde alternée */
.cu-tonight { font-weight: 700; background: var(--primary-soft); color: var(--primary-dark); padding: .5rem .8rem; border-radius: 8px; margin: 0; }
.cu-block { display: flex; flex-direction: column; gap: .4rem; }
.cu-head { display: flex; align-items: center; gap: .5rem; } .cu-head strong { flex: 0 0 auto; } .cu-head .muted { flex: 1; }
.cu-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.widget--full .cu-strip { grid-template-columns: repeat(14, 1fr); }
.cu-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .35rem .1rem; border-radius: 8px; font-size: .7rem; border: 1.5px solid transparent; }
.cu-day.is-here { background: color-mix(in srgb, var(--avatar) 18%, white); color: var(--ink); }
.cu-day.is-other { background: #f1f4f8; color: var(--muted); }
.cu-day.is-today { border-color: var(--tool-color); }
.cu-day__name { text-transform: uppercase; font-weight: 800; font-size: .6rem; }
.cu-edit { display: flex; flex-direction: column; gap: .3rem; }
.cu-edit__label { font-weight: 700; font-size: .85rem; }
.cu-toggles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cu-toggle { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .4rem 0; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-size: .68rem; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.cu-toggle.is-here { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.cu-toggle.is-other { background: #f1f4f8; color: var(--muted); }
@media (max-width: 900px) { .widget--full .cu-strip { grid-template-columns: repeat(7, 1fr); } }


/* ═══════════════════════════════════════════════════════════════════════════
   PAGE D'ACCUEIL v0.8 — ruban, spotlights, tuiles d'outils, scénarios, FAQ
   ═══════════════════════════════════════════════════════════════════════════ */
.hero .lead strong { color: #fff; }
.ribbon { background: #fff; border-bottom: 1px solid var(--line); }
.ribbon__inner { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; flex-wrap: wrap; }
.ribbon__lead { font-weight: 800; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ribbon__tools { flex: 1; min-width: 0; overflow: hidden; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ribbon__track { display: flex; width: max-content; animation: ribbon-scroll 45s linear infinite; }
.ribbon__set { display: flex; gap: .4rem; padding-right: .4rem; }
.ribbon__tools:hover .ribbon__track, .ribbon__tools:focus-within .ribbon__track { animation-play-state: paused; }
@keyframes ribbon-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ribbon__track { animation: none; } .ribbon__tools { overflow-x: auto; mask-image: none; -webkit-mask-image: none; scrollbar-width: thin; } .ribbon__set[aria-hidden] { display: none; } }
.ribbon__tool { --tool-color: var(--primary); display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--tool-color) 10%, white); color: var(--tool-color); font-weight: 700; font-size: .82rem; white-space: nowrap; text-decoration: none !important; transition: transform .15s; }
.ribbon__tool:hover { transform: translateY(-2px); background: var(--tool-color); color: #fff; }

.spot { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.5rem; align-items: center; }
.spot--reverse .spot__media { order: 2; }
@media (max-width: 900px) { .spot { grid-template-columns: 1fr; gap: 2rem; } .spot--reverse .spot__media { order: 0; } }
.spot__media { position: relative; }
.spot__media > img { width: 100%; height: 420px; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-lg); }
.spot__card { position: absolute; right: -14px; bottom: -22px; width: min(340px, 86%); background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); padding: .8rem 1rem; }
.spot--reverse .spot__card { right: auto; left: -14px; }
@media (max-width: 560px) { .spot__media > img { height: 300px; } .spot__card { position: relative; z-index: 1; right: auto; bottom: auto; width: auto; margin: -2.2rem 1rem 0; } .spot--reverse .spot__card { left: auto; } }
.spot__card .mock__row { padding: .45rem .2rem; font-size: .88rem; }
.spot__card .mock__foot { margin-top: .5rem; }
.spot__text h2 { margin-bottom: .8rem; }

.mock-chore { display: flex; align-items: center; gap: .6rem; padding: .45rem .3rem; border-bottom: 1px solid var(--line); font-size: .85rem; }
.mock-chore > div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; } .mock-chore small { color: var(--muted); }
.mock-chore__icon { width: 30px; height: 30px; border-radius: 8px; background: var(--bg); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.mock-done { background: var(--primary); color: #fff; font-weight: 800; font-size: .75rem; padding: .35rem .6rem; border-radius: 9px; }
.mock-done--ghost { background: var(--line); color: var(--muted); }
.mock-board { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; font-size: .75rem; }
.mock-board__p { background: var(--bg); padding: .2rem .55rem; border-radius: 999px; font-weight: 700; } .mock-board__p.is-leader { background: #fff5df; }
.mock-board__streak { color: var(--warning); font-weight: 800; padding: .2rem .3rem; }
.confetti-dots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 14px; }
.confetti-dots i { position: absolute; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); animation: confetti 3.2s ease-in infinite; opacity: 0; }
.confetti-dots i:nth-child(1) { left: 10%; background: #013861; animation-delay: 0s; } .confetti-dots i:nth-child(2) { left: 25%; background: #5aa0d8; animation-delay: .4s; }
.confetti-dots i:nth-child(3) { left: 40%; background: #d08a12; animation-delay: .9s; } .confetti-dots i:nth-child(4) { left: 55%; background: #2a7fc1; animation-delay: .2s; }
.confetti-dots i:nth-child(5) { left: 70%; background: #7fb3e0; animation-delay: 1.3s; } .confetti-dots i:nth-child(6) { left: 85%; background: #d64545; animation-delay: .6s; }
.confetti-dots i:nth-child(7) { left: 33%; background: #2f9e63; animation-delay: 1.7s; } .confetti-dots i:nth-child(8) { left: 62%; background: #013861; animation-delay: 2.1s; }
@keyframes confetti { 0% { transform: translateY(-10px) rotate(0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translateY(240px) rotate(540deg); opacity: 0; } }

.mock-cal__head { font-weight: 800; font-size: .85rem; margin-bottom: .4rem; }
.mock-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mock-cal__day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--bg); font-size: .75rem; font-weight: 700; }
.mock-cal__day.is-a { background: repeating-linear-gradient(135deg, #2a7fc1 0 5px, #4c95d0 5px 10px); color: #fff; }
.mock-cal__day.is-b { background: repeating-linear-gradient(135deg, #7fb3e0 0 5px, #9cc4e8 5px 10px); color: #013861; }
.mock-cal__legend { display: flex; gap: .8rem; margin-top: .5rem; font-size: .75rem; font-weight: 700; }
.mock-cal__legend .is-a { color: #2a7fc1; } .mock-cal__legend .is-b { color: #5a8fb8; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.2rem; }
.tile { --tool-color: var(--primary); background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile img { height: 150px; width: 100%; object-fit: cover; }
.tile__body { padding: 1.1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.tile__body .feature__icon { width: 40px; height: 40px; font-size: 1.05rem; margin: -2.4rem 0 .3rem; border: 3px solid #fff; box-shadow: var(--shadow); background: var(--tool-color); color: #fff; }
.tile h3 { font-size: 1.05rem; margin: 0; } .tile p { margin: 0; font-size: .92rem; color: var(--ink-2); flex: 1; }
.tile .badge { align-self: flex-start; margin-top: .4rem; }

.scen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.scen { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 300px; display: flex; align-items: flex-end; color: #fff; box-shadow: var(--shadow); }
.scen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.scen:hover img { transform: scale(1.04); }
.scen__body { position: relative; padding: 1.2rem; background: linear-gradient(to top, rgba(1,42,73,.92) 0%, rgba(1,42,73,.6) 60%, transparent 100%); width: 100%; }
.scen__body h3 { font-size: 1.05rem; margin-bottom: .3rem; } .scen__body h3 i { color: #b9d8f2; margin-right: .3rem; }
.scen__body .muted { color: rgba(255,255,255,.85); font-size: .9rem; margin: 0; }

.sec-visual { position: relative; }
.sec-visual img { width: 100%; height: 380px; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow-lg); }
.sec-visual__badge { position: absolute; left: 1rem; bottom: 1rem; display: flex; align-items: center; gap: .7rem; background: #fff; padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); }
.sec-visual__badge i { font-size: 1.4rem; color: var(--primary); } .sec-visual__badge div { display: flex; flex-direction: column; line-height: 1.25; } .sec-visual__badge small { color: var(--muted); }

.faq { max-width: 780px; }
.faq__item { background: #fff; border-radius: 12px; border: 1px solid var(--line); margin-bottom: .6rem; padding: 0 1.2rem; }
.faq__item summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 800; cursor: pointer; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i { transition: transform .2s; color: var(--muted); } .faq__item[open] summary i { transform: rotate(180deg); }
.faq__item p { margin: 0 0 1rem; line-height: 1.6; }
.cta__small { margin-top: 1rem; font-size: .85rem; opacity: .85; }

/* ── Topbar : burger toujours visible + menu utilisateur (avatar à droite) ── */
.topbar__burger { display: inline-flex !important; }
.topbar__actions { display: flex; align-items: center; gap: .6rem; }
.sidebar__version { display: block; text-align: center; color: #6f8394; padding: .4rem 0; }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border-radius: 999px; cursor: pointer; border: 1.5px solid transparent; font-weight: 700; color: var(--ink); }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: #fff; border-color: var(--line); }
.user-menu__name { font-size: .9rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); width: 260px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: .5rem; z-index: 50; animation: toastIn .15s ease; }
.user-menu__head { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.user-menu__head div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-menu__head .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .7rem; border-radius: 8px; border: 0; background: none; color: var(--ink); font-weight: 600; font-size: .92rem; text-align: left; cursor: pointer; text-decoration: none !important; }
.user-menu__item i { width: 18px; text-align: center; color: var(--primary); }
.user-menu__item:hover { background: var(--bg); }
.user-menu__item--admin i { color: var(--accent); }
.user-menu__item--danger { color: var(--danger); } .user-menu__item--danger i { color: var(--danger); }
.user-menu__logout { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .4rem; }
.user-menu__langs { display: flex; flex-wrap: wrap; gap: .3rem; padding: .4rem .7rem; }
.user-menu__langs a { font-size: .75rem; font-weight: 800; padding: .2rem .5rem; border-radius: 6px; color: var(--muted); }
.user-menu__langs a.is-active { background: var(--primary); color: #fff; }
@media (max-width: 480px) { .user-menu__panel { position: fixed; left: 1rem; right: 1rem; top: 64px; width: auto; } }

/* Sidebar : icônes d'outils éclaircies pour rester lisibles sur le fond sombre */
.sidebar__link i { color: color-mix(in srgb, var(--tool-color, #8fc1ec) 45%, #ffffff); }
.sidebar__link.is-active i, .sidebar__link:hover i { color: #fff; }
.invite-list li .btn-sm { padding: .3rem .6rem; font-size: .8rem; }

/* ── Parrainage ──────────────────────────────────────────────────────────── */
.ref-link { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.ref-link .input { flex: 1 1 240px; font-size: .9rem; }
.ref-share { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.ref-level { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; border-radius: 10px; background: var(--primary-soft); }
.ref-level__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.ref-level div { display: flex; flex-direction: column; line-height: 1.3; }
.ref-bar { margin: .5rem 0 .8rem; }
.ref-bar span { background: var(--primary); }

/* ── Affichage mobile uniquement (pendant de .hide-mobile) ───────────────── */
.only-mobile { display: none; }
@media (max-width: 767px) { .only-mobile { display: inline; } }
.only-mobile[hidden] { display: none !important; }

/* ── Liste de courses : poignée de glisser-déposer (l'ordre = la priorité) ── */
.shop-item__grip { order: -1; width: 28px; height: 36px; display: inline-flex; align-items: center; justify-content: center; color: #b8c4d0; cursor: grab; touch-action: none; flex-shrink: 0; margin-left: -.45rem; border-radius: 8px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.shop-item__grip:active { cursor: grabbing; }
.shop-item--done .shop-item__grip, .shop-item--new .shop-item__grip { visibility: hidden; }
.shop-item.is-dragging { background: var(--accent-soft); box-shadow: 0 10px 24px -12px rgba(1,56,97,.55); position: relative; z-index: 2; border-radius: 8px; }
.shop-item.is-dragging .shop-item__grip { color: var(--tool-color, var(--accent)); }
@media (hover: hover) {
    .shop-item__grip { opacity: .45; }
    .shop-item:hover .shop-item__grip, .shop-item.is-dragging .shop-item__grip { opacity: 1; }
}
.shop-hint { color: #9fb0c2; }
.widget__foot { flex-wrap: wrap; gap: .3rem .8rem; }

/* ── Calendrier : modale d'abonnement (synchro agenda du téléphone) ──────── */
.sync-list { display: flex; flex-direction: column; gap: .5rem; }
.sync-btn { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); text-align: left; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
.sync-btn:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.sync-btn > i:first-child { width: 1.5rem; text-align: center; font-size: 1.15rem; color: var(--primary); flex-shrink: 0; }
.sync-btn span { flex: 1; min-width: 0; }
.sync-btn small { display: block; font-weight: 500; font-size: .76rem; opacity: .75; }
.sync-btn__ext { font-size: .8rem; opacity: .45; flex-shrink: 0; }
.sync-btn--primary, .sync-btn--primary:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.sync-btn--primary > i:first-child { color: #fff; }

/* ── Corvées : « Bravo ! » plein écran ───────────────────────────────────── */
.bravo { position: fixed; inset: 0; z-index: 99; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(1,42,73,.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; cursor: pointer; }
.bravo.is-open { opacity: 1; }
.bravo__card { background: var(--card); border-radius: 24px; padding: 2rem 1.6rem 1.5rem; text-align: center; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); transform: scale(.8); transition: transform .4s cubic-bezier(.2, 1.4, .4, 1); }
.bravo.is-open .bravo__card { transform: none; }
.bravo__emoji { font-size: 3.6rem; line-height: 1; animation: bravoBounce .9s ease-in-out infinite alternate; }
.bravo__title { font-size: 2.2rem; font-weight: 800; color: var(--primary); margin: .5rem 0 .1rem; line-height: 1.1; }
.bravo__text { color: var(--muted); margin: 0; }
.bravo__what { display: block; font-size: 1.3rem; font-weight: 800; color: var(--ink); margin: .35rem 0 .9rem; overflow-wrap: anywhere; }
.bravo__what i { color: var(--accent); margin-right: .3rem; }
.bravo__points { display: inline-block; background: var(--warning-soft); color: var(--warning); font-weight: 800; padding: .35rem .95rem; border-radius: 999px; margin-bottom: 1.2rem; }
@keyframes bravoBounce { from { transform: translateY(0) rotate(-8deg); } to { transform: translateY(-10px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .bravo__emoji { animation: none; } .bravo__card { transition: none; } }

/* ── Outil « Calendrier partagé avec d'autres familles » ─────────────────── */
.sh-list { display: flex; flex-direction: column; gap: .7rem; }
.sh-card { --sc: var(--accent); border: 1.5px solid var(--line); border-left: 5px solid var(--sc); border-radius: var(--radius-sm); background: var(--card); padding: .8rem .9rem; display: flex; flex-direction: column; gap: .6rem; }
.sh-card__head { display: flex; align-items: center; gap: .7rem; }
.sh-card__title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.sh-card__title strong { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-card__tools { display: flex; gap: .1rem; flex-shrink: 0; }
.sh-card__with .tb-group { margin: 0 0 .3rem; }
.sh-fams { display: flex; flex-wrap: wrap; gap: .35rem; }
.sh-fam { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 999px; background: var(--bg); font-size: .8rem; font-weight: 700; }
.sh-fam.is-mine { background: var(--primary-soft); color: var(--primary); }
.sh-fam.is-owner > i { color: var(--warning); }
.sh-fam em { font-style: normal; font-weight: 500; opacity: .7; }
.sh-fam__x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 0 0 .15rem; line-height: 1; font-size: .85rem; }
.sh-fam__x:hover { color: var(--danger); }
.sh-card__hint { margin: .35rem 0 0; }
.sh-card__foot { display: flex; flex-wrap: wrap; gap: .5rem; }
.sh-empty { text-align: center; padding: 1.2rem .5rem; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.sh-empty h4 { margin: 0; font-size: 1.1rem; }
.sh-empty p { max-width: 400px; margin: 0; }
.sh-mail { border: 1.5px solid var(--line); border-radius: 12px; padding: .7rem .9rem; display: flex; flex-direction: column; gap: .6rem; }
.sh-mail__head { display: flex; align-items: center; gap: .8rem; font-weight: 700; }
.sh-mail__head > i { width: 1.5rem; text-align: center; font-size: 1.15rem; color: var(--primary); flex-shrink: 0; }
.sh-mail__head small { display: block; font-weight: 500; font-size: .76rem; opacity: .75; }
.sh-mail__row { display: flex; gap: .5rem; }
.sh-mail__row .input { flex: 1; min-width: 0; }
@media (max-width: 480px) { .sh-mail__row { flex-direction: column; } .sh-mail__row .btn { width: 100%; } }

/* ── Abonnement agenda : choix du calendrier (mifa ou calendrier partagé) ── */
.sync-pick { display: flex; flex-wrap: wrap; gap: .4rem; }
.sync-pick__btn { --sc: var(--primary); display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .75rem; border-radius: 999px; border: 1.5px solid var(--line); border-left: 5px solid var(--sc); background: var(--card); font: inherit; font-size: .85rem; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.sync-pick__btn i { color: var(--sc); }
.sync-pick__btn:hover, .sync-pick__btn.is-active { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, white); color: var(--ink); }
.sync-check { color: var(--danger); }

/* ── Liste de courses : listes multiples (par défaut + événements) ───────── */
.shop-lists { display: flex; gap: .4rem; padding: .6rem .9rem 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.shop-lists::-webkit-scrollbar { display: none; }
.shop-chip { white-space: nowrap; flex-shrink: 0; gap: .35rem; }
.shop-chip b { background: var(--line); color: var(--ink-2); border-radius: 999px; padding: .05rem .45rem; font-size: .72rem; line-height: 1.4; }
.shop-chip.is-active b { background: var(--primary); color: #fff; }
.shop-chip--add { border-style: dashed; color: var(--muted); }
.shop-chip__edit { display: inline-flex; align-items: center; margin-left: .1rem; padding: .1rem .2rem; border-radius: 6px; opacity: .7; }
.shop-chip__edit:hover { opacity: 1; background: rgba(255,255,255,.6); }
@media (max-width: 767px) { .app-content--bleed .shop-lists { padding-left: .8rem; padding-right: .8rem; } }
