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

:root {
    --bg: #e8e4ef;
    --surface: #ffffff;
    --surface-soft: #fffaf6;
    --text: #1e1b18;
    --muted: #6b625b;
    --line: #e7ded4;
    --brand: #9b8bb0;
    --brand-2: #4a3f5c;
    --brand-soft: #e8e4ef;
    --sage: #6f7d6d;
    --sage-soft: #eef3ee;
    --plum-light: #e8e4ef;
    --plum: #9b8bb0;
    --plum-dark: #4a3f5c;
    --plum-pale: #f2eff7;
    --plum-border: #d8cfe4;
    --plum-border-strong: #c8bad9;
    --plum-shadow: rgba(74, 63, 92, .08);
    --plum-shadow-soft: rgba(74, 63, 92, .05);
    --plum-glow: rgba(155, 139, 176, .16);
    --sand: #f2eff7;
    --danger: #b94141;
    --shadow-soft: 0 18px 48px var(--plum-shadow);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--text);
    background:
    radial-gradient(1200px 600px at 0% -10%, color-mix(in srgb, var(--plum-light) 78%, white) 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--plum-light) 86%, white) 0%, transparent 58%),
    linear-gradient(180deg, color-mix(in srgb, var(--plum-light) 70%, white) 0%, var(--bg) 35%, var(--bg) 100%);
}
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap { gap: .75rem; }
.site-header, .site-footer { background: color-mix(in srgb, var(--surface) 86%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.site-footer { border-top: 1px solid var(--line); border-bottom: 0; padding: 1rem 0; margin-top: 4rem; }
.brand {
    font-weight: 800;
    letter-spacing: .1px;
    text-decoration: none;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}
.brand-icon {
    width: 28px;
    height: 28px;
    border-radius: .45rem;
    object-fit: cover;
    display: block;
}
.nav a, .footer-links a { margin-left: 1rem; color: var(--text); text-decoration: none; }
.nav a:hover, .footer-links a:hover { color: var(--brand-2); }
.content { padding: 2.25rem 1rem; }
.public-layout {
    background:
    radial-gradient(1200px 560px at 0% -10%, color-mix(in srgb, var(--plum-light) 76%, white) 0%, transparent 56%),
    radial-gradient(820px 460px at 100% 0%, color-mix(in srgb, var(--plum-pale) 72%, white) 0%, transparent 52%),
    linear-gradient(180deg, color-mix(in srgb, var(--plum-light) 64%, white) 0%, var(--bg) 30%, color-mix(in srgb, var(--bg) 88%, var(--plum-pale)) 100%);
}
.public-content { padding-top: 2.5rem; }
.public-layout h1,
.public-layout h2,
.public-layout h3 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 600;
    letter-spacing: -.03em;
}
.auth-layout {
    min-height: 100vh;
    background:
    radial-gradient(900px 540px at 0% 0%, color-mix(in srgb, var(--plum-light) 70%, white) 0%, transparent 58%),
    radial-gradient(900px 520px at 100% 10%, color-mix(in srgb, var(--plum-pale) 74%, white) 0%, transparent 55%),
    linear-gradient(180deg, color-mix(in srgb, var(--plum-light) 62%, white) 0%, color-mix(in srgb, var(--bg) 90%, var(--plum-pale)) 100%);
}
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.1fr) minmax(380px, .9fr);
}
.auth-story {
    padding: 3rem clamp(1.2rem, 3vw, 3rem);
    display: grid;
    align-content: space-between;
    gap: 2rem;
    background:
        linear-gradient(160deg, rgba(255,255,255,.52) 0%, rgba(255,255,255,.2) 100%),
        radial-gradient(500px 300px at 85% 10%, rgba(155, 139, 176, .18) 0%, transparent 65%);
    border-right: 1px solid color-mix(in srgb, var(--plum-border) 72%, white);
}
.auth-story-copy {
    max-width: 36rem;
}
.auth-story-copy h1 {
    font-size: clamp(2.2rem, 4vw, 4.2rem);
    line-height: 1.04;
    margin-bottom: 1rem;
}
.auth-story-copy p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 34rem;
}
.auth-story-panel {
    max-width: 32rem;
    padding: 1.25rem 1.25rem 1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(10px);
    box-shadow: 0 16px 40px var(--plum-shadow-soft);
}
.auth-story-panel h2 {
    margin-bottom: .65rem;
}
.auth-check-list {
    margin: 0;
}
.auth-main {
    display: grid;
    align-items: center;
    padding: 2rem clamp(1rem, 3vw, 3rem);
}
.auth-card {
    width: min(100%, 34rem);
    margin: 0 auto;
    background: rgba(255,255,255,.95);
    border: 1px solid color-mix(in srgb, var(--plum-border) 82%, white);
    border-radius: 1.4rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
}
.auth-card > h1 {
    margin-bottom: .4rem;
}
.auth-card .form-card {
    max-width: none;
    margin-top: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
}
.auth-card input,
.auth-card textarea,
.auth-card select {
    min-height: 3rem;
    border-radius: .85rem;
    border-color: #d6c8bb;
    background: #fffdfb;
}
.auth-card input:focus,
.auth-card textarea:focus,
.auth-card select:focus {
    outline: 0;
    border-color: var(--plum);
    box-shadow: 0 0 0 4px var(--plum-glow);
}
.auth-submit {
    width: 100%;
    margin-top: .2rem;
}
.auth-links {
    margin: .9rem 0 0;
}
.auth-links a {
    color: var(--brand-2);
}
.auth-card .flash-stack {
    margin-bottom: .8rem;
}
.site-header-public {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 253, 251, .82);
    border-bottom-color: color-mix(in srgb, var(--plum-border) 78%, white);
}
.public-header-row {
    min-height: 5rem;
    gap: 1rem;
}
.site-footer-public {
    background: rgba(255, 252, 248, .92);
}
.public-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(180px, .8fr));
    gap: 1.5rem;
    align-items: start;
}
.public-footer-brand p {
    color: var(--muted);
    max-width: 28rem;
    margin: .85rem 0 0;
}
.footer-links {
    display: grid;
    gap: .55rem;
    align-content: start;
}
.footer-links a {
    margin-left: 0;
}
.footer-links small {
    color: var(--muted);
    margin-top: .45rem;
}
.hero {
    padding: 2.5rem 0 1.5rem;
    animation: rise .45s ease-out both;
}
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 62ch; line-height: 1.75; }
.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 2rem;
    align-items: center;
}
.hero-copy h1 {
    font-size: clamp(2.8rem, 5vw, 4.9rem);
    line-height: .97;
    margin: .8rem 0 1rem;
    max-width: 12ch;
}
.hero-actions { margin: 1rem 0 1.2rem; flex-wrap: wrap; }
.hero-inline-proof {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    color: var(--muted);
    font-size: .95rem;
}
.hero-inline-proof li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.hero-inline-proof li::before {
    content: "";
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: var(--brand);
    box-shadow: 0 0 0 5px var(--plum-glow);
}
.hero-visual {
    position: relative;
}
.hero-studio-card {
    position: relative;
    padding: 1.25rem;
    border-radius: 1.8rem;
    border: 1px solid color-mix(in srgb, var(--plum-border) 82%, white);
    background:
        linear-gradient(180deg, rgba(255,255,255,.92) 0%, color-mix(in srgb, var(--plum-pale) 55%, white) 100%),
        radial-gradient(420px 240px at 90% 10%, rgba(155, 139, 176, .16) 0%, transparent 65%);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}
