/* ======================================================================
   Suivi de projet — 3m promotion
   Design system. Bleu marque #0188CC · gris #656565.
   Display: Space Grotesk · Texte: Manrope.
   ====================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --blue:        #0188CC;
    --blue-600:    #0173ad;
    --blue-700:    #015d8c;
    --blue-tint:   #e8f5fc;
    --blue-tint-2: #f3fafe;
    --gray:        #656565;
    --ink:         #14222e;
    --ink-soft:    #43525d;
    --line:        #e4ebf0;
    --line-soft:   #eef3f6;
    --bg:          #f5f8fb;
    --card:        #ffffff;
    --ok:          #1f9d6b;
    --ok-tint:     #e7f6ef;
    --warn:        #d98324;
    --warn-tint:   #fdf2e3;
    --danger:      #d24b4b;
    --danger-tint: #fbecec;

    --r-sm: 9px;
    --r:    14px;
    --r-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(20,34,46,.05), 0 2px 6px rgba(20,34,46,.04);
    --shadow:    0 6px 18px rgba(20,34,46,.07), 0 2px 6px rgba(20,34,46,.05);
    --shadow-lg: 0 24px 60px rgba(1,93,140,.14), 0 8px 22px rgba(20,34,46,.08);

    --display: 'Space Grotesk', system-ui, sans-serif;
    --body: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.01em; }
a { color: var(--blue-600); }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; background: var(--blue-tint); padding: 1px 6px; border-radius: 6px; font-size: .88em; }

/* ---------- Boutons --------------------------------------------------- */
.btn {
    --bg: var(--blue);
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--body); font-weight: 700; font-size: .94rem;
    padding: 11px 20px; border: 0; border-radius: 999px;
    background: var(--bg); color: #fff; cursor: pointer; text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    box-shadow: 0 6px 16px rgba(1,136,204,.22);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(1,136,204,.28); }
