/* =====================================================
   WEDDING PLANNER PRO — DESIGN SYSTEM
   Inspirations : Notion / Monday / Trello / Airbnb / Apple
   Palette : blanc, beige, rose poudré, doré discret, gris clair
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* --- Palette --- */
    --c-blanc: #FFFFFF;
    --c-beige: #F7F2EC;
    --c-beige-deep: #EFE6D9;
    --c-rose: #E8B4B8;
    --c-rose-soft: #F3DADC;
    --c-rose-deep: #C98D92;
    --c-or: #C9A66B;
    --c-or-soft: #E4D3AE;
    --c-gris: #F4F4F5;
    --c-gris-2: #E7E5E4;
    --c-encre: #2B2622;
    --c-encre-soft: #6B6560;

    /* --- Rôles sémantiques --- */
    --bg-app: var(--c-beige);
    --bg-surface: var(--c-blanc);
    --bg-surface-2: var(--c-gris);
    --bg-sidebar: #FBF8F4;
    --border-color: #EAE3D8;
    --text-main: var(--c-encre);
    --text-muted: var(--c-encre-soft);
    --accent: var(--c-rose-deep);
    --accent-soft: var(--c-rose-soft);
    --gold: var(--c-or);
    --gold-soft: var(--c-or-soft);

    --success: #6E9B7B;
    --success-soft: #E4EFE4;
    --warning: #CC9A4B;
    --warning-soft: #F6ECD9;
    --danger: #C4645A;
    --danger-soft: #F6E2DF;
    --info: #7291AC;
    --info-soft: #E6EDF3;

    --radius-s: 10px;
    --radius-m: 16px;
    --radius-l: 22px;
    --radius-full: 999px;

    --shadow-s: 0 1px 2px rgba(43,38,34,.05), 0 1px 1px rgba(43,38,34,.04);
    --shadow-m: 0 6px 18px rgba(43,38,34,.07), 0 2px 6px rgba(43,38,34,.05);
    --shadow-l: 0 18px 45px rgba(43,38,34,.12), 0 6px 16px rgba(43,38,34,.06);

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition: 180ms cubic-bezier(.4,0,.2,1);
    --sidebar-w: 264px;
    --topbar-h: 76px;
}

[data-theme="dark"] {
    --bg-app: #1B1815;
    --bg-surface: #23201C;
    --bg-surface-2: #2A2622;
    --bg-sidebar: #171512;
    --border-color: #34302A;
    --text-main: #F3EEE7;
    --text-muted: #B3A99C;
    --accent: #E8B4B8;
    --accent-soft: #3A2A2C;
    --gold: #D9BC85;
    --gold-soft: #3A331F;
    --success-soft: #23301F;
    --warning-soft: #332A17;
    --danger-soft: #3A2521;
    --info-soft: #1F2A33;
    --shadow-m: 0 6px 18px rgba(0,0,0,.35);
    --shadow-l: 0 18px 45px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg-app);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    font-size: 14.5px;
    line-height: 1.5;
    transition: background var(--transition), color var(--transition);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); }
ul { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--accent-soft); }

/* Scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--c-gris-2); border-radius: 10px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3A342C; }

/* =====================================================
   APP SHELL
   ===================================================== */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 40;
    transition: transform var(--transition);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 26px 24px 20px;
}
.sidebar-brand .mark {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--c-rose), var(--gold));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-display); font-size: 17px;
    box-shadow: var(--shadow-s);
    flex-shrink: 0;
}
.sidebar-brand .name { font-family: var(--font-display); font-size: 18px; line-height: 1.1; }
.sidebar-brand .name small { display: block; font-family: var(--font-body); font-size: 10.5px; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 14px; }
.sidebar-section-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 16px 12px 8px; }

.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-s);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13.6px;
    margin-bottom: 2px;
    transition: background var(--transition), color var(--transition);
    position: relative;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-surface-2); color: var(--text-main); }
.nav-item.active { background: var(--bg-surface); color: var(--accent); box-shadow: var(--shadow-s); font-weight: 600; }
.nav-item.active::before {
    content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; background: var(--accent); border-radius: 3px;
}
.nav-item .count-badge { margin-left: auto; font-size: 10.5px; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 999px; font-weight: 700; }

.sidebar-footer { padding: 14px; border-top: 1px solid var(--border-color); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-s); cursor: pointer; transition: background var(--transition); }
.user-chip:hover { background: var(--bg-surface-2); }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,var(--c-rose-soft),var(--gold-soft)); display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--accent); font-size:13px;}
.user-chip .meta { line-height: 1.25; overflow: hidden; }
.user-chip .meta strong { display:block; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-chip .meta span { font-size: 11.5px; color: var(--text-muted); }

.main-area { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px;
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--bg-app) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}
.topbar-title h1 { font-size: 22px; }
.topbar-title p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.search-box { display:flex; align-items:center; gap:8px; background: var(--bg-surface); border:1px solid var(--border-color); border-radius: var(--radius-full); padding: 8px 16px; min-width: 230px; box-shadow: var(--shadow-s);}
.search-box input { border:none; background:transparent; outline:none; font-size:13px; color:var(--text-main); width:100%; }
.search-box svg { width:15px;height:15px;color:var(--text-muted); flex-shrink:0;}