.hero-studio-card::after {
    content: "";
    position: absolute;
    inset: auto -10% -16% 35%;
    height: 160px;
    background: radial-gradient(circle, rgba(111, 125, 109, .18) 0%, transparent 70%);
}
.hero-studio-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: rgba(155, 139, 176, .18);
    color: var(--brand-2);
    font-size: .82rem;
    font-weight: 700;
}
.hero-chip-soft {
    background: rgba(111, 125, 109, .12);
    color: #4f5d4c;
}
.hero-dashboard-preview {
    display: grid;
    gap: 1rem;
}
.hero-preview-panel,
.hero-mini-card {
    position: relative;
    z-index: 1;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, .88);
    border: 1px solid color-mix(in srgb, var(--plum-border) 82%, white);
    padding: 1rem;
}
.hero-preview-panel h2 {
    font-size: 1.65rem;
    margin: .2rem 0 .5rem;
}
.hero-label,
.card-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .74rem;
    color: var(--muted);
    font-weight: 800;
    margin: 0;
}
.hero-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    margin-top: 1rem;
}
.hero-metric {
    font-weight: 700;
    color: #384235;
}
.hero-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}
.hero-mini-card {
    display: grid;
    gap: .35rem;
}
.hero-mini-card strong {
    font-size: 1.5rem;
    font-family: "Fraunces", Georgia, serif;
}
.hero-mini-card span {
    color: var(--muted);
    line-height: 1.6;
}
.hero-mini-card-accent {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(111, 125, 109, .12) 0%, rgba(255,255,255,.92) 100%);
}
.eyebrow {
    display: inline-block;
    padding: .42rem .72rem;
    border: 1px solid var(--plum-border-strong);
    color: var(--brand-2);
    border-radius: 999px;
    font-size: .8rem;
    background: rgba(255, 250, 246, .9);
}