.btn:active { transform: translateY(0); }
.btn-primary { --bg: linear-gradient(135deg, #06a0e4, var(--blue-600)); }
.btn-block { width: 100%; }
.btn-ghost {
    background: transparent; color: var(--blue-700); box-shadow: none;
    border: 1.5px solid var(--line);
}
.btn-ghost:hover { background: var(--blue-tint-2); border-color: var(--blue); box-shadow: none; }
.btn-danger { background: var(--danger); box-shadow: 0 6px 16px rgba(210,75,75,.2); }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible, [contenteditable]:focus-visible {
    outline: 3px solid rgba(1,136,204,.4); outline-offset: 2px;
}

/* ---------- Alertes --------------------------------------------------- */
.alert { padding: 13px 16px; border-radius: var(--r-sm); font-weight: 600; font-size: .92rem; margin-bottom: 16px; }
.alert-error { background: var(--danger-tint); color: #9a2f2f; }
.alert-ok    { background: var(--ok-tint); color: #14704c; }
.alert-info  { background: var(--blue-tint); color: var(--blue-700); }

/* ======================================================================
   Authentification
   ====================================================================== */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.auth-bg {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(900px 520px at 12% -10%, rgba(1,136,204,.16), transparent 60%),
        radial-gradient(720px 480px at 110% 120%, rgba(6,160,228,.14), transparent 55%),
        linear-gradient(180deg, #eef5fa, #f5f8fb);
}
.auth-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 420px;
    background: var(--card); border-radius: var(--r-lg);
    padding: 38px 34px; box-shadow: var(--shadow-lg);
    border: 1px solid #fff;
    animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
}
.auth-logo { height: 38px; margin-bottom: 24px; }
.auth-eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 800; color: var(--blue); margin: 0 0 4px; }
.auth-title { font-size: 1.7rem; margin-bottom: 8px; }
.auth-sub { color: var(--ink-soft); font-size: .95rem; margin: 0 0 22px; }
.auth-form { display: grid; gap: 14px; }
.auth-foot { margin: 22px 0 0; font-size: .8rem; color: var(--gray); text-align: center; }
.field { display: grid; gap: 6px; }
.field-label { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.field input, .field select, .field textarea {
    font-family: var(--body); font-size: .98rem; color: var(--ink);
    padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
    background: #fbfdfe; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--blue); box-shadow: 0 0 0 4px rgba(1,136,204,.12); outline: none; background: #fff;
}
.install-steps { padding-left: 18px; color: var(--ink-soft); line-height: 1.8; }
.install-steps li { margin-bottom: 4px; }
.hint { font-size: .82rem; color: var(--gray); }

/* ======================================================================
   Coque applicative
   ====================================================================== */
.topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(255,255,255,.82); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    max-width: 1140px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; gap: 18px;
}
.topbar .logo { height: 30px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: .86rem; color: var(--ink-soft); font-weight: 600; }
.topbar .who strong { color: var(--ink); }
.badge-admin {
    font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
    background: var(--ink); color: #fff; padding: 4px 9px; border-radius: 999px;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 28px 24px 80px; }

/* ---------- En-tête projet (hero) ------------------------------------ */
.hero {
    background: linear-gradient(135deg, #0a96d8 0%, var(--blue-600) 60%, var(--blue-700) 100%);
    color: #fff; border-radius: var(--r-lg); padding: 30px 34px; position: relative; overflow: hidden;
    box-shadow: var(--shadow);
    display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,.16), transparent 60%); pointer-events: none;
}
/* fines lignes "plan d'architecte" en fond */
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .12;
    background-image: linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: linear-gradient(120deg, #000, transparent 70%);
            mask-image: linear-gradient(120deg, #000, transparent 70%);
}
.hero-meta { position: relative; z-index: 1; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 800; opacity: .85; }
.hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 6px 0 14px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.fact { display: flex; flex-direction: column; }
.fact .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; font-weight: 700; }
.fact .v { font-family: var(--display); font-weight: 600; font-size: 1.02rem; }

/* ---------- Anneau de progression ------------------------------------ */
.ring-wrap { position: relative; z-index: 1; display: grid; place-items: center; }
.ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring .track { fill: none; stroke: rgba(255,255,255,.25); stroke-width: 12; }
.ring .prog  { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round;
    stroke-dasharray: var(--circ); stroke-dashoffset: var(--circ);
    transition: stroke-dashoffset 1.4s cubic-bezier(.2,.7,.2,1); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-pct { font-family: var(--display); font-weight: 700; font-size: 2.1rem; line-height: 1; }
.ring-cap { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; opacity: .85; font-weight: 700; }

/* ---------- Bandeau de validation ------------------------------------ */
.review-banner {
    margin-top: 22px; display: flex; align-items: center; gap: 14px;
    background: var(--ok-tint); border: 1px solid #cdeede; color: #14704c;
    border-radius: var(--r); padding: 16px 20px; font-weight: 600;
    animation: rise .5s ease both;
}
.review-banner .ico { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
    background: var(--ok); color: #fff; display: grid; place-items: center; font-weight: 800; }

/* ---------- Disposition deux colonnes -------------------------------- */
.cols { display: grid; grid-template-columns: 1fr 360px; gap: 26px; margin-top: 26px; align-items: start; }
.section-title { font-size: 1.18rem; margin-bottom: 4px; }
.section-sub { color: var(--gray); font-size: .9rem; margin: 0 0 18px; }

/* ======================================================================
   Frise des phases (signature)
   ====================================================================== */
.timeline { position: relative; display: grid; gap: 16px; }
.tl-item {
    position: relative; padding-left: 56px;
}
/* ligne verticale */
.tl-item::before {
    content: ""; position: absolute; left: 19px; top: 38px; bottom: -16px; width: 2px;
    background: var(--line);
}
.tl-item:last-child::before { display: none; }
.tl-item.completed::before { background: var(--blue); }
.tl-node {
    position: absolute; left: 0; top: 4px; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; font-family: var(--display); font-weight: 700;
    background: #fff; border: 2px solid var(--line); color: var(--gray); z-index: 1;
    transition: all .25s ease;
}
.tl-item.completed .tl-node { background: var(--blue); border-color: var(--blue); color: #fff; }
.tl-item.active .tl-node {
    border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 6px rgba(1,136,204,.14);
    animation: pulse 2.4s ease-in-out infinite;
}
.phase-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s, border-color .2s;
}
.tl-item.active .phase-card { border-color: rgba(1,136,204,.4); box-shadow: var(--shadow); }
.tl-item.upcoming .phase-card { opacity: .82; }
.phase-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; user-select: none; }
.phase-head .ph-titles { flex: 1; min-width: 0; }
.phase-head h3 { font-size: 1.05rem; }
.phase-head .ph-desc { color: var(--ink-soft); font-size: .88rem; margin-top: 3px; }
.status-pill { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.status-pill.completed { background: var(--blue-tint); color: var(--blue-700); }
.status-pill.active { background: var(--warn-tint); color: var(--warn); }
.status-pill.available { background: var(--ok-tint); color: var(--ok); }
.status-pill.upcoming { background: var(--line-soft); color: var(--gray); }
.phase-pct { font-family: var(--display); font-weight: 700; color: var(--blue-700); font-size: .95rem; }
.chev { transition: transform .25s ease; color: var(--gray); }
.phase-body { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease; }
.phase-card.open .phase-body { max-height: 1400px; padding: 4px 18px 20px; }
.phase-card.open .chev { transform: rotate(180deg); }

.minibar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; margin: 0 18px 14px; }
.minibar > i { display: block; height: 100%; background: linear-gradient(90deg, #06a0e4, var(--blue-600)); border-radius: 999px; width: 0; transition: width 1s cubic-bezier(.2,.7,.2,1); }

/* ---------- Listes d'actions ----------------------------------------- */
.act-group { margin-top: 10px; }
.act-group h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gray); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.act-group h4 .dot { width: 8px; height: 8px; border-radius: 50%; }
.act-group.promo h4 .dot { background: var(--gray); }
.act-group.client h4 .dot { background: var(--blue); }

.task { display: flex; align-items: flex-start; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); transition: background .15s; }
.task + .task { border-top: 1px solid var(--line-soft); }
.task.editable { cursor: pointer; }
.task.editable:hover { background: var(--blue-tint-2); }
.task .box {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line);
    display: grid; place-items: center; background: #fff; transition: all .18s ease; margin-top: 1px;
}
.task .box svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3.4; fill: none; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .25s ease .03s; }
.task.done .box { background: var(--blue); border-color: var(--blue); }
.task.done.promo .box { background: var(--gray); border-color: var(--gray); }
.task.done .box svg { stroke-dashoffset: 0; }
.task .lbl { font-size: .93rem; color: var(--ink); }
.task.done .lbl { color: var(--gray); text-decoration: line-through; text-decoration-color: rgba(101,101,101,.5); }
.task .ro { font-size: .7rem; color: var(--gray); margin-left: auto; white-space: nowrap; align-self: center; }

/* ======================================================================
   Aside : documents + messagerie
   ====================================================================== */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 20px; margin-bottom: 22px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 4px; display: flex; align-items: center; gap: 9px; }
.panel .panel-sub { color: var(--gray); font-size: .82rem; margin: 0 0 16px; }

.doc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.doc:first-of-type { border-top: 0; }
.doc .ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--blue-tint); color: var(--blue-700); display: grid; place-items: center; font-weight: 800; font-size: .72rem; font-family: var(--display); }
.doc .meta { flex: 1; min-width: 0; }
.doc .meta .n { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc .meta .s { font-size: .76rem; color: var(--gray); }
.doc a.dl { color: var(--blue-600); font-weight: 700; font-size: .82rem; text-decoration: none; white-space: nowrap; }
.empty { color: var(--gray); font-size: .88rem; padding: 8px 0; }

.uploader { margin-top: 14px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); padding: 14px; text-align: center; transition: border-color .2s, background .2s; }
.uploader.drag { border-color: var(--blue); background: var(--blue-tint-2); }
.uploader label { font-weight: 700; color: var(--blue-700); cursor: pointer; font-size: .9rem; }
.uploader .small { font-size: .74rem; color: var(--gray); margin-top: 4px; }

