/* =========================================================
   kdo — feuille de style commune
   Thème clair pastel (par défaut) + thème sombre noir-gris.
   Le thème se choisit avec <html data-theme="light|dark|auto">.
   Couleurs du logo : lavande #978BC3, rose #E6AAB9, pêche #EEBBA0
   ========================================================= */
:root {
  color-scheme: light;
  --bg: #FFF9F6;
  --surface: #FFFFFF;
  --surface-2: #FFFBFC;
  --ink: #3B3247;
  --ink-2: #5E546B;
  --muted: #8C8198;
  --line: #F3E8EE;
  --line-2: #E9DCE5;
  --ill-ink: #3B3247; /* contour des illustrations */

  --brand: #978BC3;  --brand-deep: #6C5DAA;  --brand-dd: #5A4C96;  --on-brand: #FFFFFF;
  --rose: #F2B6C4;   --rose-soft: #FDEBF0;   --rose-deep: #C24A69;  --rose-dd: #A83A57;  --on-rose: #FFFFFF;  --rose-line: #F5D3DC;
  --lav: #CFC6EC;    --lav-soft: #F1EEFB;    --lav-deep: #6C5DAA;
  --mint: #B4E2CD;   --mint-soft: #E6F6EE;   --mint-deep: #2F7D5D;  --on-mint: #FFFFFF;
  --sky: #B9DCF6;    --sky-soft: #EAF4FD;    --sky-deep: #3A6EA5;
  --peach: #FFD2B8;  --peach-soft: #FFF0E6;  --peach-deep: #A9582A;
  --butter: #F9E3A0; --butter-soft: #FFF7DD; --butter-deep: #82610E;

  --glow-1: #FDE6EC;
  --glow-2: #EEE7FD;
  --header-bg: rgba(255, 249, 246, .82);
  --tabbar-bg: rgba(255, 255, 255, .94);
  --overlay: rgba(59, 50, 71, .35);
  --skel-1: #F6EEF2; --skel-2: #FCF7F9;
  --hero-grad: linear-gradient(130deg, #FDE3EA 0%, #FFEADF 48%, #ECE5FD 100%);
  --hero-line: #F6DCE5;
  --cover-grad: linear-gradient(120deg, #FDE3EA, #EEE7FD 55%, #E3F1FC);
  --cover-grad-2: linear-gradient(120deg, #E3F1FC, #E6F6EE 55%, #FFF3D9);
  --summary-grad: linear-gradient(130deg, #E3F4EC 0%, #E6F1FC 60%, #F1ECFD 100%);
  --summary-line: #DCEDE5;
  --admin-grad: linear-gradient(160deg, #FFF8E2, #FFFDF6 60%);
  --admin-line: #F5E3AE;
  --auth-bg:
    radial-gradient(460px 460px at 0% 0%, #FBD9E2 0%, transparent 70%),
    radial-gradient(520px 520px at 100% 100%, #D9F0E5 0%, transparent 70%),
    radial-gradient(380px 380px at 100% 8%, #E6DDFC 0%, transparent 70%),
    radial-gradient(300px 300px at 0% 100%, #FFE6D6 0%, transparent 70%);

  --r-sm: 12px;
  --r: 22px;
  --r-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(59, 50, 71, .06);
  --shadow: 0 1px 2px rgba(59, 50, 71, .04), 0 14px 34px -16px rgba(130, 70, 110, .25);
  --shadow-lg: 0 24px 50px -20px rgba(130, 70, 110, .4);

  --font-title: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
}

/* ---------- Thème sombre (noir-gris, accents pastel) ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131216;
  --surface: #1D1C21;
  --surface-2: #24232A;
  --ink: #F0ECF3;
  --ink-2: #C9C3D0;
  --muted: #9A93A3;
  --line: #2A2930;
  --line-2: #3A3841;
  --ill-ink: #E8E2EF;

  --brand: #A99DDA;  --brand-deep: #B4A8E8;  --brand-dd: #C6BCF0;  --on-brand: #17151C;
  --rose: #8A5465;   --rose-soft: #3A2530;   --rose-deep: #EE9AB0;  --rose-dd: #F4B3C4;  --on-rose: #1E1418;  --rose-line: #4A2C38;
  --lav: #6F639E;    --lav-soft: #2A263D;    --lav-deep: #BDB2EE;
  --mint: #4E8F74;   --mint-soft: #1C3229;   --mint-deep: #8FD8B8;  --on-mint: #0F2219;
  --sky: #4D6F8F;    --sky-soft: #1D2B3A;    --sky-deep: #A7CDF2;
  --peach: #8F654D;  --peach-soft: #38291F;  --peach-deep: #F4B791;
  --butter: #8C7A45; --butter-soft: #332D1B; --butter-deep: #EAD28A;

  --glow-1: #2A1F27;
  --glow-2: #221F33;
  --header-bg: rgba(19, 18, 22, .82);
  --tabbar-bg: rgba(29, 28, 33, .94);
  --overlay: rgba(0, 0, 0, .6);
  --skel-1: #26252B; --skel-2: #302E35;
  --hero-grad: linear-gradient(130deg, #33232C 0%, #2E2522 48%, #272240 100%);
  --hero-line: #3A2D36;
  --cover-grad: linear-gradient(120deg, #3A2531, #2C2745 55%, #1F2D3D);
  --cover-grad-2: linear-gradient(120deg, #1F2D3D, #1C3229 55%, #332D1B);
  --summary-grad: linear-gradient(130deg, #1C3027 0%, #1D2A38 60%, #28243A 100%);
  --summary-line: #2A3A33;
  --admin-grad: linear-gradient(160deg, #34301F, #1D1C21 60%);
  --admin-line: #4A4126;
  --auth-bg:
    radial-gradient(460px 460px at 0% 0%, #3A2530 0%, transparent 70%),
    radial-gradient(520px 520px at 100% 100%, #1C3229 0%, transparent 70%),
    radial-gradient(380px 380px at 100% 8%, #2A263D 0%, transparent 70%),
    radial-gradient(300px 300px at 0% 100%, #38291F 0%, transparent 70%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 50px -20px rgba(0, 0, 0, .8);
}
/* « Automatique » : suit le réglage du téléphone / de l'ordinateur */
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --bg: #131216; --surface: #1D1C21; --surface-2: #24232A;
    --ink: #F0ECF3; --ink-2: #C9C3D0; --muted: #9A93A3; --line: #2A2930; --line-2: #3A3841; --ill-ink: #E8E2EF;
    --brand: #A99DDA; --brand-deep: #B4A8E8; --brand-dd: #C6BCF0; --on-brand: #17151C;
    --rose: #8A5465; --rose-soft: #3A2530; --rose-deep: #EE9AB0; --rose-dd: #F4B3C4; --on-rose: #1E1418; --rose-line: #4A2C38;
    --lav: #6F639E; --lav-soft: #2A263D; --lav-deep: #BDB2EE;
    --mint: #4E8F74; --mint-soft: #1C3229; --mint-deep: #8FD8B8; --on-mint: #0F2219;
    --sky: #4D6F8F; --sky-soft: #1D2B3A; --sky-deep: #A7CDF2;
    --peach: #8F654D; --peach-soft: #38291F; --peach-deep: #F4B791;
    --butter: #8C7A45; --butter-soft: #332D1B; --butter-deep: #EAD28A;
    --glow-1: #2A1F27; --glow-2: #221F33;
    --header-bg: rgba(19, 18, 22, .82); --tabbar-bg: rgba(29, 28, 33, .94); --overlay: rgba(0, 0, 0, .6);
    --skel-1: #26252B; --skel-2: #302E35;
    --hero-grad: linear-gradient(130deg, #33232C 0%, #2E2522 48%, #272240 100%); --hero-line: #3A2D36;
    --cover-grad: linear-gradient(120deg, #3A2531, #2C2745 55%, #1F2D3D);
    --cover-grad-2: linear-gradient(120deg, #1F2D3D, #1C3229 55%, #332D1B);
    --summary-grad: linear-gradient(130deg, #1C3027 0%, #1D2A38 60%, #28243A 100%); --summary-line: #2A3A33;
    --admin-grad: linear-gradient(160deg, #34301F, #1D1C21 60%); --admin-line: #4A4126;
    --auth-bg:
      radial-gradient(460px 460px at 0% 0%, #3A2530 0%, transparent 70%),
      radial-gradient(520px 520px at 100% 100%, #1C3229 0%, transparent 70%),
      radial-gradient(380px 380px at 100% 8%, #2A263D 0%, transparent 70%),
      radial-gradient(300px 300px at 0% 100%, #38291F 0%, transparent 70%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -16px rgba(0, 0, 0, .7);
    --shadow-lg: 0 24px 50px -20px rgba(0, 0, 0, .8);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.5 var(--font-body);
  background:
    radial-gradient(900px 360px at -10% -8%, var(--glow-1) 0%, transparent 65%),
    radial-gradient(800px 380px at 110% -6%, var(--glow-2) 0%, transparent 65%),
    var(--bg);
  background-repeat: no-repeat;
  padding-bottom: 116px; /* place pour la barre flottante sur mobile */
  transition: background-color .25s, color .25s;
}
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.28rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--rose); color: var(--ink); }

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.container { max-width: 1080px; margin: 0 auto; padding: 18px 16px; }
.narrow { max-width: 660px; }

/* ---------- Icônes ---------- */
.i {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }
.ill { display: block; color: var(--ill-ink); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; text-decoration: none; }
.logo .logo-svg { display: block; height: 34px; width: auto; aspect-ratio: 1320 / 590; }
.logo-xl .logo-svg { height: 84px; }

/* ---------- En-tête ---------- */
.app-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.app-header .inner { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.header-tools .avatar { text-decoration: none; }
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink-2); cursor: pointer; box-shadow: var(--shadow-sm);
}
.theme-btn:hover { color: var(--brand-deep); }
.theme-btn .i { width: 18px; height: 18px; }

.topnav { display: none; gap: 4px; margin-left: auto; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); }
.topnav a {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  font-weight: 800; font-size: .9rem; color: var(--muted); text-decoration: none; transition: background .15s, color .15s;
}
.topnav a:hover { color: var(--ink); background: var(--bg); }
.topnav a.active { background: var(--lav-soft); color: var(--brand-deep); }
.topnav .i { width: 18px; height: 18px; }

/* Barre flottante (mobile) */
.tabbar {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 6px;
  background: var(--tabbar-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0 6px;
  border-radius: 20px; text-decoration: none; color: var(--muted);
  font-size: .7rem; font-weight: 800; letter-spacing: .01em; transition: background .15s, color .15s;
}
.tabbar a .i { width: 23px; height: 23px; }
.tabbar a.active { color: var(--brand-deep); background: var(--lav-soft); }

@media (min-width: 900px) {
  body { padding-bottom: 48px; }
  .topnav { display: flex; }
  .header-tools { margin-left: 4px; }
  .tabbar { display: none; }
  h1 { font-size: 2.1rem; }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border: 1.5px solid transparent; border-radius: 999px;
  font: 800 .95rem/1.1 var(--font-body); text-decoration: none; text-align: center; white-space: nowrap;
  cursor: pointer; transition: transform .12s, background-color .15s, border-color .15s, box-shadow .15s;
}
.btn .i { width: 18px; height: 18px; stroke-width: 2.2; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, .theme-btn:focus-visible { outline: 3px solid var(--lav); outline-offset: 2px; }
.btn-primary { background: var(--brand-deep); color: var(--on-brand); box-shadow: 0 10px 20px -10px rgba(108, 93, 170, .85), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover { background: var(--brand-dd); }
.btn-rose { background: var(--rose-deep); color: var(--on-rose); box-shadow: 0 10px 20px -10px rgba(194, 74, 105, .8), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-rose:hover { background: var(--rose-dd); }
.btn-mint { background: var(--mint-deep); color: var(--on-mint); box-shadow: 0 10px 20px -10px rgba(47, 125, 93, .8), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-soft { background: var(--rose-soft); color: var(--rose-dd); }
.btn-lav { background: var(--lav-soft); color: var(--lav-deep); }
.btn-lav:hover, .btn-soft:hover { filter: brightness(.97); }
.btn-outline { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--muted); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--surface); border-color: var(--rose-line); color: var(--rose-dd); }
.btn-danger:hover { background: var(--rose-soft); }
.btn-sm { min-height: 38px; padding: 7px 15px; font-size: .86rem; }
.btn-sm .i { width: 16px; height: 16px; }
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.04rem; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row.end { justify-content: flex-end; }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label, .label { font-weight: 800; font-size: .92rem; color: var(--ink); }
.field .opt { color: var(--muted); font-weight: 700; }
.field .hint { font-size: .82rem; color: var(--muted); }
.input {
  width: 100%; min-height: 52px; padding: 13px 16px;
  border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--surface);
  color: var(--ink); font: 600 1rem var(--font-body);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted); opacity: .75; font-weight: 600; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--lav-soft); }
textarea.input { min-height: 112px; resize: vertical; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C8198' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px; }
.input-row { display: flex; gap: 8px; flex-wrap: wrap; }
.input-row > .input, .input-row > .with-icon { flex: 1 1 200px; min-width: 0; }
.input-row > .btn { min-height: 52px; }
.with-icon { position: relative; }
.with-icon > .i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.with-icon > .input { padding-left: 46px; }
.with-peek > .input { padding-right: 52px; }
.peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 12px; background: none; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.peek:hover { background: var(--surface-2); color: var(--ink); }
.input-price { position: relative; }
.input-price .input { padding-right: 42px; }
.input-price::after { content: "€"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--brand-deep); }

/* Choix segmenté (thème) */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px;
  font-weight: 800; font-size: .84rem; color: var(--muted); transition: background .15s, color .15s;
}
.seg span .i { width: 22px; height: 22px; }
.seg input:checked + span { background: var(--surface); color: var(--brand-deep); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--lav); }

/* ---------- Cartes & mise en page ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow); padding: 18px;
}
.card-flush { padding: 0; overflow: hidden; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head .link { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: .88rem; color: var(--brand-deep); text-decoration: none; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--rose-soft); color: var(--rose-dd); font: 700 .8rem var(--font-body); vertical-align: 3px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 6px 0 20px; }
.page-head p { margin-top: 6px; color: var(--muted); }
.title-with-icon { display: flex; align-items: center; gap: 14px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 8px; padding: 6px 12px 6px 8px;
  border-radius: 999px; font-weight: 800; font-size: .9rem; color: var(--ink-2); text-decoration: none;
}
.back:hover { background: var(--surface); box-shadow: var(--shadow-sm); }

/* Encadrés d'information */
.note {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 18px; background: var(--lav-soft); color: var(--ink-2); font-size: .92rem;
}
.note strong { color: var(--ink); }
.note-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--lav-deep); box-shadow: var(--shadow-sm); }
.note-mint { background: var(--mint-soft); } .note-mint .note-ic { color: var(--mint-deep); }
.note-butter { background: var(--butter-soft); } .note-butter .note-ic { color: var(--butter-deep); }
.note-rose { background: var(--rose-soft); } .note-rose .note-ic { color: var(--rose-dd); }
.note-peach { background: var(--peach-soft); } .note-peach .note-ic { color: var(--peach-deep); }

/* Étiquettes */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-weight: 800; font-size: .78rem; line-height: 1.2; white-space: nowrap;
}
.tag .i { width: 14px; height: 14px; stroke-width: 2.4; }
.tag-mint { background: var(--mint-deep); color: var(--on-mint); }
.tag-soft-mint { background: var(--mint-soft); color: var(--mint-deep); }
.tag-soft-lav { background: var(--lav-soft); color: var(--lav-deep); }
.tag-butter { background: var(--butter-soft); color: var(--butter-deep); }
.tag-white { background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-sm); padding-left: 4px; }
.tag-white .avatar { width: 20px; height: 20px; font-size: .7rem; box-shadow: none; }

/* Filtres */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-2); font: 800 .86rem var(--font-body); cursor: pointer;
}
.chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip .n { opacity: .6; font-weight: 700; }

/* ---------- Avatars ---------- */
.avatar {
  --a: var(--rose); --ad: var(--rose-dd);
  width: 44px; height: 44px; flex: none; border-radius: 50%; overflow: hidden;
  display: inline-grid; place-items: center;
  background: var(--a); color: var(--ad); font: 600 1.1rem/1 var(--font-title);
  box-shadow: 0 0 0 3px var(--surface);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 34px; height: 34px; font-size: .92rem; box-shadow: 0 0 0 2px var(--surface); }
.avatar-xs { width: 24px; height: 24px; font-size: .72rem; box-shadow: none; }
.avatar-lg { width: 100px; height: 100px; font-size: 2.6rem; box-shadow: 0 0 0 5px var(--surface), var(--shadow); }
/* Les avatars gardent leurs couleurs pastel dans les deux thèmes */
.av-rose   { --a: #F7B9C7; --ad: #A3324F; }
.av-lav    { --a: #D6C9F6; --ad: #553D9F; }
.av-mint   { --a: #BDE6D3; --ad: #215F45; }
.av-sky    { --a: #C3E1F8; --ad: #2B5A89; }
.av-peach  { --a: #FFD7C0; --ad: #8F4618; }
.av-butter { --a: #FAE6A8; --ad: #6F530B; }

/* Teintes de fond (vignettes) */
.tint-rose { --t: var(--rose-soft); } .tint-lav { --t: var(--lav-soft); } .tint-mint { --t: var(--mint-soft); }
.tint-sky { --t: var(--sky-soft); } .tint-peach { --t: var(--peach-soft); } .tint-butter { --t: var(--butter-soft); }

/* ---------- Personnes ---------- */
.people { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 8px; scrollbar-width: none; }
.people::-webkit-scrollbar { display: none; }
.person { flex: none; width: 88px; padding: 10px 4px; border-radius: 20px; text-align: center; text-decoration: none; transition: background .15s; }
.person:hover { background: var(--surface); }
.av-wrap { position: relative; display: inline-block; }
.person .avatar { width: 64px; height: 64px; font-size: 1.55rem; margin-bottom: 8px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5.5px var(--a); }
.person .name { font-weight: 800; font-size: .9rem; line-height: 1.2; }
.person .meta { font-size: .75rem; color: var(--muted); }
.person.pending .avatar { opacity: .5; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--line-2); }
.person.pending .meta { color: var(--butter-deep); font-weight: 700; }
.av-badge {
  position: absolute; right: -4px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); color: var(--butter-deep); box-shadow: var(--shadow-sm);
}
.av-badge .i { width: 14px; height: 14px; stroke-width: 2.4; }

/* Lignes */
.rows > .row + .row { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none; }
a.row:hover { background: var(--surface-2); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 800; text-decoration: none; }
.row .sub { font-size: .84rem; color: var(--muted); }
.row .chev { color: var(--muted); opacity: .6; }
.feed-item { align-items: flex-start; }
.feed-item p { line-height: 1.38; color: var(--ink-2); }
.feed-item p strong { color: var(--ink); }
.feed-item .when { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.feed-item .when .pill { padding: 1px 8px; border-radius: 999px; background: var(--rose-soft); color: var(--rose-dd); font-weight: 800; }

/* ---------- Vignettes produits ---------- */
.thumb {
  position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden;
  background: var(--t, var(--rose-soft));
}
.thumb .ill { width: 58%; height: 58%; }
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.thumb-sm { width: 56px; height: 56px; aspect-ratio: auto; border-radius: 16px; flex: none; }
.thumb-sm .ill { width: 70%; height: 70%; }

/* ---------- Grille de cadeaux ---------- */
.gift-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .gift-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.gift {
  position: relative; display: flex; flex-direction: column; padding: 7px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
@media (hover: hover) { .gift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } }
.gift .thumb { border-radius: 18px; }
.gift-badge { position: absolute; top: 15px; left: 15px; z-index: 1; }
.gift-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 11px 7px 8px; }
.gift-title {
  font-weight: 800; font-size: .95rem; line-height: 1.28;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gift-price {
  align-self: flex-start; padding: 3px 11px; border-radius: 999px;
  background: var(--rose-soft); color: var(--rose-dd); font: 600 1rem/1.3 var(--font-title);
}
.gift-price.none { background: var(--surface-2); color: var(--muted); font: 700 .8rem/1.6 var(--font-body); }
.gift-desc {
  font-size: .83rem; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gift-shop {
  display: inline-flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 4px;
  font-size: .78rem; font-weight: 800; color: var(--muted); text-decoration: none; min-width: 0;
}
.gift-shop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gift-shop:hover { color: var(--brand-deep); }
.gift-actions { display: flex; gap: 6px; padding: 2px 4px 5px; }
.gift-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
.gift-actions .btn-icon { flex: none; }
.gift-note { display: flex; align-items: center; gap: 6px; padding: 4px 7px 9px; font-size: .82rem; font-weight: 800; color: var(--muted); }

/* États de réservation (vus par les autres, jamais par le propriétaire) */
.gift:not([data-state="free"]) .if-free,
.gift:not([data-state="mine"]) .if-mine,
.gift:not([data-state="taken"]) .if-taken { display: none; }
.gift[data-state="mine"] { border: 2px solid var(--mint); padding: 6px; background: linear-gradient(180deg, var(--surface) 55%, var(--mint-soft)); }
.gift[data-state="taken"] .thumb .ill { opacity: .45; filter: saturate(.2); }
.gift[data-state="taken"] .gift-title,
.gift[data-state="taken"] .gift-price,
.gift[data-state="taken"] .gift-desc { opacity: .5; }

/* ---------- Tuiles de listes ---------- */
.list-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .list-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .list-grid { grid-template-columns: repeat(3, 1fr); } }
.list-tile { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; text-decoration: none; transition: transform .2s, box-shadow .2s; }
@media (hover: hover) { .list-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
.list-icon { width: 62px; height: 62px; flex: none; border-radius: 18px; display: grid; place-items: center; background: var(--t, var(--rose-soft)); }
.list-icon .ill { width: 44px; height: 44px; }
.list-tile .grow { flex: 1; min-width: 0; }
.list-tile .title { font: 600 1.12rem/1.2 var(--font-title); }
.list-tile .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: .84rem; color: var(--muted); }
.list-tile .sub span { display: inline-flex; align-items: center; gap: 4px; }
.list-tile .chev { color: var(--muted); opacity: .6; }
.list-tile.new {
  justify-content: center; min-height: 88px; border: 2px dashed var(--line-2); background: transparent;
  box-shadow: none; color: var(--muted); font: 800 1rem var(--font-body); cursor: pointer;
}
.list-tile.new:hover { border-color: var(--brand); color: var(--brand-deep); transform: none; box-shadow: none; }

/* ---------- Accueil ---------- */
.hello {
  position: relative; overflow: hidden; padding: 22px 20px; border-radius: var(--r-lg);
  background: var(--hero-grad); border: 1px solid var(--hero-line);
}
.hello-text { position: relative; z-index: 1; max-width: 64%; }
.hello h1 { font-size: 1.7rem; }
.hello p { margin-top: 6px; color: var(--ink-2); }
.hello .btn { margin-top: 16px; }
.hello-art { position: absolute; right: -6px; bottom: -10px; width: 46%; max-width: 230px; }
.countdown {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 5px 12px 5px 8px;
  border-radius: 999px; background: var(--surface); color: var(--rose-dd); font-weight: 800; font-size: .82rem;
}
@media (min-width: 640px) { .hello { padding: 30px 32px; } .hello h1 { font-size: 2.1rem; } }

/* ---------- Profil ---------- */
.profile { padding: 0; overflow: hidden; text-align: center; }
.profile-cover { height: 96px; background: var(--cover-grad); }
.profile-cover.c2 { background: var(--cover-grad-2); }
.profile-body { margin-top: -50px; padding: 0 18px 22px; }
.profile-body h1 { margin: 12px 0 8px; }
.profile-body .btn-row { justify-content: center; margin-top: 14px; }

.illus-block { text-align: center; padding: 30px 22px; }
.illus-block .ill { width: 190px; height: auto; margin: 0 auto 14px; }
.illus-block h2 { margin-bottom: 8px; }
.illus-block p { max-width: 380px; margin: 0 auto; color: var(--muted); }
.illus-block .btn { margin-top: 20px; }

/* ---------- Ajout de cadeau ---------- */
.preview { display: grid; gap: 20px; }
@media (min-width: 720px) { .preview { grid-template-columns: 260px 1fr; align-items: start; } }
.preview .thumb { border-radius: 20px; border: 1px solid var(--line); }
.preview .img-tools { display: grid; gap: 8px; margin-top: 10px; }
.loading { display: grid; justify-items: center; gap: 14px; padding: 34px 16px 26px; text-align: center; }
.loader { position: relative; width: 78px; height: 78px; display: grid; place-items: center; }
.loader::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 4px solid var(--lav-soft); border-top-color: var(--brand-deep); animation: spin .9s linear infinite;
}
.loader .ill { width: 42px; height: 42px; }
.skel { border-radius: 14px; background: linear-gradient(90deg, var(--skel-1) 25%, var(--skel-2) 50%, var(--skel-1) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.drop {
  display: grid; place-items: center; align-content: center; gap: 8px; aspect-ratio: 1 / 1; padding: 16px;
  border: 2px dashed var(--line-2); border-radius: 20px; background: var(--surface-2);
  color: var(--muted); font-weight: 800; text-align: center; cursor: pointer; transition: border-color .15s, color .15s;
}
.drop:hover { border-color: var(--brand); color: var(--brand-deep); }
.drop .drop-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--lav-soft); color: var(--brand-deep); }
.drop .drop-ic .i { width: 26px; height: 26px; }
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: .8rem; font-weight: 800; color: var(--muted); }
.steps span { display: inline-flex; align-items: center; gap: 6px; }
.steps b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: .75rem; }
.steps .on { color: var(--ink); } .steps .on b { background: var(--brand-deep); color: var(--on-brand); }
.steps .done b { background: var(--mint-soft); color: var(--mint-deep); }
.steps i { flex: 1; max-width: 40px; height: 2px; background: var(--line-2); border-radius: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .loader::before, .skel { animation: none; } .gift, .list-tile { transition: none; } }

/* ---------- Ce que j'offre ---------- */
.summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 18px; border-radius: var(--r-lg);
  background: var(--summary-grad); border: 1px solid var(--summary-line);
}
.stat { display: flex; align-items: center; gap: 12px; }
.stat-ic { width: 44px; height: 44px; flex: none; border-radius: 15px; display: grid; place-items: center; background: var(--surface); color: var(--mint-deep); box-shadow: var(--shadow-sm); }
.stat-ic.lav { color: var(--lav-deep); }
.stat .big { font: 600 1.55rem/1.05 var(--font-title); }
.stat .lbl { font-size: .8rem; font-weight: 700; color: var(--ink-2); }
@media (max-width: 420px) { .summary { grid-template-columns: 1fr; } }
.group + .group { margin-top: 14px; }
.group-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); text-decoration: none; }
.group-head .name { font: 600 1.1rem/1.2 var(--font-title); }
.group-head .sub { font-size: .82rem; color: var(--muted); }
.group-total { margin-left: auto; text-align: right; }
.group-total b { display: inline-block; padding: 3px 11px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-deep); font: 600 1.02rem/1.3 var(--font-title); }
.group-total span { display: block; margin-top: 3px; font-size: .76rem; color: var(--muted); }
.group .row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; }
.group .row .thumb, .group .row .grow { grid-row: 1 / 3; }
.group .row .price { grid-column: 3; grid-row: 1; justify-self: end; align-self: end; font: 600 1rem var(--font-title); white-space: nowrap; }
.group .row .cancel { grid-column: 3; grid-row: 2; justify-self: end; align-self: start; border: 0; background: none; padding: 2px 0; font-weight: 800; font-size: .8rem; color: var(--muted); cursor: pointer; }
.group .row .cancel:hover { color: var(--rose-dd); text-decoration: underline; }

/* ---------- Connexion / inscription ---------- */
body.auth { padding-bottom: 0; background: var(--auth-bg), var(--bg); background-attachment: fixed; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-top { text-align: center; margin-bottom: 22px; }
.auth-top p { margin-top: 12px; color: var(--ink-2); font-size: 1.04rem; }
.invited { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 5px 14px 5px 5px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.invited strong { color: var(--ink); }
.auth-box .card { padding: 24px 22px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
.auth-foot { text-align: center; margin-top: 18px; color: var(--muted); font-weight: 700; font-size: .95rem; }
.auth-foot a { color: var(--brand-deep); }
.auth-theme { position: fixed; top: 14px; right: 14px; z-index: 5; }
.photo-pick { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.photo-pick .ph { width: 64px; height: 64px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--line-2); background: var(--surface-2); color: var(--muted); }
.photo-pick .ph .i { width: 24px; height: 24px; }
.photo-pick:hover .ph { border-color: var(--brand); color: var(--brand-deep); }

/* ---------- Mon compte ---------- */
.settings { display: grid; gap: 16px; }
.set-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.set-ic { width: 40px; height: 40px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--rose-soft); color: var(--rose-dd); }
.set-ic.lav { background: var(--lav-soft); color: var(--lav-deep); }
.set-ic.mint { background: var(--mint-soft); color: var(--mint-deep); }
.set-ic.butter { background: var(--surface); color: var(--butter-deep); box-shadow: var(--shadow-sm); }
.set-head p { font-size: .84rem; color: var(--muted); }
.me { display: flex; align-items: center; gap: 16px; }
.me .avatar-lg { width: 76px; height: 76px; font-size: 2rem; }
.me-stats { display: flex; gap: 18px; margin-top: 6px; font-size: .86rem; color: var(--muted); }
.me-stats b { color: var(--ink); font: 600 1.05rem var(--font-title); margin-right: 3px; }
.admin { background: var(--admin-grad); border-color: var(--admin-line); }
.divider { height: 1px; background: var(--line); margin: 20px 0; border: 0; }

/* ---------- Fenêtres ---------- */
dialog {
  width: min(440px, calc(100% - 32px)); padding: 24px;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dialog-head .list-icon { width: 48px; height: 48px; border-radius: 15px; }
.dialog-head .list-icon .ill { width: 34px; height: 34px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-pick label { cursor: pointer; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick .list-icon { width: 52px; height: 52px; border-radius: 16px; border: 2px solid transparent; }
.icon-pick .list-icon .ill { width: 36px; height: 36px; }
.icon-pick input:checked + .list-icon { border-color: var(--brand-deep); }
.icon-pick input:focus-visible + .list-icon { outline: 3px solid var(--lav); outline-offset: 2px; }

/* ---------- Bandeau de démo (pas partie du design) ---------- */
.demo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; padding: 8px 10px;
  border: 1.5px dashed var(--line-2); border-radius: 16px;
  font-size: .78rem; color: var(--muted);
}
.demo b { margin-right: 2px; }
.demo button { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font: 800 .76rem var(--font-body); color: var(--ink-2); cursor: pointer; }
.demo button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- Sommaire des maquettes ---------- */
.toc { display: grid; gap: 12px; }
@media (min-width: 640px) { .toc { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .toc { grid-template-columns: repeat(3, 1fr); } }
.toc a { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.toc a:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.toc .num { width: 40px; height: 40px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--t, var(--lav-soft)); font: 600 .9rem var(--font-title); color: var(--ink-2); }
.toc h3 { margin: 2px 0 4px; }
.toc p { font-size: .86rem; color: var(--muted); }

/* =========================================================
   Ajouts pour le site réel
   ========================================================= */
.medium { max-width: 760px; }
.wide-form { max-width: 820px; }

/* Messages éphémères */
.toasts { position: fixed; z-index: 60; top: 74px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100% - 32px)); display: grid; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 18px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  font-weight: 700; font-size: .92rem; pointer-events: auto;
  animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2);
  transition: opacity .4s, transform .4s;
}
.toast .i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--mint-soft); color: var(--mint-deep); stroke-width: 2.6; }
.toast-error .i { background: var(--rose-soft); color: var(--rose-dd); }
.toast.out { opacity: 0; transform: translateY(-8px); }
body.auth .toasts { top: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Précision sur un cadeau */
.gift-extra { display: flex; align-items: flex-start; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink-2); line-height: 1.35; }
.gift-extra .i { margin-top: 1px; color: var(--brand-deep); }
.gift-actions form { display: contents; }
.gift .thumb img { background: #fff; }
.gift[hidden] { display: none; }
.gift { scroll-margin-top: 90px; }

/* Annuler une réservation (J'offre quoi ?) */
.group .row .cancel-form { grid-column: 3; grid-row: 2; justify-self: end; align-self: start; margin: 0; }
.group .row .title { color: var(--ink); }
.group .row .title:hover { color: var(--brand-deep); }

/* Photo de profil choisie */
.photo-pick .ph { overflow: hidden; }
.photo-pick .ph.has-photo { border-style: solid; border-color: var(--surface); box-shadow: var(--shadow-sm); }
.photo-pick .ph img { width: 100%; height: 100%; object-fit: cover; }

.temp-pw { font-family: ui-monospace, Consolas, monospace; font-size: 1.05rem; padding: 1px 8px; border-radius: 8px; background: var(--surface); }
.row a.title:hover { color: var(--brand-deep); }
button[disabled] { opacity: .5; cursor: not-allowed; }

/* Notifications : pastille sur l'onglet « Mes proches » et bandeau « Nouveau ! » */
.tabbar a, .topnav a { position: relative; }
.nav-badge {
  position: absolute; top: 3px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--rose-deep); color: var(--on-rose);
  font: 800 .68rem/18px var(--font-body); text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
  animation: badge-pop .4s cubic-bezier(.2, .9, .3, 1.4);
}
.topnav .nav-badge { position: static; margin-left: 2px; box-shadow: none; }
@keyframes badge-pop { from { transform: scale(.3); opacity: 0; } }
.news { margin-bottom: 18px; background: linear-gradient(135deg, var(--rose-soft), var(--lav-soft)); border-color: var(--rose-line); }
.news-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.news-head h2 { font-size: 1.15rem; }
.news-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--rose-deep); box-shadow: var(--shadow-sm); }
.news-ic .i { animation: bell 1.2s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes bell { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.news p { color: var(--ink-2); font-size: .94rem; }
.news p + p { margin-top: 4px; }
.news-people { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.news-person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); text-decoration: none; font-weight: 800; font-size: .88rem; }
.news-person:hover { color: var(--brand-deep); }
.tag-new { background: var(--rose-deep); color: var(--on-rose); padding: 2px 8px; font-size: .7rem; vertical-align: 2px; }
.person.is-new .name::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: var(--rose-deep); vertical-align: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-badge, .news-ic .i { animation: none; } }