.section { margin-top: 1.6rem; padding: 1.5rem 0; }
.section-tight { padding-top: .5rem; }
.section.alt { background: color-mix(in srgb, var(--plum-pale) 52%, white); border: 1px solid var(--plum-border); border-radius: 1.6rem; padding: 1.4rem; }
.section-hero-compact { padding-top: .75rem; }
.section-showcase { overflow: hidden; }
.section-heading {
    display: grid;
    gap: .55rem;
    margin-bottom: 1.35rem;
}
.section-heading h1,
.section-heading h2 {
    margin-bottom: 0;
}
.section-heading p {
    color: var(--muted);
    line-height: 1.75;
    max-width: 48rem;
    margin: 0;
}
.section-heading-centered {
    text-align: center;
    justify-items: center;
}
.narrow-copy p {
    max-width: 42rem;
}
.cta-final {
    text-align: center;
    background: linear-gradient(180deg, color-mix(in srgb, var(--plum-light) 65%, white) 0%, color-mix(in srgb, var(--plum-light) 82%, white) 100%);
    border: 1px solid var(--plum-border-strong);
    border-radius: 1.8rem;
    padding: 1.9rem 1.4rem;
    box-shadow: 0 14px 36px var(--plum-shadow-soft);
}

h1, h2, h3 { margin-top: 0; }
.btn {
    display: inline-block;
    padding: .82rem 1.18rem;
    border-radius: .9rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(74, 63, 92, .2);
}
.btn:hover {
    transform: translateY(-1px);
}
.btn-secondary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--plum-dark) 88%, black) 0%, var(--plum-dark) 100%);
    box-shadow: 0 12px 24px rgba(74, 63, 92, .16);
}
.btn-danger { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); }
.card {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 1.2rem;
    padding: 1.1rem;
    box-shadow: 0 10px 24px rgba(74, 63, 92, .04);
}
.featured { border-color: var(--brand); box-shadow: 0 20px 38px rgba(74, 63, 92, .14); }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.price { font-size: 1.5rem; font-weight: 700; color: var(--brand-2); }
.muted { color: var(--muted); }
.pill { display: inline-block; font-size: .75rem; border-radius: 999px; padding: .28rem .56rem; background: var(--plum-pale); color: var(--brand-2); border: 1px solid var(--plum-border); }
.plan-list, .check-list { margin: .75rem 0 0; padding-left: 1.1rem; }
.plan-list li, .check-list li { margin-bottom: .55rem; line-height: 1.7; }
.check-list-soft {
    padding-left: 1.2rem;
}
.pricing-card { display: grid; align-content: start; gap: .45rem; padding: 1.35rem; }
.pricing-grid { align-items: stretch; }

