/* Anna Wealth Club — design commun de « Mon espace » (format bulle, doux, arrondi) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --rose: #F2D9DF; --rose-mid: #E8BFC9; --rose-deep: #C9909F; --rose-dark: #A86F80; --blush: #FBF1F3; --cream: #FBF8F5;
  --gold: #C9A96E; --gold-light: #EDD9B4; --gold-soft: #F8EFDD; --ink: #2A1F24; --muted: #8C7078; --line: #EFE5E2;
  --green: #6E9C7C; --green-soft: #E4F0E7; --red: #C46F6F; --red-soft: #F8E5E5; --blue: #7F98AE; --blue-soft: #E3EBF3;
  --lav: #A895C6; --lav-soft: #EEE8F6;
  --radius: 28px; --radius-sm: 18px; --radius-xs: 12px;
  --shadow: 0 8px 30px rgba(122, 70, 86, .07); --shadow-lg: 0 24px 70px rgba(122, 70, 86, .16);
  --grad: linear-gradient(135deg, #D9A0B0 0%, #C9909F 55%, #B98AA8 100%);
}
html { -webkit-text-size-adjust: 100%; }
html, body { min-height: 100vh; }
body {
  font-family: 'Jost', sans-serif; font-weight: 300; color: var(--ink); line-height: 1.55; background: var(--cream);
  padding: 0 20px calc(110px + env(safe-area-inset-bottom, 0px));
}
/* Halos de couleur en fond : la sensation « fluide » */
body::before, body::after { content: ''; position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .55; pointer-events: none; }
body::before { width: 520px; height: 520px; top: -160px; right: -140px; background: radial-gradient(circle, #F2D0DA 0%, rgba(242, 208, 218, 0) 70%); }
body::after { width: 480px; height: 480px; bottom: -180px; left: -160px; background: radial-gradient(circle, #F1E2C4 0%, rgba(241, 226, 196, 0) 70%); }
body.loading .container { visibility: hidden; }
.container { max-width: 1120px; margin: 0 auto; }
em { font-style: italic; color: var(--rose-deep); }
a { color: var(--rose-dark); }
button, input, select, textarea { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ================= En-tête & navigation ================= */
.awc-header { position: sticky; top: 0; z-index: 50; margin: 0 -20px 26px; padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 12px;
  background: rgba(251, 248, 245, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.awc-header .in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 18px; }
.awc-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.awc-logo .mono { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
  font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; letter-spacing: .02em; box-shadow: 0 6px 18px rgba(201, 144, 159, .35); }
.awc-logo .wm { font-size: .58rem; letter-spacing: .3em; text-transform: uppercase; line-height: 1.3; }
.awc-nav { display: flex; gap: 4px; margin: 0 auto; background: #fff; padding: 5px; border-radius: 999px; box-shadow: var(--shadow); }
.awc-nav a { display: flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; text-decoration: none; color: var(--muted);
  font-size: .8rem; font-weight: 400; white-space: nowrap; transition: background .2s, color .2s; }
.awc-nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.awc-nav a:hover { color: var(--ink); background: var(--blush); }
.awc-nav a.active { background: var(--grad); color: #fff; box-shadow: 0 6px 16px rgba(201, 144, 159, .35); }
.awc-user { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-size: .78rem; }
.awc-user .avatar { cursor: pointer; }
.awc-user .menu { position: relative; }
.awc-user .drop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; min-width: 210px; display: none; }
.awc-user .menu.open .drop { display: block; }
.awc-user .drop button, .awc-user .drop a { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 12px; border-radius: 10px;
  font-size: .84rem; cursor: pointer; color: var(--ink); text-decoration: none; }
.awc-user .drop button:hover, .awc-user .drop a:hover { background: var(--blush); }
.awc-user .drop .who-line { padding: 8px 12px 10px; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sync-status { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.sync-status[data-state="saved"] { color: var(--green); }
.sync-status[data-state="error"], .sync-status[data-state="offline"] { color: var(--red); }

/* ================= Titres de page ================= */
.page-head { margin: 4px 0 24px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: clamp(2rem, 4.4vw, 2.8rem); line-height: 1.1; }
.page-head p { color: var(--muted); font-size: .92rem; margin-top: 6px; max-width: 620px; }
.eyebrow { font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 400; }
.section-title { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.55rem; line-height: 1.2; }
.section-sub { color: var(--muted); font-size: .86rem; margin: 3px 0 16px; }
.muted { color: var(--muted); }
.hint { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ================= Bulles (cartes) ================= */
.card { background: rgba(255, 255, 255, .92); border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px; box-shadow: var(--shadow); position: relative; }
.card.tint { background: linear-gradient(140deg, #FFF 0%, var(--blush) 100%); }
.card.flat { box-shadow: none; background: rgba(255, 255, 255, .6); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fade-in { animation: fadeUp .45s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Bulles de chiffres clés */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.kpi { border-radius: 24px; padding: 18px 20px; background: #fff; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: -36px; top: -36px; background: currentColor; opacity: .07; }
.kpi .l { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font-family: 'Cormorant Garamond', serif; font-size: 2rem; line-height: 1.15; margin-top: 6px; color: var(--ink); }
.kpi .s { font-size: .74rem; color: var(--muted); margin-top: 2px; }
.kpi.green { color: var(--green); background: linear-gradient(150deg, #fff 30%, var(--green-soft)); }
.kpi.rose { color: var(--rose-deep); background: linear-gradient(150deg, #fff 30%, var(--blush)); }
.kpi.gold { color: var(--gold); background: linear-gradient(150deg, #fff 30%, var(--gold-soft)); }
.kpi.blue { color: var(--blue); background: linear-gradient(150deg, #fff 30%, var(--blue-soft)); }
.kpi.lav { color: var(--lav); background: linear-gradient(150deg, #fff 30%, var(--lav-soft)); }
.kpi.good .v { color: var(--green); } .kpi.bad .v { color: var(--red); }

/* ================= Boutons, pastilles, segments ================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: none; background: #fff; color: var(--ink);
  padding: 11px 20px; border-radius: 999px; cursor: pointer; font-size: .82rem; font-weight: 400; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(122, 70, 86, .08), inset 0 0 0 1px var(--line); transition: transform .15s, box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(122, 70, 86, .12), inset 0 0 0 1px var(--rose-mid); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(201, 144, 159, .38); }
.btn.primary:hover { box-shadow: 0 10px 26px rgba(201, 144, 159, .5); }
.btn.soft { background: var(--blush); box-shadow: none; color: var(--rose-dark); }
.btn.small { padding: 7px 13px; font-size: .74rem; }
.btn.ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { color: var(--red); background: var(--red-soft); transform: none; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent; color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; font-size: 1rem; }
.icon-btn:hover { background: var(--blush); color: var(--rose-dark); }
.linkbtn { background: none; border: none; color: var(--rose-dark); cursor: pointer; font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.seg { display: inline-flex; background: #fff; padding: 4px; border-radius: 999px; box-shadow: var(--shadow); gap: 2px; flex-wrap: wrap; }
.seg button { border: none; background: none; padding: 8px 16px; border-radius: 999px; font-size: .8rem; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; background: var(--blush); color: var(--rose-dark); padding: 4px 11px; border-radius: 999px; border: none; white-space: nowrap; }
button.chip { cursor: pointer; }
button.chip:hover { background: var(--rose); }
.chip.green { background: var(--green-soft); color: #4F7D5E; } .chip.gold { background: var(--gold-soft); color: #8A6A2E; }
.chip.blue { background: var(--blue-soft); color: #4D6880; } .chip.lav { background: var(--lav-soft); color: #6A5690; } .chip.red { background: var(--red-soft); color: var(--red); }
.chip.add { background: transparent; border: 1px dashed var(--rose-mid); }
.badge { display: inline-block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: #8A6A2E; background: var(--gold-soft); padding: 2px 9px; border-radius: 999px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; flex-shrink: 0; font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem; color: #fff; background: var(--grad); }
.select-pill { appearance: none; -webkit-appearance: none; border: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238C7078' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 14px center;
  padding: 9px 34px 9px 16px; border-radius: 999px; font-size: .8rem; box-shadow: var(--shadow); cursor: pointer; max-width: 100%; }

/* Onglets (format pilule) */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: none; background: #fff; padding: 10px 18px; border-radius: 999px; cursor: pointer; font-size: .82rem; color: var(--muted); white-space: nowrap; box-shadow: var(--shadow); }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--ink); color: #fff; }
.panel[hidden] { display: none; }

/* ================= Listes & tableaux arrondis ================= */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: .86rem; }
table.tbl th { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 400; text-align: left; padding: 4px 12px; white-space: nowrap; }
table.tbl td { padding: 12px; background: var(--cream); vertical-align: middle; }
table.tbl td:first-child { border-radius: 16px 0 0 16px; } table.tbl td:last-child { border-radius: 0 16px 16px 0; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl tr.dim td { color: #B8A9AE; }
.row-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; background: var(--cream); margin-bottom: 8px; transition: background .2s; }
.row-item:hover { background: var(--blush); }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t { font-weight: 400; font-size: .92rem; }
.row-item .s { font-size: .76rem; color: var(--muted); }
.row-item .amt { font-family: 'Cormorant Garamond', serif; font-size: 1.25rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; background: var(--blush); }
.status { font-size: .74rem; white-space: nowrap; padding: 3px 10px; border-radius: 999px; display: inline-block; }
.status.ok { color: #4F7D5E; background: var(--green-soft); } .status.due { color: #8A6A2E; background: var(--gold-soft); }
.status.late { color: var(--red); background: var(--red-soft); } .status.mut { color: var(--muted); background: var(--cream); }
.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #9CC3A6, var(--green)); }
.empty { text-align: center; color: var(--muted); padding: 34px 22px; border-radius: var(--radius); background: rgba(255, 255, 255, .7); font-size: .9rem; border: 2px dashed var(--rose); }
.empty p { margin-bottom: 14px; max-width: 520px; margin-left: auto; margin-right: auto; }
.empty .big { font-size: 2.2rem; margin-bottom: 8px; }
.note { font-size: .8rem; color: var(--muted); background: rgba(255, 255, 255, .7); padding: 14px 18px; border-radius: var(--radius-sm); }
.tip { background: linear-gradient(135deg, var(--gold-soft), #FFF8EE); border-radius: var(--radius-sm); padding: 14px 18px; font-size: .86rem; }
.tip strong { color: #8A6A2E; font-weight: 500; }
.sugg-box { background: var(--blush); padding: 14px 16px; font-size: .84rem; border-radius: var(--radius-sm); }
.sugg-box strong { color: var(--rose-dark); font-weight: 500; }
.error-box { background: var(--red-soft); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 20px; font-size: .86rem; }
.big-num { font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; line-height: 1; }
.pos { color: var(--green); } .neg { color: var(--red); }

/* ================= Fenêtres & formulaires ================= */
.modal { position: fixed; inset: 0; z-index: 9000; background: rgba(42, 31, 36, .32); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; padding: calc(30px + env(safe-area-inset-top, 0px)) 14px calc(30px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.modal[hidden] { display: none; }
.modal-card { position: relative; background: #fff; width: 100%; max-width: 600px; padding: 30px; border-radius: 32px; box-shadow: var(--shadow-lg); animation: fadeUp .3s ease both; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--cream); border: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; }
.modal-close:hover { background: var(--blush); color: var(--rose-dark); }
.modal-card h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; font-size: 1.75rem; margin-bottom: 14px; padding-right: 36px; line-height: 1.15; }
.form { display: grid; gap: 14px; }
.form label.f { display: block; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.form input[type=text], .form input[type=number], .form input[type=url], .form input[type=date], .form input[type=email], .form select, .form textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid transparent; background: var(--cream); border-radius: 14px; font-size: .92rem; font-weight: 300; color: var(--ink); outline: none; transition: border-color .2s, background .2s; }
.form textarea { min-height: 76px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--rose-mid); background: #fff; }
.form input:disabled { color: var(--muted); }
.form details summary { cursor: pointer; font-size: .84rem; color: var(--rose-dark); padding: 8px 0; list-style: none; }
.form details summary::before { content: '＋ '; }
.form details[open] summary::before { content: '－ '; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 10px; }
.check-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.check-chips label { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; background: var(--cream); padding: 6px 13px; border-radius: 999px; cursor: pointer; }
.check-chips label:has(input:checked) { background: var(--rose); color: var(--rose-dark); }
.check-chips input { accent-color: var(--rose-deep); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.awc-toast { position: fixed; left: 50%; transform: translateX(-50%); z-index: 9500; bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: #fff; padding: 13px 22px; font-size: .86rem; border-radius: 999px; box-shadow: var(--shadow-lg); max-width: calc(100vw - 28px);
  display: flex; align-items: center; gap: 12px; animation: fadeUp .3s ease both; }
.awc-toast[hidden] { display: none; }
.awc-toast button { background: rgba(255, 255, 255, .16); border: none; color: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: .78rem; }

/* ================= Anneaux (graphiques circulaires) ================= */
.ring-wrap { position: relative; display: inline-grid; place-items: center; }
.ring-wrap .c { position: absolute; text-align: center; line-height: 1.15; }
.ring-wrap .c .v { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; }
.ring-wrap .c .l { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

footer.awc-foot { text-align: center; font-size: .72rem; color: var(--muted); margin-top: 30px; }

/* ================= Téléphone ================= */
@media (max-width: 900px) {
  .awc-nav a span { display: none; }
  .awc-nav a { padding: 10px 13px; }
}
@media (max-width: 720px) {
  body { padding-left: 14px; padding-right: 14px; }
  /* Sans flou ici : sinon le menu « fixé » en bas resterait prisonnier de l'en-tête */
  .awc-header { margin: 0 -14px 18px; padding-left: 14px; padding-right: 14px; backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(251, 248, 245, .97); }
  .awc-logo .wm { display: none; }
  .awc-header .in { justify-content: space-between; }
  /* Menu en bas de l'écran, comme une appli */
  .awc-nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); margin: 0; justify-content: space-around;
    box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
  .awc-nav a { flex-direction: column; gap: 2px; padding: 7px 4px; flex: 1; font-size: .6rem; }
  .awc-nav a span { display: block; }
  .awc-nav a svg { width: 20px; height: 20px; }
  .card { padding: 20px 18px; border-radius: 24px; }
  .modal-card { padding: 24px 18px; border-radius: 26px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px 14px; border-radius: 20px; }
  .kpi .v { font-size: 1.45rem; }
  .kpi .s { font-size: .68rem; }
  .sync-status { display: none; }
}