/* Photos de produits : légèrement dézoomées, avec une marge blanche autour */
.thumb img { padding: 9%; object-fit: contain; background: #fff; }
.thumb-sm img { padding: 6%; }
.preview .thumb img { padding: 8%; }

/* =========================================================
   Mise à jour 3 : photos encadrées, fiche détaillée, galerie
   ========================================================= */

/* Photo posée sur une carte blanche au milieu du fond pastel (marge bien visible) */
.thumb img {
  width: 82%; height: 82%; padding: 6%;
  object-fit: contain; background: #fff;
  border-radius: 14px; box-shadow: 0 2px 10px rgba(59, 50, 71, .08);
}
.thumb-sm img { width: 84%; height: 84%; padding: 4%; border-radius: 10px; }
.preview .thumb img { width: 84%; height: 84%; padding: 6%; border-radius: 16px; }
.gift[data-gift] { cursor: pointer; }
.gift[data-gift]:focus-visible { outline: 3px solid var(--lav); outline-offset: 3px; }

/* Rangée de photos trouvées (formulaire d'ajout) */
.img-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.img-strip button {
  width: 50px; height: 50px; padding: 3px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line-2); background: #fff;
}
.img-strip button.on { border-color: var(--brand-deep); }
.img-strip img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }

/* Fiche détaillée */
.gift-dialog {
  width: min(560px, calc(100% - 20px)); max-height: calc(100dvh - 24px);
  padding: 0; overflow: auto; overscroll-behavior: contain;
}
.dlg-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.gallery { position: relative; padding: 18px 18px 14px; background: var(--hero-grad); }
.gal-frame {
  height: min(74vw, 380px); display: grid; place-items: center; overflow: hidden;
  background: #fff; border-radius: 20px; box-shadow: var(--shadow-sm);
}
.gal-frame img { width: 100%; height: 100%; object-fit: contain; padding: 8%; }
.gal-frame .ill { width: 42%; height: 42%; }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.gal-nav.prev { left: 8px; }
.gal-nav.next { right: 8px; }
.gal-count {
  position: absolute; right: 30px; bottom: 26px;
  padding: 2px 10px; border-radius: 999px; background: rgba(59, 50, 71, .72); color: #fff;
  font-size: .75rem; font-weight: 800;
}
.gift-dialog.single .gal-nav, .gift-dialog.single .gallery-thumbs { display: none; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 18px 2px; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs button {
  flex: none; width: 58px; height: 58px; padding: 4px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line-2); background: #fff;
}
.gallery-thumbs button.on { border-color: var(--brand-deep); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.gd-body { display: grid; gap: 10px; padding: 16px 20px 22px; }
.gd-body h2 { font-size: 1.35rem; line-height: 1.2; }
.gd-body .gift-price { justify-self: start; font-size: 1.1rem; }
.gd-desc { color: var(--ink-2); font-size: .95rem; line-height: 1.5; }
.gd-actions { display: grid; gap: 10px; margin-top: 6px; }
.gd-actions form { margin: 0; }
.gd-actions .gift-note { justify-content: center; }

/* Idées de noms de listes */
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest .chip { padding: 6px 12px; font-size: .82rem; }
.suggest .chip.active { background: var(--lav-soft); border-color: var(--brand); color: var(--brand-deep); }

/* Correctif : les photos tiennent toujours entières dans leur cadre (même très hautes ou très larges) */
.thumb { position: relative; }
.thumb img { position: absolute; top: 9%; left: 9%; width: 82%; height: 82%; }
.thumb-sm img { top: 8%; left: 8%; width: 84%; height: 84%; }
.preview .thumb img { top: 8%; left: 8%; width: 84%; height: 84%; }
.gal-frame { position: relative; }
.gal-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 7%; }
.img-strip button, .gallery-thumbs button { position: relative; overflow: hidden; }
.img-strip img, .gallery-thumbs img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }

/* Bouton « + kdo » (favori) */
.howto { padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.howto + .howto { margin-top: 10px; }
.howto h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 1rem; }
.howto p, .howto li { font-size: .9rem; color: var(--ink-2); }
.howto p + p { margin-top: 10px; }
.howto ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.howto ol .btn { margin-left: 4px; vertical-align: middle; }
.bookmarklet { cursor: grab; }
kbd { padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); font: 700 .8rem var(--font-body); }
.note a { color: var(--brand-deep); }
.img-tools [data-paste-img][hidden] { display: none !important; }

/* Appli installée (PWA) */
.install-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; }
.install-banner img { border-radius: 14px; flex: none; }
.install-banner .grow { flex: 1; min-width: 0; display: grid; }
.install-banner .grow span { font-size: .82rem; color: var(--muted); }
html.is-app .app-header { padding-top: env(safe-area-inset-top); }
html.is-app body { -webkit-user-select: none; user-select: none; }
html.is-app input, html.is-app textarea { -webkit-user-select: text; user-select: text; }

.card[id] { scroll-margin-top: 84px; }

.howto summary { cursor: pointer; }
[data-paste-link][hidden] { display: none !important; }

/* Mon compte : sections repliables */
.group-title { display: flex; align-items: center; gap: 8px; margin: 10px 4px 8px; font-size: .82rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-family: var(--font-body); }
.group-title .tag { text-transform: none; letter-spacing: 0; }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-item > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item > summary:hover { background: var(--surface-2); }
.acc-item > summary:focus-visible { outline: 3px solid var(--lav); outline-offset: -3px; }
.acc-title { flex: 1; min-width: 0; display: grid; }
.acc-title strong { font-size: .98rem; }
.acc-title small { font-size: .8rem; color: var(--muted); }
.acc-chev { color: var(--muted); transition: transform .2s; }
.acc-item[open] .acc-chev { transform: rotate(90deg); }
.acc-body { padding: 4px 16px 18px 68px; }
@media (max-width: 480px) { .acc-body { padding-left: 16px; } }
.acc-body .field:last-of-type { margin-bottom: 14px; }
.set-ic.app { background: none; padding: 0; overflow: hidden; }
.set-ic.app img { width: 40px; height: 40px; border-radius: 12px; }
.steps-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.steps-list .btn { margin-left: 4px; vertical-align: middle; }
.acc-item { scroll-margin-top: 84px; }

.mini-title { font: 800 .9rem var(--font-body); margin: 4px 0 8px; color: var(--ink); }

/* Message qui reste affiché (mot de passe temporaire) */
.toast-keep { cursor: pointer; border-color: var(--butter); }
.toast-keep .i { background: var(--butter-soft); color: var(--butter-deep); }