.info-card,
.product-story-card,
.cta-side-card,
.feature-story-card,
.benefit-card {
    display: grid;
    align-content: start;
    gap: .55rem;
}
.info-card-accent,
.feature-story-card-accent,
.cta-side-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--plum-pale) 58%, white) 0%, #ffffff 100%);
}
.feature-grid .card,
.benefit-strip .card,
.feature-story-grid .card {
    min-height: 100%;
}
.product-preview-grid {
    align-items: stretch;
}
.product-preview-card {
    padding: 1.2rem;
    background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--plum-pale) 52%, white) 100%);
}
.product-story-card {
    padding: 1.35rem;
}
.cta-side-card {
    padding: 1.35rem;
    border-color: var(--plum-border);
}
.benefit-strip {
    margin-top: .6rem;
}
.benefit-card strong {
    font-size: 1.05rem;
}
.benefit-card p,
.info-card p,
.feature-story-card p,
.cta-side-card p,
.product-story-card p {
    color: var(--muted);
}
.mini-mock-line,
.inline-note {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .75rem .85rem;
    border-radius: .95rem;
    border: 1px solid color-mix(in srgb, var(--plum-border) 70%, white);
    background: color-mix(in srgb, var(--plum-pale) 60%, white);
    color: var(--muted);
}
.mini-mock-line strong {
    color: var(--text);
}
.inline-note {
    margin-top: .6rem;
    justify-content: flex-start;
}

.mock-screen { max-width: 640px; margin: 0 auto; }
.mock-row { display: flex; justify-content: space-between; padding: .75rem 0; border-bottom: 1px dashed var(--plum-border-strong); gap: 1rem; }
.mock-row.total { font-weight: 800; border-bottom: 0; }
.badge { background: var(--plum-light); color: var(--plum-dark); border: 1px solid color-mix(in srgb, var(--plum) 50%, white); border-radius: 999px; padding: .12rem .55rem; font-size: .85rem; }
.badge-warm { background: color-mix(in srgb, var(--plum-light) 72%, white); color: var(--plum-dark); border-color: var(--plum-border); }

.reveal { animation: rise .5s ease-out both; }
.stagger:nth-child(2) { animation-delay: 70ms; }
.stagger:nth-child(3) { animation-delay: 120ms; }