/* ---------- Messagerie ------------------------------------------------ */
.thread { display: grid; gap: 12px; max-height: 380px; overflow-y: auto; padding-right: 4px; margin-bottom: 14px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: .9rem; line-height: 1.5; box-shadow: var(--shadow-sm); }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg .when { display: block; font-size: .68rem; opacity: .7; margin-top: 6px; font-weight: 600; }
.msg.promo { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.promo .from { font-size: .68rem; font-weight: 800; color: var(--blue-700); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 3px; }
.msg.client { background: linear-gradient(135deg, #06a0e4, var(--blue-600)); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg.client .when { opacity: .85; }

.rt-toolbar { display: flex; gap: 4px; margin-bottom: 6px; }
.rt-toolbar button { width: 32px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; font-weight: 800; font-size: .85rem; color: var(--ink-soft); }
.rt-toolbar button:hover { background: var(--blue-tint-2); border-color: var(--blue); }
.editor {
    min-height: 76px; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px;
    background: #fbfdfe; font-size: .92rem; outline: none;
}
.editor:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(1,136,204,.12); background: #fff; }
.editor:empty::before { content: attr(data-ph); color: var(--gray); }

/* ======================================================================
   Admin
   ====================================================================== */
.admin-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.admin-head h1 { font-size: 1.5rem; }
.admin-head .spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--display); font-weight: 700; font-size: 1.9rem; color: var(--blue-700); line-height: 1; }
.stat .l { font-size: .78rem; color: var(--gray); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-top: 6px; }

.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
table.grid { width: 100%; border-collapse: collapse; }
table.grid th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gray); padding: 13px 18px; border-bottom: 1px solid var(--line); background: var(--blue-tint-2); }
table.grid td { padding: 13px 18px; border-bottom: 1px solid var(--line-soft); font-size: .92rem; vertical-align: middle; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tr:hover td { background: var(--blue-tint-2); }
.tag { font-family: var(--display); font-weight: 600; background: var(--blue-tint); color: var(--blue-700); padding: 3px 9px; border-radius: 7px; font-size: .85rem; }
.pbar { width: 120px; height: 8px; background: var(--line-soft); border-radius: 999px; overflow: hidden; display: inline-block; vertical-align: middle; }
.pbar > i { display: block; height: 100%; background: linear-gradient(90deg, #06a0e4, var(--blue-600)); }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* modale */
.modal-back { position: fixed; inset: 0; background: rgba(20,34,46,.45); backdrop-filter: blur(3px); z-index: 50; display: none; place-items: center; padding: 20px; }
.modal-back.show { display: grid; animation: fade .2s ease; }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 540px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; animation: rise .35s cubic-bezier(.2,.7,.2,1) both; }
.modal header { padding: 22px 26px 0; }
.modal header h3 { font-size: 1.25rem; }
.modal .body { padding: 18px 26px 26px; display: grid; gap: 14px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; }

.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 22px; }
.phase-admin { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 12px; }
.phase-admin.is-current { border-color: var(--blue); background: var(--blue-tint-2); }
.phase-admin .pa-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.phase-admin .pa-head .pos { font-family: var(--display); font-weight: 700; color: var(--gray); }
.phase-admin .pa-head h4 { flex: 1; font-size: 1rem; }
.adm-task { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: .9rem; }
.adm-task .side { font-size: .66rem; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; letter-spacing: .05em; }
.adm-task .side.client { background: var(--blue-tint); color: var(--blue-700); }
.adm-task .side.promo { background: var(--line-soft); color: var(--gray); }
.adm-task .lbl { flex: 1; }
.adm-task.done .lbl { text-decoration: line-through; color: var(--gray); }
.link-del { color: var(--danger); font-size: .8rem; text-decoration: none; font-weight: 700; cursor: pointer; background: none; border: 0; }
.inline-add { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.inline-add input, .inline-add select { padding: 8px 11px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-family: var(--body); font-size: .88rem; }
.inline-add input { flex: 1; min-width: 160px; }

.cred-box { background: var(--warn-tint); border: 1px solid #f0dcc0; border-radius: var(--r-sm); padding: 14px 16px; font-size: .9rem; }
.cred-box code { background: #fff; }

.back-link { color: var(--gray); text-decoration: none; font-weight: 700; font-size: .88rem; display: inline-flex; align-items: center; gap: 6px; }
.back-link:hover { color: var(--blue-700); }

/* ======================================================================
   Animations
   ====================================================================== */
@keyframes rise  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 6px rgba(1,136,204,.14); } 50% { box-shadow: 0 0 0 11px rgba(1,136,204,.04); } }
.reveal { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.reveal-2 { animation-delay: .08s; }
.reveal-3 { animation-delay: .16s; }

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 920px) {
    .cols { grid-template-columns: 1fr; }
    .hero { grid-template-columns: 1fr; text-align: left; }
    .ring-wrap { justify-self: start; }
}
@media (max-width: 560px) {
    .wrap { padding: 18px 16px 64px; }
    .hero { padding: 24px 20px; }
    .topbar-inner { padding: 12px 16px; }
    .ring { width: 124px; height: 124px; }
    .tl-item { padding-left: 48px; }
    .tl-node { width: 34px; height: 34px; }
    .tl-item::before { left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .ring .prog { transition: none; }
}

/* ======================================================================
   SITE PUBLIC 3M-Promotion  (ajouts)
   ====================================================================== */
.site { background:#fff; }
.container { max-width:1180px; margin:0 auto; padding:0 24px; }
.container.narrow { max-width:820px; }
.eyebrow { text-transform:uppercase; letter-spacing:.16em; font-size:.74rem; font-weight:800; color:var(--blue); display:inline-block; margin-bottom:10px; }
.eyebrow.light { color:rgba(255,255,255,.85); }
.lead { font-size:1.08rem; color:var(--ink-soft); }
.section { padding:88px 0; }
.section-tint { background:var(--blue-tint-2); }
.sec-head { max-width:680px; margin:0 auto 44px; text-align:center; }
.sec-head h2 { font-size:clamp(1.7rem,3.4vw,2.4rem); }
.sec-head .lead { margin-top:12px; }

/* --- Nav --- */
.nav { position:fixed; top:0; left:0; right:0; z-index:40; transition:background .3s, box-shadow .3s, border-color .3s; border-bottom:1px solid transparent; }
.nav-inner { max-width:1180px; margin:0 auto; padding:16px 24px; display:flex; align-items:center; gap:20px; }
.nav-logo img { height:30px; display:block; transition:filter .3s; }
.nav-links { margin-left:auto; display:flex; align-items:center; gap:26px; }
.nav-links a { text-decoration:none; font-weight:600; font-size:.95rem; color:var(--ink); transition:color .2s; }
.nav-links a:hover, .nav-links a.active { color:var(--blue); }
.nav-cta { background:var(--blue); color:#fff !important; padding:9px 18px; border-radius:999px; box-shadow:0 6px 16px rgba(1,136,204,.25); }
.nav-cta:hover { background:var(--blue-600); }
.nav:not(.nav-over), .nav.scrolled { background:rgba(255,255,255,.92); backdrop-filter:blur(14px); border-bottom-color:var(--line); box-shadow:0 2px 12px rgba(20,34,46,.05); }
.nav-over:not(.scrolled) { background:linear-gradient(to bottom, rgba(8,22,33,.55), rgba(8,22,33,0)); }
.nav-over:not(.scrolled) .nav-links a { color:#fff; text-shadow:0 1px 6px rgba(0,0,0,.3); }
.nav-over:not(.scrolled) .nav-links a.active { color:#fff; }
.nav-over:not(.scrolled) .nav-cta { background:#fff; color:var(--blue-700) !important; }
.nav-over:not(.scrolled) .nav-logo img { filter:brightness(0) invert(1); }
.nav-burger { display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:6px; margin-left:auto; }
.nav-burger span { width:24px; height:2px; background:var(--ink); transition:.3s; }
.nav-over:not(.scrolled) .nav-burger span { background:#fff; }

/* --- Hero accueil --- */
.hero-home { position:relative; height:100vh; min-height:600px; display:flex; align-items:center; overflow:hidden; }
.hero-slides, .hero-slide { position:absolute; inset:0; }
.hero-slide { background-size:cover; background-position:center; opacity:0; transition:opacity 1.2s ease; transform:scale(1.04); }
.hero-slide.on { opacity:1; animation:kenburns 7s ease forwards; }
.hero-fallback { background:linear-gradient(135deg, var(--blue-700), #06324a); opacity:1; }
@keyframes kenburns { from{ transform:scale(1.08);} to{ transform:scale(1);} }
.hero-scrim { position:absolute; inset:0; background:linear-gradient(110deg, rgba(6,22,33,.72) 0%, rgba(6,22,33,.38) 45%, rgba(6,22,33,.15) 100%); }
.hero-content { position:relative; z-index:2; max-width:1180px; width:100%; margin:0 auto; padding:0 24px; color:#fff; }
.hero-content h1 { font-size:clamp(2.3rem,6vw,4.4rem); line-height:1.04; max-width:14ch; text-shadow:0 2px 30px rgba(0,0,0,.25); }
.hero-sub { font-size:clamp(1.05rem,2.2vw,1.5rem); margin:18px 0 30px; max-width:30ch; color:rgba(255,255,255,.92); }
.hero-avail { display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,.16); color:#fff; font-size:.85rem; font-weight:700; padding:8px 16px 8px 12px; border-radius:999px; margin:-14px 0 26px; }
.hero-avail-dot { width:9px; height:9px; border-radius:50%; flex:0 0 auto; }
.hero-avail-dot.is-avail { background:var(--ok); box-shadow:0 0 0 4px rgba(31,157,107,.35); }
.hero-avail-dot.is-complet { background:rgba(255,255,255,.55); box-shadow:0 0 0 4px rgba(255,255,255,.14); }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; }
.btn-light { background:#fff; color:var(--blue-700); box-shadow:0 10px 26px rgba(0,0,0,.18); }
.btn-light:hover { background:#f1f8fd; }
.btn-ghost-light { background:rgba(255,255,255,.12); color:#fff; border:1.5px solid rgba(255,255,255,.6); box-shadow:none; }
.btn-ghost-light:hover { background:rgba(255,255,255,.2); }
.hero-dots { position:absolute; bottom:28px; left:50%; transform:translateX(-50%); z-index:3; display:flex; gap:9px; }
.hero-dots button { width:9px; height:9px; border-radius:50%; border:0; background:rgba(255,255,255,.45); cursor:pointer; transition:.3s; }
.hero-dots button.on { background:#fff; width:26px; border-radius:999px; }

/* --- Cartes biens --- */
.proj-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:26px; }
.proj-card { display:block; text-decoration:none; color:inherit; background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow-sm); transition:transform .25s, box-shadow .25s, border-color .25s; }
.proj-card:hover { transform:translateY(-6px); box-shadow:var(--shadow-lg); border-color:rgba(1,136,204,.3); }
.proj-media { position:relative; aspect-ratio:16/10; overflow:hidden; }
.proj-media-bg { position:absolute; inset:0; background:linear-gradient(135deg,#0a96d8,#015d8c); background-size:cover; background-position:center; }
.proj-media-bg.is-reserved { filter:grayscale(1) brightness(.96); }
.proj-status { position:absolute; top:14px; left:14px; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; padding:6px 12px; border-radius:999px; background:#fff; color:var(--ink); box-shadow:var(--shadow-sm); }
.proj-status.s-projet { background:var(--gray); color:#fff; }
.proj-status.s-disponible { background:var(--ok); color:#fff; }
.proj-status.s-a_vendre { background:var(--blue); color:#fff; }
.proj-status.s-vendu { background:var(--ink); color:#fff; }
.proj-status.s-unit-projet { background:var(--gray); color:#fff; }
.proj-status.s-unit-disponible { background:var(--ok); color:#fff; }
.proj-status.s-unit-a_vendre { background:var(--blue); color:#fff; }
.proj-status.s-unit-vendu { background:var(--ink); color:#fff; }
/* Réservé : rendu volontairement plus grand et plus voyant que les autres statuts
   (signal important pour un acheteur potentiel) — couleur plus soutenue + halo. */
.proj-status.s-reserve, .proj-status.s-unit-reserve {
    background:var(--warn); color:#fff; font-size:.8rem; padding:7px 15px; font-weight:900;
    box-shadow:0 3px 12px rgba(217,131,36,.5);
}
.proj-body { padding:20px 22px 22px; }
.proj-loc { font-size:.82rem; color:var(--gray); font-weight:600; }
.proj-body h3 { font-size:1.25rem; margin:6px 0 10px; }
.proj-meta { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.proj-meta span { font-size:.78rem; background:var(--blue-tint); color:var(--blue-700); padding:4px 10px; border-radius:999px; font-weight:600; }
.proj-foot { display:flex; align-items:center; gap:12px; border-top:1px solid var(--line-soft); padding-top:14px; }
.proj-price { font-family:var(--display); font-weight:700; color:var(--ink); }
.proj-price.is-reserved { color:var(--gray); }
.proj-avail { font-size:.78rem; color:var(--ok); font-weight:700; }
.proj-arrow { margin-left:auto; color:var(--blue); font-weight:800; transition:transform .2s; }
.proj-card:hover .proj-arrow { transform:translateX(4px); }

/* --- Services / prestations --- */
.serv-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:22px; }
.serv-card { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:30px 26px; box-shadow:var(--shadow-sm); transition:transform .2s; }
.serv-card:hover { transform:translateY(-4px); }
.serv-ic { font-size:2rem; margin-bottom:12px; }
.serv-card h3 { font-size:1.2rem; margin-bottom:8px; }
.serv-card p { color:var(--ink-soft); margin:0; }
.feat-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:20px 36px; }
.feat { display:flex; gap:14px; align-items:flex-start; }
.feat-bull { flex:0 0 auto; width:38px; height:38px; border-radius:11px; background:var(--blue-tint); color:var(--blue); display:grid; place-items:center; font-size:1rem; }
.feat h4 { font-size:1.06rem; margin-bottom:4px; }
.feat p { color:var(--ink-soft); margin:0; font-size:.94rem; }

/* --- Intro 2 colonnes / pourquoi nous --- */
.intro-2col { display:grid; grid-template-columns:1.1fr .9fr; gap:50px; align-items:center; }
.intro-2col h2 { font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:14px; }
.why { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:30px; box-shadow:var(--shadow); }
.why h3 { font-size:1.2rem; margin-bottom:16px; }
.why-list { list-style:none; padding:0; margin:0; display:grid; gap:16px; }
.why-list li { display:grid; gap:2px; padding-left:26px; position:relative; }
.why-list li::before { content:"✓"; position:absolute; left:0; top:0; color:var(--blue); font-weight:800; }
.why-list strong { font-family:var(--display); }
.why-list span { color:var(--ink-soft); font-size:.92rem; }

/* --- Page hero (sous-pages) --- */
.page-hero { padding:150px 0 70px; background:linear-gradient(135deg,#0a96d8,var(--blue-700)); color:#fff; position:relative; overflow:hidden; }
.page-hero.compact { padding:130px 0 48px; }
.page-hero::before { content:""; position:absolute; inset:0; opacity:.1; background-image:linear-gradient(rgba(255,255,255,.5) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.5) 1px,transparent 1px); background-size:36px 36px; -webkit-mask-image:linear-gradient(120deg,#000,transparent 70%); mask-image:linear-gradient(120deg,#000,transparent 70%); }
.page-hero h1 { font-size:clamp(2rem,4.5vw,3.2rem); position:relative; }
.page-hero p { color:rgba(255,255,255,.9); position:relative; max-width:52ch; margin-top:10px; }
.page-hero .proj-status { position:relative; margin-bottom:14px; }
.back-link.light { color:rgba(255,255,255,.85); position:relative; }
.back-link.light:hover { color:#fff; }

/* --- Détail bien --- */
.detail-grid { display:grid; grid-template-columns:1fr 340px; gap:36px; align-items:start; }
.gallery { margin-bottom:30px; }
.gal-main { border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow); aspect-ratio:16/10; background:var(--blue-tint); }
.gal-main img { width:100%; height:100%; object-fit:cover; display:block; }
.gal-thumbs { display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.gal-thumbs button { width:84px; height:62px; border-radius:10px; overflow:hidden; border:2px solid transparent; padding:0; cursor:pointer; background:none; }
.gal-thumbs button.on { border-color:var(--blue); }
.gal-thumbs img { width:100%; height:100%; object-fit:cover; }
.detail-block { margin-bottom:34px; }
.detail-block h2 { font-size:1.5rem; margin-bottom:12px; }
.detail-block p { color:var(--ink-soft); }
.units { display:grid; gap:18px; }
.unit { display:grid; grid-template-columns:200px 1fr; border:1px solid var(--line); border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow-sm); }
.unit-img { position:relative; min-height:160px; overflow:hidden; }
.unit-img-bg { position:absolute; inset:0; background:var(--blue-tint); background-size:cover; background-position:center; }
.unit-img-bg.is-reserved { filter:grayscale(1) brightness(.96); }
.unit-img .proj-status { top:10px; left:10px; }
.unit-info { padding:18px 20px; }
.unit-info h3 { font-size:1.16rem; margin-bottom:8px; }
.unit-specs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.unit-specs span { font-size:.82rem; background:var(--blue-tint-2); border:1px solid var(--line); padding:4px 10px; border-radius:999px; color:var(--ink-soft); }
.unit-specs b { color:var(--ink); }
.unit-desc { font-size:.9rem; color:var(--ink-soft); margin-bottom:12px; }
.unit-desc p { margin:0 0 6px; }
.unit-foot { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.unit-price { font-family:var(--display); font-weight:700; color:var(--blue-700); }
.unit-price.is-reserved { color:var(--gray); }
.unit-actions { margin-left:auto; display:flex; gap:8px; }
.side-card { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:22px; box-shadow:var(--shadow-sm); margin-bottom:22px; position:sticky; top:96px; }
.side-card h3 { font-size:1.1rem; margin-bottom:14px; }
.kv { list-style:none; padding:0; margin:0; }
.kv li { display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-top:1px solid var(--line-soft); font-size:.92rem; }
.kv li:first-child { border-top:0; }
.kv span { color:var(--gray); }
.form { display:grid; gap:12px; }

/* --- À propos --- */
.vms-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:22px; }
.vms { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:28px; box-shadow:var(--shadow-sm); }
.vms-ic { font-size:1.8rem; margin-bottom:10px; }
.vms h3 { font-size:1.2rem; margin-bottom:8px; }
.vms p { color:var(--ink-soft); margin:0; font-size:.95rem; }
.team-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:22px; max-width:620px; margin:0 auto; }
.team-card { text-align:center; background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:30px; box-shadow:var(--shadow-sm); }
.team-avatar { width:76px; height:76px; border-radius:50%; margin:0 auto 14px; display:grid; place-items:center; font-family:var(--display); font-weight:700; font-size:1.5rem; color:#fff; background:linear-gradient(135deg,#06a0e4,var(--blue-700)); }
.team-card h3 { font-size:1.15rem; }
.team-card p { color:var(--gray); margin:4px 0 0; font-size:.9rem; }

/* --- Contact --- */
.contact-grid { display:grid; grid-template-columns:1fr 380px; gap:36px; align-items:start; }
.contact-info { background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:26px; box-shadow:var(--shadow-sm); margin-bottom:22px; }
.contact-info h3 { font-size:1.2rem; margin-bottom:16px; }
.ci-line { display:flex; gap:12px; align-items:flex-start; margin:0 0 12px; color:var(--ink-soft); }
.ci-line span:first-child { width:24px; flex:0 0 auto; }
.ci-line a { color:var(--blue-700); text-decoration:none; }
.map { border-radius:var(--r-lg); overflow:hidden; box-shadow:var(--shadow-sm); border:1px solid var(--line); }
.map iframe { width:100%; height:300px; border:0; display:block; }

/* --- CTA band + footer --- */
.cta-band { background:linear-gradient(135deg,#0a96d8,var(--blue-700)); color:#fff; }
.cta-inner { max-width:760px; margin:0 auto; padding:74px 24px; text-align:center; }
.cta-inner h2 { font-size:clamp(1.7rem,3.6vw,2.6rem); margin-bottom:12px; }
.cta-inner p { color:rgba(255,255,255,.9); margin-bottom:26px; font-size:1.05rem; }
.foot { background:var(--ink); color:#c4d0d9; }
.foot-inner { max-width:1180px; margin:0 auto; padding:60px 24px 30px; display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:30px; }
.foot-brand img { height:30px; filter:brightness(0) invert(1); margin-bottom:14px; }
.foot-brand p { font-size:.88rem; line-height:1.7; margin:0 0 10px; }
.foot-brand a { color:#fff; text-decoration:none; }
.foot-col h4 { color:#fff; font-size:.82rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:14px; }
.foot-col a { display:block; color:#c4d0d9; text-decoration:none; font-size:.92rem; margin-bottom:9px; transition:color .2s; }
.foot-col a:hover { color:#fff; }
.foot-bottom { border-top:1px solid rgba(255,255,255,.1); padding:20px 24px; text-align:center; font-size:.82rem; color:#8a99a4; }

/* --- Reveal au scroll (public uniquement) --- */
.site .reveal { opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; animation:none; }
.site .reveal.in { opacity:1; transform:none; }

/* ======================================================================
   BACK-OFFICE (ajouts)
   ====================================================================== */
.adm-nav { display:flex; gap:4px; margin-left:8px; }
.adm-nav a { text-decoration:none; color:var(--ink-soft); font-weight:600; font-size:.9rem; padding:7px 13px; border-radius:999px; }
.adm-nav a:hover { background:var(--blue-tint-2); color:var(--blue-700); }
.adm-nav a.active { background:var(--blue); color:#fff; }
.muted { color:var(--gray); font-size:.86rem; }
.thumb { width:54px; height:40px; border-radius:8px; background:var(--blue-tint); background-size:cover; background-position:center; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-grid .span2 { grid-column:1 / -1; }
.check { display:flex; align-items:center; gap:9px; font-weight:600; color:var(--ink-soft); }
.check input { width:18px; height:18px; }

.media-grid { display:flex; flex-wrap:wrap; gap:12px; margin:12px 0; }
.media-tile { position:relative; width:128px; height:96px; border-radius:12px; overflow:hidden; border:2px solid var(--line); background:#fff; }
.media-tile.is-cover { border-color:var(--blue); box-shadow:0 0 0 3px rgba(1,136,204,.15); }
.mt-img { width:100%; height:100%; background-size:cover; background-position:center; }
.mt-doc { width:100%; height:100%; display:grid; place-items:center; font-family:var(--display); font-weight:700; color:var(--blue-700); background:var(--blue-tint); }
.mt-bar { position:absolute; top:0; right:0; left:0; display:flex; justify-content:flex-end; gap:4px; padding:5px; background:linear-gradient(to bottom,rgba(0,0,0,.45),transparent); }
.mt-bar button { width:24px; height:24px; border-radius:7px; border:0; cursor:pointer; background:rgba(255,255,255,.9); font-size:.8rem; line-height:1; }
.mt-cover { color:var(--blue-700); }
.mt-del { color:var(--danger); }
.media-tools { display:flex; gap:14px; flex-wrap:wrap; align-items:center; }
.uploader.sm { padding:10px 14px; }
.url-add { display:flex; gap:6px; }
.url-add input { padding:9px 12px; border:1.5px solid var(--line); border-radius:var(--r-sm); font-family:var(--body); font-size:.86rem; min-width:200px; }

.unit-edit { border:1px solid var(--line); border-radius:var(--r); padding:18px; margin-bottom:16px; background:var(--blue-tint-2); }
.ue-head { display:flex; gap:10px; align-items:center; margin-bottom:14px; }
.ue-title { flex:1; font-family:var(--display); font-weight:600; font-size:1.05rem; padding:9px 12px; border:1.5px solid var(--line); border-radius:var(--r-sm); }
.ue-status { padding:9px 12px; border:1.5px solid var(--line); border-radius:var(--r-sm); font-family:var(--body); }
.ue-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; }
.ue-grid .field.sm { margin:0; }
.ue-grid .span-all { grid-column:1 / -1; }
.ue-grid .field:not(.sm):not(.span-all) { grid-column:span 2; }
.ue-media { margin-top:14px; }
.ue-foot { margin-top:14px; display:flex; align-items:center; gap:12px; }
.ue-saved { color:var(--ok); font-weight:700; font-size:.86rem; }

.inq-list { display:grid; gap:14px; }
.inq { background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:18px 20px; box-shadow:var(--shadow-sm); }
.inq.unread { border-left:4px solid var(--blue); }
.inq-head { display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; align-items:center; }
.inq-head a { color:var(--blue-700); text-decoration:none; }
.inq-meta { display:flex; gap:10px; align-items:center; }
.inq-msg { color:var(--ink-soft); margin:12px 0; white-space:pre-line; }
.inq-actions { display:flex; gap:8px; flex-wrap:wrap; }

@media (max-width:900px){
  .nav-links { position:fixed; inset:64px 0 auto 0; flex-direction:column; background:#fff; padding:18px 24px; gap:14px; box-shadow:var(--shadow); transform:translateY(-130%); transition:transform .3s; align-items:flex-start; }
  .nav-links.open { transform:none; }
  .nav-over:not(.scrolled) .nav-links a { color:var(--ink); text-shadow:none; }
  .nav-over:not(.scrolled) .nav-cta { background:var(--blue); color:#fff !important; }
  .nav-burger { display:flex; }
  .detail-grid, .contact-grid, .intro-2col { grid-template-columns:1fr; }
  .side-card { position:static; }
  .foot-inner { grid-template-columns:1fr 1fr; }
  .ue-grid { grid-template-columns:repeat(2,1fr); }
  .form-grid { grid-template-columns:1fr; }
  .unit { grid-template-columns:1fr; }
}
@media (max-width:560px){
  .section { padding:60px 0; }
  .foot-inner { grid-template-columns:1fr; }
  .ue-grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce){
  .site .reveal { opacity:1; transform:none; }
  .hero-slide.on { animation:none; }
}
