:root {
    --ink: #343434;
    --ink-2: #474747;
    --muted: #7b7b7b;
    --line: #e4e5e6;
    --surface: #ffffff;
    --canvas: #f6f8f8;
    --aqua: #51c6d3;
    --aqua-soft: #eaf6f2;
    --pink: #c54a95;
    --rose: #d9386f;
    --red: #ef5561;
    --yellow: #f0ca36;
    --gradient-hot: linear-gradient(115deg, #ef5561, #f0ca36);
    --gradient-pink: linear-gradient(125deg, #c54a95, #d9386f);
    --gradient-green: linear-gradient(125deg, #51c6d3, #eaf6f2);
    --shadow: 0 18px 45px rgba(26, 32, 35, .08);
    --radius: 22px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; color: var(--ink); font-family: "Bricolage Grotesque", Arial, sans-serif; background: var(--canvas); line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
.eyebrow { display: block; color: #888; font-size: .73rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow.light { color: rgba(255, 255, 255, .66); }
.muted { color: var(--muted); }
.button { min-height: 48px; border: 1px solid transparent; border-radius: 999px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 18px; font-weight: 700; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { color: white; background: var(--gradient-hot); box-shadow: 0 12px 26px rgba(239, 85, 97, .2); }
.button.outline { color: var(--ink); border-color: #8d8d8d; background: white; }
.button.light { color: var(--ink); background: white; }
.button.wide { width: 100%; }
.alert { padding: 13px 16px; border-radius: 13px; font-size: .92rem; margin: 18px 0; }
.alert.error { color: #991b3f; background: #fff0f3; border: 1px solid #f4cad5; }
.alert.success { color: #16604f; background: #eaf7f2; border: 1px solid #c8eade; }
.status { display: inline-flex; align-items: center; width: max-content; padding: 5px 10px; border-radius: 999px; color: #9b2f58; background: #fbeaf1; font-size: .75rem; font-weight: 700; text-transform: capitalize; }
.status.en-production, .status.en-cours { color: #0f6b65; background: #e5f7f4; }
.status.planifié, .status.ouvert { color: #805d03; background: #fff6d7; }
.status.paid, .status.résolu { color: #176043; background: #e6f5ed; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

/* Login */
.login-page { min-height: 100vh; background: white; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, 1.05fr) minmax(480px, .95fr); }
.login-brand { position: relative; overflow: hidden; padding: 48px clamp(42px, 6vw, 96px); color: white; background: #3e3e3e; display: flex; flex-direction: column; justify-content: space-between; }
.login-brand::before { content: ""; position: absolute; width: 430px; height: 430px; right: -130px; top: 16%; border-radius: 50%; background: rgba(197, 74, 149, .3); filter: blur(65px); }
.login-brand::after { content: ""; position: absolute; width: 480px; height: 240px; left: -180px; bottom: 4%; background: rgba(81, 198, 211, .22); filter: blur(70px); transform: rotate(-20deg); }
.brand-logo, .login-brand-copy, .founder-note { position: relative; z-index: 1; }
.brand-logo { width: 280px; }
.login-brand-copy { max-width: 660px; }
.login-brand-copy h1 { margin: 18px 0 20px; font-size: clamp(2.8rem, 4.8vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
.login-brand-copy h1 em { color: #f39a83; font-weight: 500; }
.login-brand-copy p { max-width: 610px; color: rgba(255, 255, 255, .72); font-size: 1.08rem; }
.founder-note { display: flex; align-items: center; gap: 14px; }
.founder-note img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; background: #fff; border: 2px solid rgba(255,255,255,.7); }
.founder-note div { display: grid; }
.founder-note span { color: rgba(255,255,255,.6); font-size: .83rem; }
.login-panel { position: relative; display: grid; place-items: center; padding: 40px; background: radial-gradient(circle at 80% 20%, rgba(234, 246, 242, .92), transparent 38%), white; }
.login-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gradient-hot); }
.login-card { width: min(440px, 100%); }
.login-card h2 { margin: 10px 0 8px; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.08; letter-spacing: -.04em; }
.mobile-logo { display: none; }
.auth-form, .stack-form { display: grid; gap: 17px; margin-top: 26px; }
label { display: grid; gap: 8px; font-size: .86rem; font-weight: 650; }
input, select, textarea { width: 100%; border: 1px solid #d8dadb; border-radius: 12px; background: white; color: var(--ink); padding: 13px 14px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(81,198,211,.14); }
input:disabled { color: #888; background: #f4f4f4; }
.password-field { display: flex; position: relative; }
.password-field input { padding-right: 62px; }
.password-toggle { position: absolute; top: 5px; right: 6px; bottom: 5px; border: 0; color: var(--ink); background: transparent; font-size: .8rem; font-weight: 700; }
.demo-box { margin-top: 24px; padding: 14px; border-radius: 14px; background: var(--aqua-soft); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; font-size: .76rem; }
.demo-box button { border: 0; border-radius: 999px; padding: 7px 10px; color: white; background: var(--ink); font-size: .72rem; }
.security-note { margin-top: 18px; color: #969696; font-size: .76rem; text-align: center; }

/* Portal shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 268px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 34px 22px 24px; color: #eee; background: #3d3d3d; display: flex; flex-direction: column; z-index: 20; }
.sidebar-logo { width: 204px; margin: 0 8px 50px; }
.sidebar nav { display: grid; gap: 7px; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 13px; min-height: 47px; padding: 0 14px; border-radius: 12px; color: #bdbdbd; text-decoration: none; font-size: .92rem; font-weight: 550; }
.sidebar nav a svg { width: 21px; height: 21px; }
.sidebar nav a.active, .sidebar nav a:hover { color: white; background: rgba(255, 255, 255, .1); }
.sidebar nav a.active::before { content: ""; position: absolute; left: -22px; width: 4px; height: 28px; border-radius: 0 6px 6px 0; background: var(--gradient-hot); }
.sidebar nav a b { min-width: 22px; height: 22px; margin-left: auto; border-radius: 50%; color: white; background: var(--rose); display: grid; place-items: center; font-size: .7rem; }
.sidebar-help { margin-top: auto; padding: 18px; border-radius: 16px; background: linear-gradient(145deg, rgba(81,198,211,.18), rgba(217,56,111,.14)); display: grid; gap: 5px; }
.sidebar-help span { color: #aaa; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.sidebar-help strong { font-size: .88rem; }
.sidebar-help a { margin-top: 9px; color: #75d4dc; font-size: .82rem; font-weight: 700; text-decoration: none; }
.logout-form { margin-top: 18px; }
.logout-form button { width: 100%; border: 0; padding: 10px 12px; color: #aaa; background: transparent; text-align: left; font-size: .82rem; }
.main-column { min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 110px; padding: 22px clamp(24px, 4vw, 58px); background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 24px; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.1; letter-spacing: -.035em; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 11px; }
.topbar-user div:last-child { display: grid; }
.topbar-user strong { font-size: .85rem; }
.topbar-user span { color: var(--muted); font-size: .72rem; }
.avatar { width: 43px; height: 43px; border-radius: 50%; color: white; background: var(--gradient-pink); display: grid; place-items: center; font-size: .82rem; font-weight: 800; }
.avatar.large { width: 86px; height: 86px; margin: auto; font-size: 1.35rem; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 1.6rem; }
.content { flex: 1; width: min(1440px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 54px); }
.portal-footer { min-height: 66px; padding: 20px clamp(24px, 4vw, 58px); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 22px; color: #8d8d8d; font-size: .72rem; }
.portal-footer a { text-decoration: none; }
.welcome-banner { position: relative; overflow: hidden; min-height: 220px; padding: clamp(26px, 4vw, 48px); border-radius: 26px; color: white; background: #3c3c3c; display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.welcome-banner::before { content: ""; position: absolute; right: 10%; top: -100px; width: 380px; height: 380px; border-radius: 50%; background: rgba(197,74,149,.38); filter: blur(55px); }
.welcome-banner::after { content: ""; position: absolute; left: 38%; bottom: -150px; width: 360px; height: 260px; background: rgba(81,198,211,.28); filter: blur(55px); }
.welcome-banner > * { position: relative; z-index: 1; }
.welcome-banner h2 { max-width: 760px; margin: 8px 0; font-size: clamp(1.8rem, 3.2vw, 3rem); line-height: 1.07; letter-spacing: -.04em; }
.welcome-banner p { margin: 0; color: rgba(255,255,255,.67); }
.stats-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats-grid article { min-height: 112px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; display: flex; align-items: center; gap: 16px; }
.stats-grid article div { display: grid; }
.stats-grid article strong { font-size: 1.45rem; }
.stats-grid article div span { color: var(--muted); font-size: .78rem; }
.stat-icon { width: 43px; height: 43px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; }
.stat-icon.aqua { color: #247e85; background: #ddf5f2; }.stat-icon.pink { color: #a22e68; background: #fbe4ef; }.stat-icon.yellow { color: #8b6d02; background: #fff2bb; }.stat-icon.dark { color: white; background: #494949; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .85fr); gap: 20px; }
.project-focus, .advisor-card, .recent-table, .table-card, .support-form-card, .ticket-list, .profile-summary, .profile-forms .card { padding: clamp(22px, 3vw, 32px); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 5px 0 0; font-size: 1.35rem; }
.section-heading a { color: var(--pink); font-size: .8rem; font-weight: 700; text-decoration: none; }
.project-meta { margin: 22px 0 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 11px 18px; color: var(--muted); font-size: .77rem; }
.progress-heading { margin-bottom: 8px; display: flex; justify-content: space-between; font-size: .79rem; }
.progress { overflow: hidden; width: 100%; height: 8px; border-radius: 999px; background: #eceeee; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--gradient-hot); }
.next-step { margin-top: 23px; padding: 16px 18px; border-radius: 14px; background: var(--aqua-soft); display: grid; }
.next-step span { color: #657c78; font-size: .72rem; }
.next-step strong { font-size: .9rem; }
.advisor-card { background: linear-gradient(160deg, #fff, #f0f8f6); }
.advisor { display: flex; align-items: center; gap: 14px; }
.advisor img { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; object-position: top; background: white; }
.advisor div { display: grid; }
.advisor span, .advisor small { color: var(--muted); font-size: .72rem; }
.advisor-card p { color: var(--muted); font-size: .84rem; }
.recent-table { margin-top: 20px; }
.document-row { padding: 16px 0; border-top: 1px solid #eee; display: grid; grid-template-columns: auto minmax(200px, 1fr) 100px 90px 70px; align-items: center; gap: 13px; font-size: .79rem; }
.document-row div { display: grid; }.document-row small { color: var(--muted); }.document-row a { color: var(--pink); font-weight: 700; text-decoration: none; }
.doc-icon { width: 40px; height: 40px; border-radius: 10px; color: #c73762; background: #fcebef; display: grid; place-items: center; font-size: .65rem; font-weight: 800; }

/* Projects, docs, support, profile */
.page-intro { margin-bottom: 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-intro p { max-width: 650px; margin: 0; color: var(--muted); font-size: 1rem; }
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.project-card { padding: 28px; }
.project-card > .button { margin-top: 24px; }
.project-card-top { display: flex; justify-content: space-between; }.project-card-top div { display: grid; gap: 7px; }.project-card-top small { color: var(--muted); }
.project-card h2 { margin: 20px 0 4px; font-size: 1.3rem; }.project-card > p { margin: 0 0 24px; color: var(--muted); font-size: .84rem; }.project-card .progress { margin-bottom: 24px; }
.project-card dl { margin: 0; padding-top: 20px; border-top: 1px solid #eee; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }.project-card dl div { display: grid; }.project-card dt { color: var(--muted); font-size: .7rem; }.project-card dd { margin: 3px 0 0; font-size: .84rem; font-weight: 650; }
.modal { width: min(520px, calc(100% - 32px)); border: 0; border-radius: 22px; padding: 0; box-shadow: 0 30px 80px rgba(0,0,0,.22); }.modal::backdrop { background: rgba(32,32,32,.6); backdrop-filter: blur(3px); }.modal form { position: relative; padding: 34px; display: grid; gap: 17px; }.modal h2 { margin: 0 0 6px; }.modal-close { position: absolute; right: 18px; top: 15px; width: 34px; height: 34px; border: 0; border-radius: 50%; font-size: 1.3rem; }
.table-card { padding-top: 10px; }
.table-header, .table-row { display: grid; grid-template-columns: 1.1fr 1.5fr .65fr .7fr .55fr .35fr; gap: 16px; align-items: center; }
.table-header { padding: 16px 0; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }.table-row { padding: 18px 0; border-top: 1px solid #eee; font-size: .8rem; }.table-row > div { display: flex; align-items: center; gap: 11px; }.table-row strong { display: grid; }.table-row small { color: var(--muted); font-weight: 400; }.table-row > a { color: var(--pink); font-weight: 700; text-decoration: none; }
.invoice { max-width: 850px; margin: 0 auto; padding: clamp(28px, 5vw, 56px); }.invoice-head { display: flex; align-items: start; justify-content: space-between; }.invoice-head img { width: 240px; }.invoice-head div { display: grid; text-align: right; }.invoice-head span { color: var(--muted); }.invoice-head strong { font-size: 1.45rem; }.invoice-parties { margin: 52px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }.invoice-parties > div { display: grid; }.invoice-parties span { color: var(--muted); font-size: .75rem; }.invoice-parties strong { margin: 8px 0; }.invoice-parties p { margin: 0; color: var(--muted); font-size: .85rem; }.invoice-total { padding: 24px; border-radius: 15px; background: var(--aqua-soft); display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; }.invoice-total strong { font-size: 1.5rem; }.tax-note { margin-top: 28px; color: var(--muted); font-size: .8rem; }.invoice-actions { margin-top: 32px; display: flex; justify-content: space-between; }
.support-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr); gap: 20px; }.support-form-card h2 { margin: 8px 0; font-size: 1.8rem; }.support-form-card .stack-form { grid-template-columns: 1fr 160px; }.support-form-card label:last-of-type, .support-form-card button { grid-column: 1 / -1; }.support-side { display: grid; gap: 20px; }.commitment { padding: 30px; border-radius: var(--radius); color: white; background: #414141; }.commitment h2 { font-size: 1.5rem; line-height: 1.15; }.commitment h2 em { color: #f19b86; }.commitment ul { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #ddd; font-size: .84rem; }.contact-card { padding: 24px; display: grid; gap: 8px; }.contact-card a { color: var(--pink); font-size: .84rem; text-decoration: none; }.ticket-list { margin-top: 20px; }.ticket { padding: 22px 0; border-top: 1px solid #eee; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; }.ticket > div:first-child { display: grid; justify-items: start; gap: 8px; }.ticket p { max-width: 760px; margin: 2px 0 0; color: var(--muted); font-size: .85rem; }.ticket > div:last-child { display: grid; justify-items: end; align-content: start; color: var(--muted); font-size: .75rem; }.inline-form { margin-top: 10px; display: grid; gap: 6px; }.inline-form select { padding: 7px 9px; font-size: .74rem; }.inline-form button { border: 0; padding: 7px 9px; border-radius: 8px; color: white; background: var(--ink); font-size: .72rem; }
.profile-grid { display: grid; grid-template-columns: minmax(230px, .55fr) minmax(0, 1.55fr); gap: 20px; }.profile-summary { min-height: 340px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }.profile-summary h2 { margin: 18px 0 0; }.profile-summary p { margin: 2px 0 18px; color: var(--pink); }.profile-summary span { color: var(--muted); font-size: .82rem; }.profile-summary small { margin-top: 32px; color: #aaa; }.profile-forms { display: grid; gap: 20px; }.profile-forms h2 { margin: 6px 0 0; }.two-cols { grid-template-columns: 1fr 1fr; }.two-cols button { justify-self: start; }.empty-state { padding: 32px; color: var(--muted); text-align: center; }

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .document-row { grid-template-columns: auto minmax(160px, 1fr) 90px 70px; }.document-row > span:nth-of-type(2) { display: none; }
    .project-list { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .login-shell { grid-template-columns: 1fr; }.login-brand { display: none; }.login-panel { min-height: 100vh; padding: 28px 22px; }.login-panel::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 5px; }.mobile-logo { display: block; width: 250px; margin-bottom: 54px; }
    .app-shell { display: block; }.sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-101%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }.sidebar.open { transform: translateX(0); }.menu-toggle { display: block; }.topbar { min-height: 90px; padding: 16px 20px; }.topbar .eyebrow, .topbar-user div:last-child { display: none; }.topbar h1 { font-size: 1.45rem; }.content { padding: 24px 18px; }.welcome-banner { align-items: start; flex-direction: column; }.stats-grid { grid-template-columns: 1fr 1fr; }.dashboard-grid, .support-grid, .profile-grid { grid-template-columns: 1fr; }.table-header { display: none; }.table-row { grid-template-columns: 1fr 1fr; padding: 20px 0; }.table-row > * { display: flex; justify-content: space-between; gap: 14px; }.table-row > *::before { content: attr(data-label); color: var(--muted); font-weight: 400; }.table-row > div { grid-column: 1 / -1; }.table-row > a { justify-content: end; }.portal-footer { flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .login-card h2 { font-size: 2rem; }.mobile-logo { width: 220px; margin-bottom: 40px; }.demo-box { grid-template-columns: 1fr 1fr; }.demo-box strong { grid-column: 1 / -1; }
    .stats-grid { grid-template-columns: 1fr; }.stats-grid article { min-height: 92px; }.welcome-banner { min-height: 260px; }.welcome-banner .button { width: 100%; }.topbar-user { margin-left: auto; }.document-row { grid-template-columns: auto 1fr auto; }.document-row > .status { display: none; }.document-row > a { grid-column: 2 / -1; }.project-card dl, .invoice-parties, .two-cols { grid-template-columns: 1fr; }.invoice-head { gap: 20px; }.invoice-head img { width: 160px; }.invoice-total { grid-template-columns: 1fr; }.support-form-card .stack-form { grid-template-columns: 1fr; }.support-form-card label, .support-form-card button { grid-column: auto !important; }.ticket { grid-template-columns: 1fr; }.ticket > div:last-child { justify-items: start; }.page-intro { align-items: stretch; flex-direction: column; }.portal-footer { justify-content: center; }
}

@media print {
    .sidebar, .topbar, .portal-footer, .invoice-actions { display: none !important; }.app-shell { display: block; }.content { padding: 0; }.invoice { border: 0; }.portal-page { background: white; }
}

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

/* Cohérence des espacements et défilement de l’application */
.sidebar { gap: 0; overflow: hidden; }
.sidebar-logo { flex: 0 0 auto; margin-bottom: 32px; }
.sidebar nav { flex: 1 1 auto; min-height: 0; align-content: start; grid-auto-rows: minmax(47px, auto); overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 18px 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.28) transparent; }
.sidebar nav::-webkit-scrollbar { width: 6px; }.sidebar nav::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(255,255,255,.25); }
.sidebar-help { flex: 0 0 auto; margin-top: 18px; }.logout-form { flex: 0 0 auto; margin-top: 12px; }
.content { display: flex; flex-direction: column; gap: 24px; }
.content > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.card { min-width: 0; }
.card > :first-child { margin-top: 0; }.card > :last-child { margin-bottom: 0; }
.dashboard-grid, .stats-grid, .project-list, .service-grid, .approval-grid, .settings-grid, .support-grid, .profile-grid { align-items: stretch; }
.dashboard-grid > .card, .settings-grid .card, .support-grid > .card, .approval-grid > .card { height: 100%; }
.dashboard-grid > .card { padding: clamp(22px, 3vw, 32px); }
.list-card, .form-card { display: flex; flex-direction: column; gap: 18px; }
.list-card .section-heading, .form-card .section-heading { margin-bottom: 2px; }
.table-card { overflow: hidden; }
.table-row:last-child { padding-bottom: 8px; }
.project-admin-bar { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.option-mini.stack-form { display: grid; padding: 16px 0; }
.option-mini.stack-form .approval-actions { justify-content: space-between; }
@media(max-width:820px){.sidebar{height:100dvh;padding:26px 20px 20px}.content{gap:18px}.stats-grid{gap:12px}.card,.service-card,.quick-proposal,.editor-form,.editor-side>.card,.form-card,.list-card{border-radius:18px}.table-card{padding:18px}.table-row{margin-top:12px;padding:16px;border:1px solid var(--line);border-radius:14px}.table-row:first-of-type{margin-top:0}}

/* Complete V1 surfaces */
:root { --brand-primary:#51c6d3; --brand-secondary:#c54a95; --brand-accent:#ef5561; --brand-text:#343434; --brand-background:#f6f8f8; }
.portal-page { color:var(--brand-text); background:var(--brand-background); }
.nav-dot { width:9px; height:9px; border:2px solid currentColor; border-radius:50%; }
.notification-pill { min-width:25px; height:25px; padding:0 7px; border-radius:999px; color:#fff; background:var(--brand-secondary); display:grid; place-items:center; font-size:.72rem; font-weight:800; }
.auth-links { margin-top:16px; text-align:center; font-size:.85rem; }.auth-links a,.demo-reset { color:var(--brand-secondary); }
.pipeline-row,.action-row,.audit-row { padding:14px 0; border-top:1px solid #eee; display:flex; align-items:center; justify-content:space-between; gap:14px; text-decoration:none; }.action-row { display:grid; grid-template-columns:1fr 1.4fr auto; }.action-row span,.action-row small,.pipeline-row span,.audit-row span,.audit-row small { color:var(--muted); font-size:.78rem; }.audit-row{align-items:start;flex-direction:column;gap:3px}
.service-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }.service-card,.quick-proposal,.editor-form,.editor-side>.card,.form-card,.list-card { min-width:0; padding:28px; }.service-card { display:grid; gap:16px; }.service-card h2{margin:0}.service-card textarea{resize:vertical}
.table-header.clients,.table-row.clients { grid-template-columns:1.2fr 1fr 1.4fr 1fr .5fr; }.table-header.proposals,.table-row.proposals { grid-template-columns:.8fr 1.5fr .8fr .7fr .8fr .55fr; }.table-row.proposals>span,.table-row.proposals>strong { display:grid; }.table-row.proposals small{font-weight:400;color:var(--muted)}.row-actions{display:flex!important;flex-wrap:wrap;gap:10px!important}.link-button{padding:0;border:0;color:var(--brand-secondary);background:transparent;font-weight:700}
.quick-proposal { max-width:900px; }.quick-proposal h2{margin:8px 0;font-size:2rem}.quick-proposal .stack-form{margin-top:30px}
.editor-head { margin-bottom:24px; display:flex; align-items:center; justify-content:space-between; gap:20px; }.editor-head h2{margin:5px 0}.editor-actions{display:flex;flex-wrap:wrap;gap:9px}.editor-actions form{display:contents}.editor-grid { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(280px,.75fr); gap:20px; }.editor-form{display:grid;gap:18px}.editor-form details{border:1px solid var(--line);border-radius:14px;padding:14px}.editor-form summary{cursor:pointer;font-weight:700}.editor-form details textarea{margin-top:12px}.editor-side{display:grid;align-content:start;gap:20px}.editor-side h2{margin:5px 0 15px}.option-mini{padding:12px 0;border-bottom:1px solid #eee;display:flex;justify-content:space-between;gap:12px}.version-card dl{display:grid;gap:10px}.version-card dl div{display:flex;justify-content:space-between}.version-card dt{color:var(--muted)}
.project-hero{padding:28px 34px;border-radius:24px;color:#fff;background:linear-gradient(135deg,#3b3b3b,#4d3948);display:flex;align-items:center;justify-content:space-between;gap:20px}.project-hero h2{font-size:2rem;margin:10px 0 0}.project-hero p{margin:4px 0;color:#ccc}.project-progress{display:grid;text-align:center}.project-progress strong{font-size:2.3rem}.project-progress span{font-size:.75rem;color:#ccc}.tab-nav{margin:20px 0;display:flex;gap:8px;overflow:auto;padding-bottom:5px}.tab-nav a{white-space:nowrap;padding:10px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);text-decoration:none;font-size:.8rem;font-weight:700}.tab-nav a.active{color:#fff;background:var(--brand-text)}
.timeline{padding:30px}.timeline-step{position:relative;padding:0 0 28px 54px;display:grid;grid-template-columns:1fr auto;gap:15px}.timeline-step:before{content:"";position:absolute;left:18px;top:40px;bottom:0;width:2px;background:#ddd}.timeline-step:last-child:before{display:none}.timeline-step>span{position:absolute;left:0;top:0;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#eee;font-weight:800}.timeline-step.completed>span{color:#fff;background:#4cbf9b}.timeline-step.active>span,.timeline-step.waiting_client>span{color:#fff;background:var(--brand-secondary)}.timeline-step p{margin:3px 0;color:var(--muted)}.timeline-step small{color:var(--muted)}.timeline-step form{min-width:150px}
.task-row{padding:17px 0;border-top:1px solid #eee;display:grid;grid-template-columns:auto 1fr auto;gap:15px;align-items:start}.task-row p{margin:3px 0;color:var(--muted)}.task-row small{color:var(--muted)}.task-check{width:31px;height:31px;border:1px solid #bbb;border-radius:9px;background:#fff}.task-check.done{color:#fff;background:#43ad88;border-color:#43ad88}.messages{padding:26px}.message-thread{max-height:520px;overflow:auto;display:grid;gap:13px}.message{max-width:76%;padding:14px 16px;border-radius:16px;background:#f0f2f2}.message.staff{justify-self:start}.message.client{justify-self:end;background:var(--aqua-soft)}.message p{margin:5px 0}.message small{color:var(--muted)}.message-form{margin-top:20px;display:grid;grid-template-columns:1fr auto;gap:10px}.message-form textarea{min-height:74px}.revision{padding:18px 0;border-top:1px solid #eee;display:grid;gap:7px}.approval-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.approval-card{padding:28px}.approval-actions{display:flex;flex-wrap:wrap;gap:10px}.file-row{padding:14px 0;border-top:1px solid #eee;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;text-decoration:none}.file-row div{display:grid}.file-row small{color:var(--muted)}.decision-row{padding:14px 0;border-top:1px solid #eee;display:flex;gap:12px}.decision-row>span{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#43ad88}.decision-row div{display:grid}.decision-row small{color:var(--muted)}
.revision-response{padding:20px 0;border-top:1px solid #e5e8e8;gap:12px;margin-top:0}.revision-response:first-of-type{border-top:0}.revision-response textarea{min-height:90px}.approval-card>a.file-row{display:block;overflow-wrap:anywhere;padding:12px 0;color:var(--ink)}.revision .alert{margin:6px 0;padding:14px 16px;overflow-wrap:anywhere}
.settings-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr);gap:20px}.settings-grid>aside{display:grid;align-content:start;gap:20px}.color-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.color-grid input{height:46px;padding:4px}.mail-log{margin-top:0}
.bounded-list{max-height:540px;overflow-y:auto;overscroll-behavior:contain;padding-right:8px;scrollbar-width:thin;scrollbar-color:#bbb transparent}
.notification-list{max-height:min(62vh,620px)}
.notification-list .decision-row,.settings-grid>aside .audit-row{overflow-wrap:anywhere}
.settings-grid>aside>.list-card{height:auto;max-height:430px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.settings-grid>aside>.mail-log{max-height:340px}
.card.payment-shortcut{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:20px 0;padding:28px 32px;box-sizing:border-box}
.payment-shortcut>div{min-width:0;display:grid;gap:12px}.payment-shortcut h2{margin:0;overflow-wrap:anywhere}.payment-shortcut p{margin:0;color:var(--muted)}
.payment-detail{max-width:760px;gap:12px}.payment-detail h2,.payment-detail p{margin:0}.payment-detail>.row-actions{margin:4px 0 14px;flex-wrap:wrap}.manual-payment{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}.payment-restart-form{margin-top:18px}
.alert.info{color:#245c73;background:#eaf6f9;border:1px solid #c7e6ef}
@media(max-width:640px){.notification-list{max-height:58vh}.settings-grid>aside>.list-card{max-height:360px}.settings-grid>aside>.mail-log{max-height:300px}.card.payment-shortcut{align-items:stretch;flex-direction:column;padding:24px;gap:20px}.payment-shortcut .button{width:100%}}

/* Public proposal */
.public-page{background:#fff;color:var(--ink)}.proposal-top{height:92px;padding:0 clamp(22px,6vw,90px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.proposal-top img{width:min(300px,55vw)}.proposal-top span{color:var(--muted);font-size:.8rem}.proposal-document{width:min(1050px,calc(100% - 34px));margin:0 auto}.proposal-hero{margin:42px 0;padding:clamp(34px,7vw,80px);border-radius:30px;color:#fff;background:radial-gradient(circle at 80% 20%,rgba(197,74,149,.55),transparent 35%),radial-gradient(circle at 20% 90%,rgba(81,198,211,.32),transparent 38%),#3e3e3e}.proposal-hero h1{max-width:800px;font-size:clamp(2.6rem,6vw,5.3rem);line-height:.96;letter-spacing:-.055em;margin:18px 0 34px}.proposal-hero>p{color:#bbb;margin:0}.proposal-hero>strong{font-size:1.4rem}.proposal-summary{margin-top:55px;padding-top:25px;border-top:1px solid rgba(255,255,255,.18);display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.proposal-summary span{display:grid;color:#aaa;font-size:.8rem}.proposal-summary b{color:#fff;font-size:1rem}.proposal-section{padding:42px 10px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:70px 1fr;gap:25px}.section-number{color:var(--brand-secondary);font-weight:800}.proposal-section h2,.proposal-options h2,.proposal-next h2{font-size:clamp(1.8rem,4vw,2.8rem);margin:0 0 14px}.proposal-section p{max-width:780px;margin:0;font-size:1.06rem;white-space:normal}.proposal-options{padding:60px 0}.option-list{display:grid;gap:12px}.selectable-option{padding:22px;border:1px solid var(--line);border-radius:17px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:16px;cursor:pointer}.selectable-option:has(input:checked){border-color:var(--brand-primary);background:var(--aqua-soft)}.selectable-option input{width:22px;height:22px}.selectable-option span{display:grid}.selectable-option small{color:var(--muted)}.investment{margin:40px 0;padding:40px;border-radius:24px;color:#fff;background:#3e3e3e}.investment>div{display:flex;align-items:end;justify-content:space-between}.investment h2{margin:8px 0 0}.investment strong{font-size:2.4rem}.investment>p{color:#bbb}.advisor-section{padding:40px;border-radius:24px;background:var(--aqua-soft);display:flex;align-items:center;gap:22px}.advisor-section img{width:96px;height:96px;border-radius:24px;object-fit:cover;object-position:top}.advisor-section h2{margin:3px 0}.advisor-section p{margin:0;color:var(--muted)}.proposal-next{padding:80px 0;text-align:center}.proposal-next>p{max-width:650px;margin:0 auto 25px;color:var(--muted)}.accept-form{display:grid;justify-items:center;gap:18px}.terms{display:flex;grid-template-columns:auto 1fr;align-items:center;gap:10px}.terms input{width:20px}.secondary-actions{margin-top:15px;display:flex;justify-content:center;gap:10px}.proposal-footer{padding:35px;text-align:center;color:#888;background:#f5f5f5}.result-page{min-height:100vh;width:min(620px,calc(100% - 32px));margin:auto;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.result-page>img{width:280px;margin-bottom:45px}.result-page h1{font-size:3rem;margin:10px}.result-page>p{color:var(--muted)}.result-icon{width:70px;height:70px;border-radius:50%;display:grid;place-items:center;color:#fff;background:#45b88e;font-size:2rem}.activation-card{width:100%;margin-top:25px;padding:28px;text-align:left}
@media(max-width:900px){.service-grid,.editor-grid,.approval-grid,.settings-grid{grid-template-columns:1fr}.table-header.clients,.table-row.clients,.table-header.proposals,.table-row.proposals{grid-template-columns:1fr 1fr}.table-header.clients,.table-header.proposals{display:none}.proposal-summary{grid-template-columns:1fr}.color-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:560px){.editor-head{align-items:stretch;flex-direction:column}.editor-actions>*{width:100%}.project-hero{align-items:start;flex-direction:column}.timeline-step{grid-template-columns:1fr}.message-form{grid-template-columns:1fr}.message{max-width:90%}.proposal-top span{display:none}.proposal-document{width:min(100% - 20px,1050px)}.proposal-hero{margin:18px 0}.proposal-section{grid-template-columns:1fr;gap:8px}.selectable-option{grid-template-columns:auto 1fr}.selectable-option>b{grid-column:2}.investment>div{align-items:start;flex-direction:column}.advisor-section{align-items:start;flex-direction:column}.secondary-actions{flex-direction:column}.secondary-actions>*{width:100%}.color-grid{grid-template-columns:1fr 1fr}}
.project-admin-bar{display:grid;grid-template-columns:180px 180px 1fr auto;gap:14px;align-items:end;margin:18px 0}.project-admin-bar label{margin:0}.completion{margin:18px 0}@media(max-width:800px){.project-admin-bar{grid-template-columns:1fr}.project-admin-bar .button{width:100%}}

/* Finitions V1 : rythme vertical, groupes et surfaces à contenu long */
.project-admin-bar{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));margin:0;gap:16px}
.project-admin-bar.compact{grid-template-columns:minmax(180px,1fr) minmax(180px,260px) auto}
.task-group{padding:4px 0 8px}.task-group + .task-group{margin-top:8px;padding-top:24px;border-top:1px solid var(--line)}
.task-group h3,.file-group h3{margin:0 0 10px}.file-group + .file-group{margin-top:10px;padding-top:22px;border-top:1px solid var(--line)}
.file-row p{margin:3px 0;color:var(--muted);font-size:.82rem}.table-wrap{width:100%;overflow-x:auto}
.table-wrap table{width:100%;min-width:680px;border-collapse:collapse}.table-wrap th,.table-wrap td{padding:14px 12px;text-align:left;border-bottom:1px solid var(--line)}
.attention-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}.attention-list .action-row{padding:14px;border:1px solid var(--line);border-radius:14px;grid-template-columns:1fr auto}.attention-list .action-row small{grid-column:1/-1}.task-action{margin-top:0}
.list-card>h2 + .empty-state,.approval-grid>.empty-state{width:100%}
.section-toggle-grid{grid-column:1/-1;margin:0;padding:16px;border:1px solid var(--line);border-radius:14px;display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.section-toggle-grid legend{padding:0 8px;font-size:.78rem;font-weight:750}.section-toggle-grid label{display:flex;align-items:center;gap:8px;font-size:.78rem;font-weight:550}.section-toggle-grid input{width:18px;height:18px;margin:0}
.pagination{display:flex;align-items:center;justify-content:center;gap:14px;padding:8px}.pagination a{padding:10px 16px;border:1px solid var(--line);border-radius:999px;background:#fff;text-decoration:none;font-weight:700}.pagination span{color:var(--muted);font-size:.82rem}
@media(max-width:800px){.project-admin-bar.compact,.attention-list{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column}.section-heading>a,.section-heading>.button{width:100%}}