@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.form-card {
    max-width: 520px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 1rem;
    padding: 1rem;
    display: grid;
    gap: .75rem;
}
label { display: grid; gap: .35rem; font-weight: 600; }
input, textarea, select {
    width: 100%;
    padding: .6rem .7rem;
    border: 1px solid #cbbfb4;
    border-radius: .5rem;
    font: inherit;
    background: #fff;
}
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.table th, .table td { padding: .65rem; border-bottom: 1px solid var(--line); text-align: left; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flash-stack { margin-bottom: 1rem; display: grid; gap: .5rem; }
.flash { border-radius: .5rem; padding: .65rem .8rem; border: 1px solid transparent; }
.flash-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash-error { background: #fef2f2; color: #7f1d1d; border-color: #fecaca; }
.hidden { display: none !important; }

.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
    border-right: 1px solid var(--line);
    background: #fff;
    padding: 1rem;
    display: grid;
    gap: 1rem;
    align-content: start;
}
.nav-column { display: grid; gap: .35rem; }
.nav-column a { color: var(--text); text-decoration: none; padding: .45rem .5rem; border-radius: .4rem; }
.nav-column a:hover { background: #f3f4f6; }
.app-main { padding: 1.25rem; }
.dashboard-head { margin-bottom: .8rem; flex-wrap: wrap; gap: .8rem; }
.dashboard-kpis .stat-card p { margin: .35rem 0 0; font-size: 1.8rem; font-weight: 800; color: var(--brand-2); }
.dashboard-panels { margin-top: .7rem; }
.dashboard-help { margin-top: .9rem; background: #f5fbf9; border-color: #cfeae1; }
.clients-head { margin-bottom: .8rem; flex-wrap: wrap; }
.clients-search { display: flex; gap: .5rem; align-items: center; }
.clients-search input { min-width: 320px; }
.clients-search select { width: auto; min-width: 180px; }
.clients-card { margin-bottom: .9rem; }
.clients-history { margin-top: .3rem; }
.delete-form { margin-top: 1rem; max-width: 520px; }

@media (max-width: 900px) {
    .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
    .hero-split { grid-template-columns: 1fr; }
    .hero-copy h1 { max-width: none; }
    .hero-preview-grid { grid-template-columns: 1fr; }
    .public-footer-grid { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-story { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
    .auth-story-panel { max-width: none; }
    .auth-main { padding-top: 1.5rem; }
    .auth-card { width: 100%; }
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
    .nav { display: none; }
    .clients-search { width: 100%; }
    .clients-search input { min-width: 0; }
    .project-body { grid-template-columns: 1fr; }
    .project-dates-strip { gap: 1rem; }
    .project-title-row { flex-direction: column; align-items: flex-start; }
    .project-actions { width: 100%; }
}

@media (max-width: 600px) {
    .app-main { padding: .85rem; min-width: 0; }
    .app-main h1 { font-size: 1.65rem; line-height: 1.15; }
    .sidebar { gap: .35rem; }
    .sidebar-brand { padding: .8rem .85rem; }
    .nav-column { display: flex; flex-direction: row; overflow-x: auto; padding: .55rem .65rem .35rem; gap: .35rem; }
    .nav-col-link { white-space: nowrap; font-size: .86rem; padding: .45rem .6rem; }
    .sidebar-search { margin: 0 .7rem; }
    .sidebar-utils { display: flex; flex-wrap: wrap; gap: .2rem; padding: 0 .65rem; }
    .sidebar-logout { padding: .35rem .7rem .7rem; }
    .clients-head, .dashboard-head { align-items: stretch; }
    .clients-head > .btn, .dashboard-head .btn { width: 100%; text-align: center; }
    .clients-search { flex-direction: column; align-items: stretch; gap: .45rem; }
    .clients-search input, .clients-search button { width: 100%; min-width: 0; }
    .form-card { padding: .8rem; }
    .form-card .btn, .auth-submit { width: 100%; }
    .table-wrap { margin-inline: -.15rem; width: calc(100% + .3rem); }
    .table { min-width: 620px; }
    .row.gap { gap: .55rem; }
    .project-dates-strip, .project-actions { flex-wrap: wrap; }
    input, textarea, select { font-size: 16px; }
}

/* ── Sidebar améliorée ──────────────────────────────────── */
.sidebar {
    background: var(--surface);
    padding: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 1.25rem 1.1rem 1.1rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.nav-column {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .85rem .7rem .4rem;
    flex-shrink: 0;
}
.nav-col-link {
    color: var(--text);
    text-decoration: none;
    padding: .52rem .7rem;
    border-radius: .65rem;
    font-size: .93rem;
    font-weight: 500;
    display: block;
    transition: background .12s, color .12s;
}
.nav-col-link:hover { background: var(--sand); color: var(--brand-2); }
.nav-active {
    background: var(--brand-soft) !important;
    color: var(--brand-2) !important;
    font-weight: 700;
}
.nav-col-link-sm {
    font-size: .87rem;
    padding: .4rem .7rem;
    color: var(--muted);
}
.sidebar-utils {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    padding: .45rem .7rem .35rem;
    border-top: 1px solid var(--line);
    margin-top: .35rem;
    flex-shrink: 0;
}
.sidebar-logout {
    margin-top: auto;
    padding: .85rem .7rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff7f5 100%);
    flex-shrink: 0;
}
.logout-btn {
    width: 100%;
    background: #fff1ee;
    border: 1px solid #f1b8ad;
    border-radius: .65rem;
    padding: .55rem .75rem;
    color: #9f2d1f;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    font-size: .88rem;
    box-shadow: 0 1px 0 rgba(159, 45, 31, .06);
    transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
}
.logout-btn:hover {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: #ef9a93;
    box-shadow: 0 3px 12px rgba(127, 29, 29, .12);
}

.sidebar-search {
    display: grid;
    gap: .45rem;
    padding: .75rem .7rem .55rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-top: .25rem;
}
.sidebar-search-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-weight: 800;
}
.sidebar-search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .45rem;
}
.sidebar-search-input {
    min-width: 0;
    border-radius: .6rem;
    border-color: var(--line);
    padding: .5rem .6rem;
    font-size: .86rem;
}
.sidebar-search-btn {
    border: 1px solid var(--line);
    border-radius: .6rem;
    background: #fff;
    color: var(--muted);
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    padding: .45rem .62rem;
    cursor: pointer;
}
.sidebar-search-btn:hover { background: var(--sand); color: var(--brand-2); }

/* ── KPI dashboard ──────────────────────────────────────── */
.kpi-card {
    padding: 1.2rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.kpi-card h2 {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-weight: 800;
    font-family: "Manrope", "Segoe UI", sans-serif;
    margin: 0;
}
.kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: "Fraunces", Georgia, serif;
    color: var(--text);
    line-height: 1;
    margin: 0;
}
.kpi-card-accent .kpi-value { color: var(--brand-2); }

.action-card {
    padding: 1.15rem;
    display: grid;
    gap: .6rem;
    align-content: start;
}
.action-card h2 {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-weight: 800;
    margin: 0;
}
.action-card p { margin: 0; line-height: 1.65; }

/* ── Recherche app ─────────────────────────────────────── */
.search-hero {
    padding: 1rem;
    margin-bottom: 1rem;
    display: grid;
    gap: .75rem;
}
.search-hero h1 { margin: 0; }
.search-hero-head {
    display: flex;
    gap: .75rem;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
}
.search-chips {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}
.search-chips a {
    text-decoration: none;
    color: var(--brand-2);
    background: var(--brand-soft);
    border: 1px solid var(--plum-border);
    border-radius: 999px;
    padding: .2rem .6rem;
    font-size: .82rem;
}
.search-results-count {
    margin: .2rem 0 .8rem;
    color: var(--muted);
}
.search-empty {
    padding: 1.1rem;
    margin-bottom: 1rem;
    display: grid;
    gap: .55rem;
}
.search-empty h2 { margin: 0; }
.search-empty-links {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.search-section {
    margin-bottom: 1rem;
    padding: 1rem;
}
.search-section h2 { margin: 0 0 .8rem; }

.pricing-fieldset {
    border: 1px solid var(--line);
    border-radius: .5rem;
    padding: 1rem;
}
.pricing-toggle {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 400;
}
.pricing-toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

/* ── Compte app ────────────────────────────────────────── */
.account-subscription {
    margin-bottom: 1rem;
    max-width: 640px;
    padding: 1rem;
}
.account-subscription h2 { margin: 0 0 .35rem; }
.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 1rem;
    align-items: start;
}
.account-panel {
    padding: 1rem;
    display: grid;
    gap: .7rem;
}
.account-panel h2 { margin: 0; }
.account-form {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

/* ── Badges statut ──────────────────────────────────────── */
.badge-pending    { background: color-mix(in srgb, var(--plum-light) 68%, white); color: var(--plum-dark); border-color: var(--plum-border); }
.badge-in-progress { background: color-mix(in srgb, var(--plum-light) 80%, white); color: var(--brand-2); border-color: var(--plum-border-strong); }
.badge-ready      { background: var(--sage-soft); color: #3a5738; border-color: #b4d4b2; }
.badge-delivered  { background: #eef3ef; color: #2b5930; border-color: #b4d5ba; }
.badge-cancelled  { background: #f3f4f6; color: #6b7280; border-color: #d1d5db; }
.badge-draft      { background: var(--plum-light); color: var(--plum-dark); border-color: color-mix(in srgb, var(--plum) 52%, white); }

/* ── Page signature projet ──────────────────────────────── */
.project-header { margin-bottom: 1.5rem; }
.project-title-row {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    flex-wrap: wrap;
    margin-bottom: .85rem;
}
.project-title-row h1 { flex: 1; min-width: 0; margin: 0; line-height: 1.1; }
.project-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.project-dates-strip {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: .75rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    box-shadow: 0 4px 10px rgba(74, 63, 92, .06);
}
.project-date-cell { display: grid; gap: .15rem; }
.project-date-cell small {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-weight: 800;
}
.project-date-cell strong { font-size: .97rem; font-weight: 600; }
.project-body {
    display: grid;
    grid-template-columns: 1fr minmax(220px, 300px);
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: start;
}
.project-meta-card { padding: 1.25rem; display: grid; gap: .75rem; align-content: start; }
.project-meta-row { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; }
.project-meta-row small {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 600;
    min-width: 6.5rem;
    flex-shrink: 0;
}
.project-meta-row a { color: var(--brand-2); text-decoration: none; }
.project-sep { border: 0; border-top: 1px solid var(--line); margin: .1rem 0; }
.project-status-inline {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: .25rem;
    padding-top: .75rem;
    border-top: 1px solid var(--line);
}
.project-status-inline > small { color: var(--muted); font-size: .84rem; font-weight: 600; white-space: nowrap; }
.project-profit-card {
    padding: 1.25rem;
    background: linear-gradient(175deg, #ffffff 0%, color-mix(in srgb, var(--plum-pale) 62%, white) 100%);
    border-color: var(--plum-border);
    display: grid;
    gap: .55rem;
    align-content: start;
}
.profit-heading {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    font-weight: 800;
    margin: 0 0 .3rem;
}
.profit-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--plum-border) 76%, white);
    font-size: .93rem;
    flex-wrap: wrap;
}
.profit-row:last-child { border-bottom: 0; font-weight: 800; font-size: 1.05rem; padding-top: .65rem; }
.profit-row-negative { color: var(--danger); }

.project-section { margin-bottom: 1rem; }
.project-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem 1.1rem .75rem;
    border-bottom: 1px solid var(--line);
}
.project-sec-head h2 { font-size: 1.05rem; margin: 0; }
.project-sec-body { padding: 1.1rem; }

/* ── Photo grid app ─────────────────────────────────────── */
.app-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: .85rem;
    margin-bottom: 1rem;
}
.app-photo-item { border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--surface); }
.app-photo-item img { width: 100%; height: 145px; object-fit: cover; display: block; }
.app-photo-meta { padding: .45rem .6rem; display: flex; justify-content: space-between; align-items: center; gap: .3rem; }
.app-photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .77rem; color: var(--muted); min-width: 0; flex: 1; }

/* ── Details/summary reset ──────────────────────────────── */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* ── Admin app ──────────────────────────────────────────── */
.admin-layout {
    background: color-mix(in srgb, var(--bg) 88%, var(--plum-light));
}
.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}
.admin-sidebar {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    padding: 1rem .85rem;
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.admin-nav {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.admin-link {
    color: #1f2937;
    text-decoration: none;
    font-size: .9rem;
    border-radius: .55rem;
    padding: .45rem .6rem;
}
.admin-link:hover {
    background: var(--plum-light);
}
.admin-link-active {
    background: var(--plum-light);
    color: var(--plum-dark);
    font-weight: 700;
}
.admin-sidebar-foot {
    margin-top: auto;
    border-top: 1px solid #e5e7eb;
    padding-top: .7rem;
}
.admin-main {
    padding: 1.15rem;
}
.admin-kpis .kpi-value {
    font-size: 2rem;
}
.admin-section {
    padding: 1rem;
}
.admin-filters select {
    width: auto;
}

@media (max-width: 900px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid #e5e7eb;
    }
}

@media (max-width: 900px) {
    .account-grid { grid-template-columns: 1fr; }
    .search-hero-head { align-items: flex-start; }
}
