/* ============================================================
   CardioRezo — Espace membre V2 (golden member-space-blueprints.tsx)
   Surcouche activée sous .cr-ui-v2 sur mon-espace. Legacy (#dash) intact hors flag.
   WorkspaceShell + primitives (Panel/Pill/Button/Field/Notice/PageHeading/Metric/MatchCard).
   ============================================================ */
:root{--cre-teal:#067D79;--cre-navy:#123452;--cre-ink:#102F49;--cre-line:#DCE6E4;--cre-copy:#607781;}
.cre-hide{display:none!important;}
#cr-espace{font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:var(--cre-ink);background:#EAF1EF;min-height:100vh;padding:20px 14px 40px;}
@media(min-width:640px){#cr-espace{padding:28px 20px 48px;}}
.cre-wrap{max-width:1180px;margin:0 auto;}
/* Shell */
.cre-shell{overflow:hidden;border-radius:28px;border:1px solid #C9DAD7;background:#F3F7F6;box-shadow:0 24px 80px rgba(16,47,73,.13);}
.cre-hd{display:flex;min-height:72px;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--cre-line);background:#fff;padding:0 16px;}
@media(min-width:640px){.cre-hd{padding:0 24px;}}
.cre-hd__l{display:flex;align-items:center;gap:22px;min-width:0;}
.cre-logo{display:inline-flex;align-items:center;gap:9px;flex-shrink:0;}
.cre-logo__t{font-weight:800;font-size:17px;letter-spacing:-.02em;color:var(--cre-navy);}
.cre-logo__t i{color:var(--cre-teal);font-style:normal;}
.cre-hdnav{display:none;align-items:center;gap:4px;}
@media(min-width:1024px){.cre-hdnav{display:flex;}}
.cre-hdnav a{border-radius:12px;padding:8px 12px;font-size:14px;font-weight:700;color:#5C707A;text-decoration:none;}
.cre-hdnav a.on{background:#E7F4F1;color:var(--cre-teal);font-weight:800;}
.cre-hd__r{display:flex;align-items:center;gap:10px;flex-shrink:0;min-width:0;}
.cre-ava{display:grid;height:40px;width:40px;place-items:center;border-radius:50%;background:var(--cre-navy);color:#fff;font-size:13px;font-weight:900;flex-shrink:0;}
/* Mobile étroit : la pastille d'accès chevauchait le logo → masquée (le statut reste visible dans le hero). */
@media(max-width:520px){.cre-hd__r .cre-pill{display:none;}}
.cre-body{display:grid;min-height:640px;grid-template-columns:1fr;min-width:0;}
@media(min-width:1024px){.cre-body{grid-template-columns:220px minmax(0,1fr);}}
.cre-side{border-bottom:1px solid var(--cre-line);background:#fff;padding:12px;min-width:0;}
@media(min-width:1024px){.cre-side{border-bottom:0;border-right:1px solid var(--cre-line);padding:16px;}}
.cre-nav{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;}
@media(min-width:1024px){.cre-nav{display:block;}}
.cre-nav__i{display:flex;flex-shrink:0;align-items:center;gap:12px;border:0;background:none;border-radius:12px;padding:12px;font-size:14px;font-weight:700;color:#536D77;cursor:pointer;font-family:inherit;text-align:left;white-space:nowrap;}
@media(min-width:1024px){.cre-nav__i{width:100%;margin-bottom:6px;white-space:normal;}}
.cre-nav__i:hover{background:#F3F7F6;}
.cre-nav__i.on{background:#E8F5F2;color:var(--cre-teal);}
.cre-nav__i svg{width:18px;height:18px;flex-shrink:0;}
.cre-sidenote{display:none;margin-top:24px;border-radius:18px;background:#0B2940;padding:16px;color:#fff;}
@media(min-width:1024px){.cre-sidenote{display:block;}}
.cre-sidenote svg{width:20px;height:20px;color:#80D4CB;}
.cre-sidenote b{display:block;margin-top:12px;font-size:14px;font-weight:800;}
.cre-sidenote p{margin:8px 0 0;font-size:12px;line-height:1.5;color:rgba(255,255,255,.65);}
.cre-main{min-width:0;padding:16px;}
@media(min-width:640px){.cre-main{padding:24px;}}
@media(min-width:1024px){.cre-main{padding:32px;}}
.cre-stack{display:grid;gap:24px;}
/* PageHeading */
.cre-ph{display:flex;flex-direction:column;gap:16px;}
@media(min-width:1024px){.cre-ph{flex-direction:row;align-items:flex-end;justify-content:space-between;}}
.cre-ph__ey{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.16em;color:var(--cre-teal);}
.cre-ph h2{margin:8px 0 0;font-size:26px;font-weight:800;letter-spacing:-.045em;color:var(--cre-ink);}
@media(min-width:640px){.cre-ph h2{font-size:30px;}}
.cre-ph p{margin:8px 0 0;max-width:720px;font-size:14px;line-height:1.55;color:var(--cre-copy);}
/* Primitives */
.cre-panel{border-radius:22px;border:1px solid var(--cre-line);background:#fff;box-shadow:0 7px 24px rgba(16,47,73,.045);}
.cre-panel--pad{padding:20px;}
@media(min-width:640px){.cre-panel--pad{padding:24px;}}
.cre-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 12px;font-size:12px;font-weight:800;}
.cre-pill--teal{background:#DFF3EF;color:#096B66;}.cre-pill--navy{background:#E6EDF4;color:#123452;}.cre-pill--amber{background:#FFF1D8;color:#7B581F;}.cre-pill--rose{background:#FDE8E8;color:#9C3434;}.cre-pill--slate{background:#EEF3F2;color:#536D77;}
.cre-btn{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:10px 16px;font-size:14px;font-weight:800;cursor:pointer;font-family:inherit;transition:.15s;text-decoration:none;}
.cre-btn svg{width:16px;height:16px;}
.cre-btn--teal{background:var(--cre-teal);color:#fff;box-shadow:0 8px 20px rgba(6,125,121,.15);}.cre-btn--teal:hover{background:#056e6a;}
.cre-btn--navy{background:var(--cre-navy);color:#fff;box-shadow:0 8px 20px rgba(18,52,82,.14);}
.cre-btn--light{border:1px solid #D4E0DE;background:#fff;color:#405F6D;}.cre-btn--light:hover{background:#F3F7F6;}
.cre-btn--danger{border:1px solid #E9B8B8;background:#FFF2F2;color:#A03535;}
.cre-btn:disabled{opacity:.4;cursor:not-allowed;}
.cre-metrics{display:grid;gap:16px;grid-template-columns:1fr;}
@media(min-width:640px){.cre-metrics{grid-template-columns:repeat(3,1fr);}}
.cre-metric{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
.cre-metric__l{font-size:14px;font-weight:700;color:#5A707A;}
.cre-metric__v{margin:8px 0 0;font-size:30px;font-weight:800;letter-spacing:-.04em;color:var(--cre-ink);}
.cre-metric__h{margin:4px 0 0;font-size:12px;line-height:1.5;color:#71858C;}
.cre-metric__ic{display:grid;height:40px;width:40px;flex-shrink:0;place-items:center;border-radius:12px;background:#E8F5F2;color:var(--cre-teal);}
.cre-metric__ic svg{width:20px;height:20px;}
.cre-notice{display:flex;align-items:flex-start;gap:12px;border-radius:18px;border:1px solid #CFE1DE;background:#F2F8F6;padding:16px;}
.cre-notice--navy{border-color:#D4E0E9;background:#F1F5F8;}.cre-notice--amber{border-color:#E8D6B8;background:#FFF8EB;}.cre-notice--rose{border-color:#EECACA;background:#FFF4F4;}
.cre-notice__ic{margin-top:2px;display:grid;height:36px;width:36px;flex-shrink:0;place-items:center;border-radius:50%;background:#fff;color:var(--cre-teal);}
.cre-notice--navy .cre-notice__ic{color:#123452;}.cre-notice--amber .cre-notice__ic{color:#8A6427;}.cre-notice--rose .cre-notice__ic{color:#A13B3B;}
.cre-notice__ic svg{width:18px;height:18px;}
.cre-notice b{font-size:14px;font-weight:800;color:#173B53;}
.cre-notice p{margin:4px 0 0;font-size:14px;line-height:1.5;color:#5C737D;}
.cre-grid2{display:grid;gap:16px;grid-template-columns:1fr;}
@media(min-width:1280px){.cre-grid2{grid-template-columns:1fr 1fr;}}
.cre-field{display:block;}
.cre-field__l{margin-bottom:8px;display:flex;align-items:center;gap:8px;font-size:14px;font-weight:800;color:#294B59;}
.cre-field__v{display:block;min-height:48px;border-radius:12px;border:1px solid #CAD9D6;background:#fff;padding:12px 16px;font-size:14px;font-weight:600;color:#173B53;}
.cre-field__v--lock{border-color:#E2E9E7;background:#F3F6F5;color:#617781;}
.cre-field__h{margin-top:8px;display:block;font-size:12px;line-height:1.5;color:#71858C;}
/* Hero d'accueil — sublimation du cardiologue (langage home/carte) */
.cre-hero{position:relative;overflow:hidden;border-radius:22px;padding:26px 28px;color:#fff;background:linear-gradient(135deg,#0B2240,#123452);box-shadow:0 20px 48px -26px rgba(11,34,64,.6);}
.cre-hero::after{content:"";position:absolute;right:-70px;top:-100px;width:320px;height:320px;background:radial-gradient(circle,rgba(22,163,154,.32),transparent 70%);pointer-events:none;}
.cre-hero__row{position:relative;z-index:1;display:flex;align-items:center;gap:18px;flex-wrap:wrap;}
.cre-hero__av{width:72px;height:72px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 4px rgba(255,255,255,.12),0 0 0 8px rgba(22,163,154,.28);background:#0B2240;}
.cre-hero__av--init{display:grid;place-items:center;background:linear-gradient(135deg,#067D79,#16A39A);font-family:inherit;font-weight:800;font-size:26px;color:#fff;}
/* Avatar large de l'écran Identité & photo (#3) */
.cre-idav{width:104px;height:104px;border-radius:50%;object-fit:cover;flex:none;box-shadow:0 0 0 4px #fff,0 0 0 9px rgba(6,125,121,.18);background:#EAF1EF;}
.cre-idav--init{display:grid;place-items:center;background:linear-gradient(135deg,#067D79,#16A39A);font-family:inherit;font-weight:800;font-size:34px;color:#fff;}
/* Choix progressifs (écran Projet recherché #4) */
.cre-step{margin-top:18px;}
.cre-step__h{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.cre-step__n{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--cre-navy);color:#fff;font-size:12px;font-weight:800;flex:none;}
.cre-step__t{font-size:14.5px;font-weight:800;color:#173B53;}
.cre-step__hint{margin:-4px 0 10px 34px;font-size:12.5px;color:#71858C;}
.cre-opts{display:flex;flex-wrap:wrap;gap:8px;}
.cre-opt{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--cre-line);background:#fff;color:#3B5563;border-radius:999px;padding:8px 14px;font-size:13.5px;font-weight:700;cursor:pointer;font-family:inherit;transition:background .15s,border-color .15s,color .15s;}
.cre-opt:hover{border-color:#9FC6C0;}
.cre-opt--on{background:#DFF3EF;border-color:var(--cre-teal);color:#096B66;}
.cre-opt--more{border-style:dashed;color:#5C707A;}
.cre-hero__ey{font-size:11.5px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#7fe6db;}
.cre-hero__h{margin:6px 0 0;font-size:28px;font-weight:800;letter-spacing:-.03em;color:#fff;line-height:1.05;}
.cre-hero__meta{margin-top:7px;font-size:13.5px;color:#bcd2e4;}
.cre-hero__pill{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:800;color:#8ff0e6;background:rgba(22,163,154,.16);border:1px solid rgba(22,163,154,.4);border-radius:999px;padding:6px 12px;box-shadow:0 0 18px rgba(22,163,154,.3);white-space:nowrap;}
.cre-hero__pill svg{width:14px;height:14px;}
.cre-hero__cta{position:relative;z-index:1;margin-top:20px;display:flex;gap:10px;flex-wrap:wrap;}
.cre-hero__cta .cre-btn--ghostL{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.28);color:#fff;}
.cre-hero__cap{position:relative;z-index:1;margin:10px 0 0;font-size:11.5px;color:#9fc0dc;}
/* Mon profil en un coup d'œil (#2) — vue privée, hero expressif + détails secondaires */
.cre-ovedit{border:0;background:none;color:var(--cre-teal);font-weight:800;font-size:13px;cursor:pointer;font-family:inherit;display:inline-flex;align-items:center;gap:4px;white-space:nowrap;}
.cre-ovedit svg{width:15px;height:15px;}
.cre-hero__pill--warn{color:#ffd9a8;background:rgba(245,166,35,.18);border-color:rgba(245,166,35,.45);box-shadow:none;}
.cre-hero__pill--muted{color:#cfe0ef;background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.26);box-shadow:none;}
.cre-herobar{position:relative;z-index:1;margin-top:16px;}
.cre-herobar__t{font-size:12px;font-weight:700;color:#bcd2e4;margin-bottom:6px;}
.cre-herobar__track{height:7px;border-radius:99px;background:rgba(255,255,255,.14);overflow:hidden;}
.cre-herobar__track i{display:block;height:100%;background:linear-gradient(90deg,#16A39A,#7fe6db);}
.cre-secttl{margin:22px 0 12px;font-size:12px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:var(--cre-copy);}
@media(max-width:640px){.cre-hero__row{gap:14px;}.cre-hero__pill{margin-left:0;}.cre-hero__h{font-size:23px;}}
/* MatchCard */
.cre-match{border-radius:20px;border:1px solid #D8E4E1;background:#fff;padding:16px;box-shadow:0 5px 18px rgba(16,47,73,.04);}
.cre-match__t{margin:12px 0 0;font-size:16px;font-weight:800;line-height:1.3;color:#173B53;}
.cre-match__z{margin:8px 0 0;display:flex;align-items:center;gap:6px;font-size:14px;color:var(--cre-copy);}
.cre-match__z svg{width:16px;height:16px;color:var(--cre-teal);}
.cre-match__r{margin-top:16px;border-radius:12px;background:#F2F7F5;padding:10px 12px;font-size:12px;font-weight:600;color:#4E6974;}
.cre-match__f{margin-top:16px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #E8EEEC;padding-top:12px;}
.cre-match__f b{font-size:12px;font-weight:700;color:#71858C;}
.cre-match__go{display:flex;align-items:center;gap:4px;font-size:14px;font-weight:800;color:var(--cre-teal);background:none;border:0;cursor:pointer;font-family:inherit;}
.cre-match__go svg{width:16px;height:16px;}
/* Messagerie */
.cre-msg{display:grid;gap:16px;grid-template-columns:1fr;}
@media(min-width:1024px){.cre-msg{grid-template-columns:320px minmax(0,1fr);}}
.cre-conv{display:flex;gap:12px;border-top:1px solid #EEF3F2;padding:14px;cursor:pointer;background:none;border-left:0;border-right:0;border-bottom:0;width:100%;text-align:left;font-family:inherit;}
.cre-conv:first-child{border-top:0;}
.cre-conv.on{background:#F0F7F5;}
.cre-conv__av{display:grid;height:40px;width:40px;flex-shrink:0;place-items:center;border-radius:12px;background:#E8F5F2;color:var(--cre-teal);}
.cre-conv__av svg{width:18px;height:18px;}
.cre-conv__who{font-size:13px;font-weight:800;color:#173B53;}
.cre-conv__lbl{font-size:12px;color:var(--cre-teal);font-weight:700;margin-top:1px;}
.cre-conv__last{font-size:12px;color:#71858C;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px;}
.cre-conv__n{margin-left:auto;align-self:center;background:var(--cre-teal);color:#fff;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:800;}
.cre-thread{display:flex;flex-direction:column;min-height:420px;}
.cre-thread__h{display:flex;align-items:center;gap:12px;border-bottom:1px solid #EEF3F2;padding:14px 16px;}
.cre-thread__feed{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;max-height:440px;}
.cre-bub{max-width:82%;border-radius:16px;padding:10px 13px;font-size:13px;line-height:1.5;}
.cre-bub--me{margin-left:auto;background:var(--cre-navy);color:#fff;border-bottom-right-radius:4px;}
.cre-bub--them{background:#EFF5F3;color:#173B53;border-bottom-left-radius:4px;}
.cre-bub time{display:block;margin-top:4px;font-size:10px;opacity:.65;}
.cre-compose{display:flex;gap:8px;border-top:1px solid #EEF3F2;padding:12px;}
.cre-compose input{flex:1;border:1px solid #CAD9D6;border-radius:12px;padding:12px 14px;font-size:14px;font-family:inherit;outline:none;}
.cre-compose button{display:grid;place-items:center;height:44px;width:44px;border:0;border-radius:12px;background:var(--cre-teal);color:#fff;cursor:pointer;}
.cre-compose button svg{width:18px;height:18px;}
.cre-share{display:flex;align-items:center;gap:12px;border-bottom:1px solid #EEF3F2;background:#F5FAF8;padding:12px 16px;font-size:12px;color:#4E6974;}
.cre-share b{color:#173B53;font-weight:800;}
.cre-share__btn{margin-left:auto;border:0;border-radius:10px;background:var(--cre-teal);color:#fff;padding:8px 12px;font-size:12px;font-weight:800;cursor:pointer;}
.cre-empty{padding:40px 20px;text-align:center;color:#71858C;}
.cre-empty svg{width:32px;height:32px;color:#B6C7C4;}
.cre-empty b{display:block;margin-top:12px;font-size:15px;color:#173B53;}
.cre-empty p{margin:6px auto 0;max-width:320px;font-size:13px;line-height:1.5;}
.cre-msgnote{margin-top:6px;font-size:11px;color:#8B9BA0;text-align:center;}
/* Plateau technique (K08/K28) */
.cre-in{width:100%;border:1px solid #CAD9D6;border-radius:12px;padding:12px 14px;font-size:14px;font-weight:600;font-family:inherit;background:#fff;color:#173B53;outline:none;}
.cre-in:focus{border-color:var(--cre-teal);box-shadow:0 0 0 2px rgba(6,125,121,.15);}
select.cre-in{cursor:pointer;}
.cre-grid2b{display:grid;gap:12px;grid-template-columns:1fr 1fr;}
.cre-parcgrid{display:grid;gap:14px;grid-template-columns:1fr;}
@media(min-width:900px){.cre-parcgrid{grid-template-columns:1fr 1fr;}}
.cre-eq{display:flex;gap:14px;align-items:flex-start;border:1px solid var(--cre-line);background:#fff;border-radius:20px;padding:16px;box-shadow:0 5px 18px rgba(16,47,73,.04);}
.cre-eq__ic{display:grid;height:48px;width:48px;flex-shrink:0;place-items:center;border-radius:14px;background:linear-gradient(145deg,#DFF3EF,#E8EEF4);color:var(--cre-teal);}
.cre-eq__ic svg{width:22px;height:22px;}
.cre-eq__t{margin:2px 0 0;font-size:15px;font-weight:800;color:#173B53;line-height:1.3;}
.cre-eq__m{margin:4px 0 0;font-size:12.5px;color:var(--cre-copy);}
.cre-eq__miss{margin:6px 0 0;font-size:12px;color:#8A6427;}
.cre-eq__act{display:flex;flex-direction:column;gap:6px;flex-shrink:0;}
.cre-btn--icon{min-height:38px;padding:8px 10px;}
.cre-btn--icon svg{margin:0;}

/* Login V2 (léger, réutilise l'auth éprouvée) */
.cre-login{min-height:100vh;display:grid;place-items:center;padding:24px;}
.cre-login__card{width:100%;max-width:420px;}