.icon-btn { width:40px;height:40px;border-radius:50%; border:1px solid var(--border-color); background: var(--bg-surface); display:flex;align-items:center;justify-content:center; cursor:pointer; position:relative; color: var(--text-main); box-shadow: var(--shadow-s); transition: transform var(--transition), background var(--transition); }
.icon-btn:hover { transform: translateY(-1px); background: var(--bg-surface-2); }
.icon-btn svg { width:17px;height:17px; }
.icon-btn .dot { position:absolute; top:7px; right:8px; width:7px;height:7px;border-radius:50%; background: var(--danger); border: 1.5px solid var(--bg-surface);}

.content { padding: 28px 32px 60px; flex: 1; }

@media (max-width: 1080px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-l); }
    .main-area { margin-left: 0; }
    .content { padding: 20px 16px 50px; }
    .topbar { padding: 0 16px; }
    .search-box { display: none; }
}

.menu-toggle { display:none; }
@media (max-width: 1080px) { .menu-toggle { display:flex; } }

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content:center; gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-s);
    border: 1px solid transparent;
    font-weight: 600; font-size: 13.3px;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: linear-gradient(135deg, var(--c-rose-deep), var(--c-rose)); color:#fff; box-shadow: var(--shadow-s); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-m); }
.btn-gold { background: linear-gradient(135deg, #B78E4E, var(--gold)); color:#fff; }
.btn-secondary { background: var(--bg-surface); border-color: var(--border-color); color: var(--text-main); }
.btn-secondary:hover { background: var(--bg-surface-2); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-surface-2); color: var(--text-main); }
.btn-sm { padding: 6px 12px; font-size: 12.3px; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* =====================================================
   CARDS / SURFACES
   ===================================================== */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-s);
}
.card-pad { padding: 22px; }

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    padding: 20px 22px;
    display: flex; flex-direction: column; gap: 10px;
    box-shadow: var(--shadow-s);
    position: relative;
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-m); }
.stat-card .icon-wrap { width: 38px; height: 38px; border-radius: 11px; display:flex; align-items:center; justify-content:center; }
.stat-card .icon-wrap svg { width: 18px; height: 18px; }
.stat-card .value { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.stat-card .label { color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.stat-card .delta { font-size: 11.5px; font-weight: 700; display:inline-flex; align-items:center; gap:4px; width: fit-content; padding: 3px 8px; border-radius: 999px; }
.delta.up { color: var(--success); background: var(--success-soft); }
.delta.down { color: var(--danger); background: var(--danger-soft); }

.stats-grid { display:grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 1400px) { .stats-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

.grid-2 { display:grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.grid-3 { display:grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1080px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.section-title { display:flex; align-items:center; justify-content:space-between; margin-bottom: 14px; }
.section-title h2 { font-size: 17px; }
.section-title .muted { font-size: 12px; color: var(--text-muted); }

/* =====================================================
   BADGES / STATUTS
   ===================================================== */
.badge { display:inline-flex; align-items:center; gap:5px; font-size: 11.3px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge-dot { width:6px;height:6px;border-radius:50%; background: currentColor; }
.badge-nouveau { background: var(--info-soft); color: var(--info); }
.badge-preparation { background: var(--warning-soft); color: var(--warning); }
.badge-validation { background: var(--gold-soft); color: #9C7A32; }
.badge-finalise { background: var(--success-soft); color: var(--success); }
.badge-termine { background: var(--bg-surface-2); color: var(--text-muted); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }

/* =====================================================
   TABLE
   ===================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-m); border: 1px solid var(--border-color); background: var(--bg-surface); }
table.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.data-table th {
    text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--text-muted); padding: 13px 16px; background: var(--bg-surface-2); font-weight: 700;
    position: sticky; top: 0;
}
table.data-table td { padding: 13px 16px; border-top: 1px solid var(--border-color); font-size: 13.3px; vertical-align: middle; }
table.data-table tbody tr { transition: background var(--transition); }
table.data-table tbody tr:hover { background: var(--bg-surface-2); }
table.data-table input[type="checkbox"] { width:16px;height:16px; accent-color: var(--accent); }

.avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--gold-soft); }
.avatar-initials { width: 30px; height: 30px; border-radius: 50%; display:flex;align-items:center;justify-content:center; background: linear-gradient(135deg,var(--c-rose-soft),var(--gold-soft)); color: var(--accent); font-weight:700; font-size:11.5px; }

/* =====================================================
   MARIAGE CARDS
   ===================================================== */
.mariage-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 18px; }
.mariage-card {
    background: var(--bg-surface); border:1px solid var(--border-color); border-radius: var(--radius-l);
    overflow:hidden; box-shadow: var(--shadow-s); transition: transform var(--transition), box-shadow var(--transition);
    display:flex; flex-direction:column;
}
.mariage-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.mariage-card .cover { height: 130px; position:relative; background-size:cover; background-position:center; }
.mariage-card .cover::after { content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45) 100%); }
.mariage-card .cover .badge { position:absolute; top:12px; right:12px; backdrop-filter: blur(6px); }
.mariage-card .cover .date-chip { position:absolute; bottom:10px; left:12px; color:#fff; font-size:12px; font-weight:600; display:flex; align-items:center; gap:5px;}
.mariage-card .body { padding: 16px 18px 18px; display:flex; flex-direction:column; gap:10px; flex:1; }
.mariage-card .names { font-family: var(--font-display); font-size: 19px; }
.mariage-card .meta-row { display:flex; align-items:center; gap:6px; font-size:12.3px; color: var(--text-muted); }
.mariage-card .meta-row svg { width:13px;height:13px; }
.mariage-card .progress-line { height:6px; border-radius:99px; background: var(--bg-surface-2); overflow:hidden; margin-top:4px;}
.mariage-card .progress-line span { display:block; height:100%; background: linear-gradient(90deg, var(--c-rose-deep), var(--gold)); border-radius:99px; }
.mariage-card .budget-row { display:flex; justify-content:space-between; font-size:12.5px; font-weight:600; margin-top:2px;}

/* Filter pills */
.filter-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom: 18px; }
.pill { padding: 7px 15px; border-radius:999px; border:1px solid var(--border-color); background: var(--bg-surface); font-size:12.6px; font-weight:600; cursor:pointer; color: var(--text-muted); transition: all var(--transition); }
.pill:hover { background: var(--bg-surface-2); }
.pill.active { background: var(--c-encre); color:#fff; border-color: var(--c-encre); }
[data-theme="dark"] .pill.active { background: var(--accent); border-color: var(--accent); color:#231a1b;}

/* =====================================================
   TABS
   ===================================================== */
.tabs-nav { display:flex; gap: 4px; border-bottom: 1px solid var(--border-color); margin-bottom: 22px; overflow-x:auto; }
.tabs-nav button {
    background:none; border:none; padding: 12px 16px; font-size:13.4px; font-weight:600; color: var(--text-muted);
    cursor:pointer; position:relative; white-space:nowrap; display:flex; align-items:center; gap:6px;
}
.tabs-nav button svg { width:15px;height:15px; }
.tabs-nav button.active { color: var(--accent); }
.tabs-nav button.active::after { content:''; position:absolute; left:12px;right:12px;bottom:-1px; height:2.5px; background: var(--accent); border-radius: 3px 3px 0 0; }
.tab-panel { display:none; animation: fadeUp .35s ease; }
.tab-panel.active { display:block; }

@keyframes fadeUp { from { opacity:0; transform: translateY(6px);} to {opacity:1; transform:translateY(0);} }

/* =====================================================
   FORMS
   ===================================================== */
.form-grid { display:grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display:flex; flex-direction:column; gap:6px; }
.field label { font-size: 12.3px; font-weight:600; color: var(--text-muted); }
.field input, .field select, .field textarea {
    padding: 10px 13px; border-radius: var(--radius-s); border:1px solid var(--border-color);
    background: var(--bg-surface); color: var(--text-main); font-size: 13.4px; font-family: var(--font-body);
    outline: none; transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 80px; }
.toggle { display:inline-flex; align-items:center; gap:10px; cursor:pointer; }
.toggle input { display:none; }
.toggle .track { width: 42px; height: 24px; border-radius: 99px; background: var(--bg-surface-2); border:1px solid var(--border-color); position:relative; transition: background var(--transition); }
.toggle .track::after { content:''; position:absolute; top:2px; left:2px; width:18px;height:18px; border-radius:50%; background:#fff; box-shadow: var(--shadow-s); transition: transform var(--transition); }
.toggle input:checked + .track { background: var(--accent); }
.toggle input:checked + .track::after { transform: translateX(18px); }

/* =====================================================
   MODAL
   ===================================================== */
.modal-overlay {
    position: fixed; inset:0; background: rgba(20,16,13,.45); backdrop-filter: blur(3px);
    display:flex; align-items:center; justify-content:center; z-index: 100; opacity:0; pointer-events:none;
    transition: opacity var(--transition); padding: 20px;
}
.modal-overlay.open { opacity:1; pointer-events:auto; }
.modal-box {
    background: var(--bg-surface); border-radius: var(--radius-l); width: 100%; max-width: 520px;
    box-shadow: var(--shadow-l); transform: translateY(14px) scale(.98); transition: transform var(--transition);
    max-height: 88vh; display:flex; flex-direction:column; overflow: hidden;
}
.modal-overlay.open .modal-box { transform: translateY(0) scale(1); }
.modal-box.modal-lg { max-width: 760px; }
.modal-head { padding: 20px 24px; border-bottom:1px solid var(--border-color); display:flex; align-items:center; justify-content:space-between; }
.modal-head h3 { font-size: 18px; }
.modal-body { padding: 22px 24px; overflow-y:auto; }
.modal-foot { padding: 16px 24px; border-top:1px solid var(--border-color); display:flex; justify-content:flex-end; gap:10px; }
.modal-close { width:32px;height:32px;border-radius:50%; border:none; background: var(--bg-surface-2); cursor:pointer; display:flex;align-items:center;justify-content:center; color: var(--text-main);}

/* =====================================================
   TOASTS
   ===================================================== */
.toast-stack { position: fixed; bottom: 22px; right: 22px; z-index: 200; display:flex; flex-direction:column; gap:10px; max-width: 340px; }
.toast {
    background: var(--bg-surface); border:1px solid var(--border-color); border-radius: var(--radius-m);
    padding: 13px 16px; box-shadow: var(--shadow-l); display:flex; gap: 11px; align-items:flex-start;
    animation: toastIn .3s ease;
}
@keyframes toastIn { from { opacity:0; transform: translateX(20px);} to {opacity:1; transform:translateX(0);} }
.toast .toast-icon { width: 30px;height:30px;border-radius:50%; flex-shrink:0; display:flex;align-items:center;justify-content:center; }
.toast .toast-icon svg { width:15px;height:15px; }
.toast strong { font-size: 13.2px; display:block; }
.toast p { margin: 2px 0 0; font-size:12.2px; color: var(--text-muted); }
.toast.info .toast-icon { background: var(--info-soft); color: var(--info); }
.toast.success .toast-icon { background: var(--success-soft); color: var(--success); }
.toast.warning .toast-icon { background: var(--warning-soft); color: var(--warning); }

/* =====================================================
   CALENDAR
   ===================================================== */
.calendar-toolbar { display:flex; align-items:center; justify-content:space-between; margin-bottom: 16px; flex-wrap:wrap; gap:12px;}
.calendar-toolbar .cal-nav { display:flex; align-items:center; gap:8px; }
.calendar-toolbar .cal-nav button { width:34px;height:34px;border-radius:50%; border:1px solid var(--border-color); background: var(--bg-surface); cursor:pointer; display:flex;align-items:center;justify-content:center;}
.calendar-toolbar h2 { font-size: 19px; min-width: 190px; text-align:center; }
.view-switch { display:flex; background: var(--bg-surface-2); border-radius: var(--radius-s); padding:3px; gap:2px;}
.view-switch button { border:none; background:transparent; padding:7px 14px; border-radius:8px; font-size:12.6px; font-weight:600; cursor:pointer; color: var(--text-muted);}
.view-switch button.active { background: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-s); }

.month-grid { display:grid; grid-template-columns: repeat(7,1fr); border:1px solid var(--border-color); border-radius: var(--radius-m); overflow:hidden; background: var(--border-color); gap:1px; }
.month-grid .day-header { background: var(--bg-surface-2); padding:9px; text-align:center; font-size:11px; font-weight:700; text-transform:uppercase; color: var(--text-muted); letter-spacing:.04em;}
.month-grid .day-cell { background: var(--bg-surface); min-height: 108px; padding: 7px; display:flex; flex-direction:column; gap:4px; }
.month-grid .day-cell.other-month { background: var(--bg-app); opacity:.55; }
.month-grid .day-cell .day-num { font-size:12px; font-weight:700; width:22px;height:22px;display:flex;align-items:center;justify-content:center; border-radius:50%; }
.month-grid .day-cell.today .day-num { background: var(--accent); color:#fff; }
.month-grid .event-chip { font-size:10.6px; padding:3px 6px; border-radius:6px; font-weight:600; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; border-left: 3px solid; transition: transform var(--transition); }
.month-grid .event-chip:hover { transform: translateX(2px); }
.month-grid .more-link { font-size: 10.5px; color: var(--text-muted); font-weight:600; padding-left: 4px; cursor:pointer;}

.week-grid, .day-grid { display:grid; border:1px solid var(--border-color); border-radius: var(--radius-m); overflow:hidden; background: var(--bg-surface); }
.time-col { border-right: 1px solid var(--border-color); }
.hour-row { height: 52px; border-top: 1px solid var(--border-color); font-size: 10.5px; color: var(--text-muted); padding: 3px 8px; }
.week-day-col { border-right: 1px solid var(--border-color); position: relative; }
.week-day-col:last-child { border-right:none; }
.week-day-head { padding: 10px; text-align:center; border-bottom:1px solid var(--border-color); background: var(--bg-surface-2); }
.week-day-head .wd { font-size: 10.5px; text-transform:uppercase; color: var(--text-muted); font-weight:700;}
.week-day-head .wn { font-size: 16px; font-weight:700; font-family: var(--font-display); }
.week-event { position:absolute; left:4px; right:4px; border-radius:8px; padding:4px 7px; font-size:10.8px; font-weight:600; color:#fff; overflow:hidden; box-shadow: var(--shadow-s); cursor:pointer; }

/* =====================================================
   KANBAN CHECKLIST
   ===================================================== */
.checklist-cols { display:grid; grid-template-columns: repeat(3, 1fr); gap:16px; align-items:start; }
@media (max-width: 1000px) { .checklist-cols { grid-template-columns: 1fr; } }
.checklist-col { background: var(--bg-surface-2); border-radius: var(--radius-m); padding: 14px; }
.checklist-col-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding: 0 4px;}
.checklist-col-head h4 { font-size: 13.5px; }
.checklist-col-head .count { background: var(--bg-surface); border-radius:999px; font-size:11px; padding:2px 9px; font-weight:700; color:var(--text-muted); }
.task-card { background: var(--bg-surface); border-radius: var(--radius-s); padding: 12px 13px; margin-bottom: 9px; box-shadow: var(--shadow-s); cursor: grab; border: 1px solid var(--border-color); }
.task-card:active { cursor: grabbing; }
.task-card .cat-chip { font-size: 10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color: var(--accent); margin-bottom:6px; display:block;}
.task-card p.title { font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.task-card .task-foot { display:flex; align-items:center; justify-content:space-between; }
.task-card .due { font-size: 11px; color: var(--text-muted); display:flex; align-items:center; gap:4px;}
.task-card .due svg { width:11px;height:11px;}

/* checklist alt: liste par catégories avec checkbox */
.checklist-category { margin-bottom: 22px; }
.checklist-category h4 { font-size: 14px; margin-bottom: 10px; display:flex; align-items:center; gap: 8px;}
.check-row { display:flex; align-items:center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border-color); }
.check-row:last-child { border-bottom:none; }
.check-row .cb { width: 20px;height:20px; border-radius: 6px; border: 1.5px solid var(--border-color); display:flex;align-items:center;justify-content:center; cursor:pointer; flex-shrink:0; transition: all var(--transition); }
.check-row .cb.checked { background: var(--success); border-color: var(--success); color:#fff; }
.check-row .cb svg { width:12px;height:12px; }
.check-row span.done { text-decoration: line-through; color: var(--text-muted); }
.check-row .row-meta { margin-left:auto; display:flex; align-items:center; gap:10px; }

/* =====================================================
   PLAN DE TABLE
   ===================================================== */
.plan-wrap { display:flex; gap: 18px; align-items:flex-start; }
.plan-canvas { flex:1; background: var(--bg-surface); border:1px dashed var(--border-color); border-radius: var(--radius-l); position: relative; height: 620px; overflow:auto; background-image: radial-gradient(var(--border-color) 1px, transparent 1px); background-size: 22px 22px; }
.table-round { position:absolute; width: 130px; height:130px; border-radius:50%; background: var(--bg-surface); border:2px solid var(--gold); box-shadow: var(--shadow-m); display:flex; align-items:center; justify-content:center; flex-direction:column; cursor: grab; }
.table-round strong { font-size: 12.5px; }
.table-round span { font-size: 10.5px; color: var(--text-muted); }
.table-round .seats { position:absolute; inset:-14px; }
.seat { position:absolute; width: 26px;height:26px;border-radius:50%; background: var(--accent-soft); color:var(--accent); font-size:9.5px; font-weight:700; display:flex;align-items:center;justify-content:center; border: 2px solid var(--bg-surface); cursor: grab; }
.seat.filled { background: var(--accent); color:#fff; }
.plan-sidebar { width: 280px; flex-shrink:0; }
.guest-pool { max-height: 560px; overflow-y:auto; }
.guest-chip { display:flex; align-items:center; gap:9px; padding: 8px 10px; border-radius: var(--radius-s); border:1px solid var(--border-color); margin-bottom:7px; cursor:grab; background: var(--bg-surface); font-size:12.6px; font-weight:600; }
.guest-chip:active { cursor:grabbing; }

/* =====================================================
   CHARTS (SVG maison, sans dépendance externe)
   ===================================================== */
.chart-legend { display:flex; flex-wrap:wrap; gap: 12px; margin-top: 14px; }
.chart-legend .item { display:flex; align-items:center; gap:7px; font-size:12px; color: var(--text-muted); }
.chart-legend .swatch { width:9px;height:9px;border-radius:3px; }

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-shell { min-height: 100vh; display:flex; align-items:center; justify-content:center; background: linear-gradient(135deg, var(--c-beige) 0%, var(--c-rose-soft) 100%); padding: 24px; position:relative; overflow:hidden; }
.auth-shell::before, .auth-shell::after { content:''; position:absolute; border-radius:50%; opacity:.5; filter: blur(60px); }
.auth-shell::before { width:380px;height:380px; background: var(--c-or-soft); top:-100px; left:-100px; }
.auth-shell::after { width:420px;height:420px; background: var(--c-rose-soft); bottom:-140px; right:-120px; }
.auth-card { position:relative; z-index:2; background: var(--bg-surface); width: 100%; max-width: 420px; border-radius: var(--radius-l); box-shadow: var(--shadow-l); padding: 40px 36px; border: 1px solid var(--border-color); }
.auth-brand { display:flex; align-items:center; gap:11px; margin-bottom: 26px; justify-content:center; }
.auth-brand .mark { width:42px;height:42px;border-radius:12px; background: linear-gradient(135deg, var(--c-rose), var(--gold)); display:flex;align-items:center;justify-content:center; color:#fff; font-family: var(--font-display); font-size:20px; }
.auth-title { text-align:center; margin-bottom: 26px; }
.auth-title h1 { font-size: 24px; margin-bottom:6px;}
.auth-title p { color: var(--text-muted); font-size:13px; margin:0;}
.auth-foot { text-align:center; margin-top: 18px; font-size:12.8px; color: var(--text-muted); }
.auth-note { background: var(--info-soft); color:#4C6479; border-radius: var(--radius-s); padding: 11px 14px; font-size:12px; margin-top:18px; }
[data-theme="dark"] .auth-note { color: #B8CBDB; }

/* =====================================================
   TIMELINE
   ===================================================== */
.timeline-wrap { position: relative; padding: 30px 0; }
.timeline-line { position:absolute; left:50%; top:0; bottom:0; width:2px; background: var(--border-color); transform: translateX(-50%); }
.timeline-item { position:relative; width: 50%; padding: 0 40px 46px; }
.timeline-item:nth-child(odd) { left:0; text-align:right; }
.timeline-item:nth-child(even) { left:50%; text-align:left; }
.timeline-item .dot { position:absolute; top:2px; width:16px;height:16px;border-radius:50%; background: var(--accent); border:3px solid var(--bg-app); box-shadow: 0 0 0 2px var(--accent); }
.timeline-item:nth-child(odd) .dot { right:-8px; }
.timeline-item:nth-child(even) .dot { left:-8px; }
.timeline-item .tl-card { display:inline-block; background: var(--bg-surface); border:1px solid var(--border-color); border-radius: var(--radius-m); padding: 14px 18px; box-shadow: var(--shadow-s); max-width: 340px; }
.timeline-item .tl-label { font-family: var(--font-display); font-size: 16px; color: var(--accent); margin-bottom:4px; }
@media (max-width: 760px) {
    .timeline-line { left: 16px; }
    .timeline-item, .timeline-item:nth-child(even) { width:100%; left:0; text-align:left; padding: 0 0 34px 44px; }
    .timeline-item:nth-child(odd) .dot, .timeline-item:nth-child(even) .dot { left: 8px; }
}

/* =====================================================
   MISC UTILITIES
   ===================================================== */
.muted { color: var(--text-muted); }
.flex { display:flex; }
.items-center { align-items:center; }
.gap-8 { gap:8px; }
.gap-12 { gap:12px; }
.mt-16 { margin-top:16px; }
.mb-16 { margin-bottom:16px; }
.empty-state { text-align:center; padding: 50px 20px; color: var(--text-muted); }
.empty-state svg { width:44px;height:44px; margin-bottom:12px; opacity:.5; }
.future-lock { display:inline-flex; align-items:center; gap:5px; font-size:10.6px; color: var(--gold); background: var(--gold-soft); padding:3px 9px; border-radius:999px; font-weight:700; }

.fade-in { animation: fadeUp .4s ease; }

/* Bar chart horizontal (maison) */
.bar-chart-h { display:flex; flex-direction:column; gap:14px; }
.bar-row-label { display:flex; justify-content:space-between; font-size:12.6px; margin-bottom:6px; }
.bar-row-label strong { font-weight:700; }
.bar-row-track { height:9px; border-radius:99px; background: var(--bg-surface-2); overflow:hidden; }
.bar-row-fill { height:100%; border-radius:99px; transition: width .6s ease; }

/* Notification dropdown */
.notif-dropdown { position:absolute; top: 50px; right:0; width: 320px; background: var(--bg-surface); border:1px solid var(--border-color); border-radius: var(--radius-m); box-shadow: var(--shadow-l); opacity:0; pointer-events:none; transform: translateY(-6px); transition: all var(--transition); z-index: 60; max-height: 420px; overflow-y:auto; }
.notif-dropdown.open-dd { opacity:1; pointer-events:auto; transform: translateY(0); }
.notif-dropdown-head { padding: 14px 16px; font-weight:700; font-size:13.5px; border-bottom:1px solid var(--border-color); }
.notif-row { display:flex; gap:10px; padding: 12px 16px; border-bottom:1px solid var(--border-color); }
.notif-row:last-child { border-bottom:none; }
.notif-row.unread { background: var(--bg-surface-2); }
.notif-row strong { font-size:12.6px; display:block; }
.notif-row p { margin:2px 0 0; font-size:11.8px; color:var(--text-muted); }
.notif-dot { width:8px;height:8px;border-radius:50%; margin-top:5px; flex-shrink:0; }
.notif-info { background: var(--info); } .notif-success { background: var(--success); } .notif-warning { background: var(--warning); } .notif-danger { background: var(--danger); }

@media (max-width: 640px) { .hide-mobile { display:none; } }

/* Impression navigateur (permet l'enregistrement en PDF) */
@media print {
    .sidebar, .topbar, .no-print { display:none !important; }
    .main-area { margin-left:0 !important; }
}

/* =====================================================
   COMPOSANTS AJOUTÉS EN VERSION PRODUCTION (v2)
   ===================================================== */

/* --- Alertes en ligne (formulaires, installation) --- */
.alert { padding: 11px 14px; border-radius: var(--radius-s); font-size: 12.8px; margin-bottom: 14px; line-height: 1.5; }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-info { background: var(--info-soft); color: var(--info); }

/* --- Badges complémentaires --- */
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-neutral { background: var(--bg-surface-2); color: var(--text-muted); }

/* --- Divers utilitaires --- */
.nowrap { white-space: nowrap; }
.retard { color: var(--danger); font-weight: 600; }
.link-mini { font-size: 11px; color: var(--accent); font-weight: 600; margin-left: 6px; }
.input-inline { width: 100%; padding: 6px 8px; font-size: 12.5px; border: 1px solid transparent; background: transparent; border-radius: 8px; color: inherit; font-family: inherit; }
.input-inline:hover { border-color: var(--border-color); }
.input-inline:focus { border-color: var(--accent); background: var(--bg-surface); outline: none; }
.app-footer { padding: 18px 30px 26px; font-size: 11.4px; color: var(--text-muted); }
.nav-item.sub { padding-left: 34px; font-size: 12.6px; }
.sidebar-backdrop { display: none; }
@media (max-width: 1080px) {
    .sidebar.open ~ .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(43,38,34,.35); z-index: 40; }
}

/* --- Case à cocher compacte (pointage des présences) --- */
.mini-check { display: inline-flex; cursor: pointer; }
.mini-check input { display: none; }
.mini-check span { width: 18px; height: 18px; border-radius: 6px; border: 1.6px solid var(--border-color); display: inline-block; position: relative; transition: var(--transition); }
.mini-check input:checked + span { background: var(--success); border-color: var(--success); }
.mini-check input:checked + span::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* --- Prochain mariage (tableau de bord) --- */
.next-wedding { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; border-left: 3px solid var(--accent); }
.next-wedding-timeline { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.next-wedding-timeline .flex { display: flex; }

/* --- Intégrations (paramètres) --- */
.integration-row { display: flex; align-items: flex-start; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border-color); }
.integration-row:last-child { border-bottom: none; }
.integration-row .cb { width: 28px; height: 28px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-muted); }
.integration-row .badge { flex-shrink: 0; }

/* =====================================================
   TIMELINE DU JOUR J — déroulé heure par heure
   ===================================================== */
.jourj-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-left: 3px solid var(--accent); }
.jourj-progress { min-width: 200px; flex: 1; max-width: 320px; }

.grid-timeline { display: grid; grid-template-columns: 1fr 300px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .grid-timeline { grid-template-columns: 1fr; } }
.timeline-side { position: sticky; top: 16px; }
@media (max-width: 1100px) { .timeline-side { position: static; } }

.moment-sep { display: flex; align-items: center; margin: 20px 0 10px; }
.moment-sep span { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--radius-full); }

.runsheet { display: flex; flex-direction: column; gap: 8px; }
.runsheet-row {
    display: grid;
    grid-template-columns: 78px 4px 1fr auto;
    gap: 14px;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-m);
    padding: 12px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-s);
    transition: var(--transition);
}
.runsheet-row:hover { box-shadow: var(--shadow-m); }
.runsheet-row.now { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-m); }
.runsheet-row.statut-fait { opacity: .62; }
.runsheet-row.statut-fait .rs-titre { text-decoration: line-through; }
.runsheet-row.statut-en-cours { border-color: var(--warning); }

.rs-time { text-align: right; line-height: 1.25; }
.rs-time strong { font-size: 15px; font-family: var(--font-display); display: block; }
.rs-time span { font-size: 11px; color: var(--text-muted); display: block; }
.rs-time small { font-size: 10px; color: var(--text-muted); }
.rs-moment { width: 4px; height: 100%; min-height: 38px; border-radius: 4px; }
.rs-body { min-width: 0; }
.rs-body strong { font-size: 13.6px; }
.rs-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 5px; font-size: 11.6px; color: var(--text-muted); align-items: center; }
.rs-meta a { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.rs-desc { font-size: 11.8px; margin-top: 6px; }
.rs-actions { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }

.statut-switch { display: inline-flex; background: var(--bg-surface-2); border-radius: var(--radius-full); padding: 2px; }
.statut-switch button { border: none; background: transparent; font: inherit; font-size: 11px; font-weight: 600; color: var(--text-muted); padding: 5px 11px; border-radius: var(--radius-full); cursor: pointer; transition: var(--transition); white-space: nowrap; }
.statut-switch button:hover { color: var(--text-main); }
.statut-switch button.active { background: var(--bg-surface); color: var(--text-main); box-shadow: var(--shadow-s); }

@media (max-width: 720px) {
    .runsheet-row { grid-template-columns: 66px 4px 1fr; }
    .rs-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; width: 100%; }
}

/* --- Frise de préparation : listes de tâches dans les jalons --- */
.tl-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.tl-list li { font-size: 11.6px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.timeline-item:nth-child(odd) .tl-list li { justify-content: flex-end; }
.tl-list li.done { text-decoration: line-through; opacity: .7; }

/* --- Plan de table : retours visuels du glisser-déposer --- */
.table-round.drop-hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.table-round.dragging { opacity: .8; cursor: grabbing; }
.guest-chip[draggable="true"]:hover { border-color: var(--accent); }

/* --- Impression --- */
@media print {
    .sidebar, .topbar, .app-footer, .filter-bar, .rs-actions, .btn { display: none !important; }
    .main-area, .content { margin: 0; padding: 0; }
    .runsheet-row { break-inside: avoid; box-shadow: none; }
}

/* --- Logo d'agence dans la barre latérale (marque blanche) --- */
.sidebar-brand .mark-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; background: #fff; }

/* =====================================================
   PIPELINE COMMERCIAL (CRM)
   ===================================================== */
.pipeline { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.pipeline-colonne {
    flex: 0 0 244px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-m);
    padding: 12px 10px;
    min-height: 180px;
    transition: var(--transition);
    border: 2px solid transparent;
}
.pipeline-colonne.survol { border-color: var(--accent); background: var(--accent-soft); }
.pipeline-tete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.pipeline-tete strong { font-size: 12.6px; }
.pipeline-compteur {
    background: var(--bg-surface); color: var(--text-muted);
    font-size: 10.5px; font-weight: 700; border-radius: var(--radius-full); padding: 2px 8px;
}
.pipeline-valeur { font-size: 11.2px; color: var(--text-muted); margin-bottom: 10px; }
.pipeline-cartes { display: flex; flex-direction: column; gap: 8px; }
.pipeline-vide { font-size: 11.4px; color: var(--text-muted); text-align: center; padding: 16px 0; }

.affaire-carte {
    background: var(--bg-surface);
    border-radius: var(--radius-s);
    padding: 11px 12px;
    box-shadow: var(--shadow-s);
    cursor: grab;
    transition: var(--transition);
    border-left: 3px solid var(--accent);
}
.affaire-carte:hover { box-shadow: var(--shadow-m); transform: translateY(-1px); }
.affaire-carte.en-deplacement { opacity: .45; }
.affaire-carte strong { font-size: 12.5px; display: block; line-height: 1.35; }
.affaire-contact, .affaire-meta { font-size: 11.2px; color: var(--text-muted); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.affaire-pied { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; }
.affaire-montant { font-size: 12.4px; font-weight: 700; }
.affaire-proba { font-size: 10.6px; color: var(--text-muted); background: var(--bg-surface-2); padding: 2px 7px; border-radius: var(--radius-full); }
.affaire-responsable { font-size: 10.6px; color: var(--text-muted); margin-top: 6px; }
.affaire-alerte { font-size: 10.4px; color: var(--danger); margin-top: 6px; display: flex; align-items: center; gap: 4px; font-weight: 600; }

/* --- Fil des échanges (historique CRM) --- */
.fil-echanges { display: flex; flex-direction: column; }
.echange { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--border-color); align-items: flex-start; }
.echange:last-child { border-bottom: none; }
.echange-icone {
    width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.echange-systeme .echange-icone { background: var(--bg-surface-2); color: var(--text-muted); }
.echange-corps { flex: 1; min-width: 0; }

/* =====================================================
   ESPACE COUPLE (portail client)
   ===================================================== */
.espace-body { background: var(--bg-app); min-height: 100vh; display: flex; flex-direction: column; }

.espace-entete { background: var(--bg-surface); border-bottom: 1px solid var(--border-color); position: sticky; top: 0; z-index: 20; }
.espace-entete-inner {
    max-width: 940px; margin: 0 auto; padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.espace-marque { display: flex; align-items: center; gap: 11px; }
.espace-marque img { width: 40px; height: 40px; object-fit: contain; border-radius: 11px; background: #fff; }
.espace-marque .mark {
    width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px;
}
.espace-marque strong { display: block; font-size: 14px; line-height: 1.2; }
.espace-marque span { font-size: 11.4px; color: var(--text-muted); }

.espace-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.espace-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border-radius: var(--radius-full);
    font-size: 12.8px; font-weight: 600; color: var(--text-muted); transition: var(--transition);
}
.espace-nav a:hover { background: var(--bg-surface-2); color: var(--text-main); }
.espace-nav a.active { background: var(--accent-soft); color: var(--accent); }

.espace-contenu { max-width: 940px; margin: 0 auto; padding: 24px 20px; width: 100%; flex: 1; }
.espace-pied { max-width: 940px; margin: 0 auto; padding: 18px 20px 30px; font-size: 11.4px; color: var(--text-muted); }

.espace-hero {
    background: var(--bg-surface); border-radius: var(--radius-l, 20px); padding: 26px;
    margin-bottom: 16px; box-shadow: var(--shadow-s);
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    border-left: 3px solid var(--accent);
}
.espace-hero h1 { font-size: 24px; margin: 8px 0 4px; }
.espace-hero p { font-size: 12.8px; color: var(--text-muted); margin: 0; }
.espace-compteur {
    display: inline-block; background: var(--accent-soft); color: var(--accent);
    font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-full);
}
.espace-progression { min-width: 190px; }

.demande-piece {
    display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between;
    padding: 13px 0; border-bottom: 1px solid var(--border-color);
}
.demande-piece:last-child { border-bottom: none; }

/* --- Messagerie --- */
.fil-messages { display: flex; flex-direction: column; gap: 10px; }
.message { display: flex; }
.message-moi { justify-content: flex-end; }
.message-bulle { max-width: 78%; padding: 10px 13px; border-radius: 14px; background: var(--bg-surface-2); }
.message-moi .message-bulle { background: var(--accent-soft); }
.message-bulle p { font-size: 12.9px; margin: 0; line-height: 1.5; }
.message-meta { display: block; font-size: 10.6px; color: var(--text-muted); margin-top: 5px; }

/* =====================================================
   SIGNATURE ÉLECTRONIQUE
   ===================================================== */
.signature-page { max-width: 760px; margin: 0 auto; padding: 26px 20px 40px; }
.signature-entete { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.signature-entete h1 { font-size: 22px; margin: 8px 0 3px; }
.signature-entete p { font-size: 12.4px; margin: 0; }

.etape-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent); color: #fff;
    font-size: 12px; font-weight: 700; margin-right: 8px;
}

.visionneuse { width: 100%; height: 440px; border: 1px solid var(--border-color); border-radius: var(--radius-s); background: var(--bg-surface-2); }

.zone-signature { position: relative; border: 2px dashed var(--border-color); border-radius: var(--radius-s); background: #fff; }
.zone-signature canvas { width: 100%; height: auto; display: block; touch-action: none; cursor: crosshair; }
.zone-signature .effacer { position: absolute; top: 8px; right: 8px; }

.alert-success { background: var(--success-soft); color: var(--success); }
