.enedis-panel { margin-top: var(--space-4); }
.enedis-heading { display: flex; justify-content: space-between; gap: var(--space-4); }
.enedis-heading p:last-child { color: var(--muted-foreground); font-size: 13px; }
.enedis-badge { height: max-content; white-space: nowrap; padding: 7px 11px; border: 1px solid var(--data-pv); border-radius: 999px; color: var(--foreground); font-size: 12px; font-weight: 700; }
.enedis-badge.ready { border-color: var(--brand-green); }
.enedis-readiness { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
.enedis-readiness p { margin: 0; padding: var(--space-4); border-left: 3px solid var(--brand-cyan); border-radius: var(--radius-md); background: var(--muted); }
.enedis-readiness span,.enedis-readiness strong { display: block; }
.enedis-readiness span { color: var(--muted-foreground); font-size: 11px; }
.enedis-readiness strong { margin-top: 5px; font-size: 14px; }
.enedis-actions { display: flex; align-items: center; gap: var(--space-4); margin-top: var(--space-4); }
.enedis-actions a { flex: 0 0 auto; padding: 10px 14px; border: 1px solid var(--primary); border-radius: var(--radius-md); background: var(--primary); color: var(--primary-foreground); font-size: 13px; font-weight: 700; text-decoration: none; }
.enedis-actions p { margin: 0; color: var(--muted-foreground); font-size: 12px; line-height: 1.5; }
.enedis-panel details { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.enedis-panel summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.enedis-panel li { margin-top: 5px; color: var(--muted-foreground); font-size: 13px; }
.enedis-steps { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: var(--space-4) 0 0; padding: 0; list-style: none; counter-reset: enedis-step; }
.enedis-steps li { position: relative; min-height: 48px; margin: 0; padding: 9px 8px 8px 34px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); color: var(--muted-foreground); font-weight: 700; }
.enedis-steps li::before { counter-increment: enedis-step; content: counter(enedis-step); position: absolute; left: 9px; top: 9px; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.enedis-steps li.done { border-color: var(--brand-green); color: var(--brand-green); }
.enedis-steps li.current { border-color: var(--brand-cyan); box-shadow: inset 0 -3px 0 var(--brand-cyan); color: var(--foreground); }
@media (max-width: 900px) { .enedis-readiness { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .enedis-steps { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .enedis-heading,.enedis-actions { display: block; } .enedis-badge,.enedis-actions a { display: inline-block; margin-top: var(--space-3); } .enedis-actions p { margin-top: var(--space-3); } .enedis-readiness { grid-template-columns: 1fr; } }

.site-picker { display: flex; align-items: center; gap: var(--space-2); color: var(--muted-foreground); font-size: 14px; }
.site-picker select { min-height: 44px; max-width: 190px; border: 1px solid color-mix(in srgb,var(--brand-cyan) 55%,var(--border)); border-radius: var(--radius-md); background: var(--muted); color: var(--foreground); padding: 8px 36px 8px 12px; font-weight: 700; }
@media (max-width: 600px) { .site-picker > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .site-picker select { max-width: 150px; } }

/* Header N09 : identité sur une ligne, commandes sur une seconde ligne stable. */
.topbar { display: grid; grid-template-columns: 1fr; gap: 0; padding-top: 14px; padding-bottom: 0; }
.topbar .brand { width: 100%; display: grid; grid-template-columns: auto minmax(230px,1fr) auto auto; align-items: center; gap: var(--space-4); padding-bottom: 13px; }
.topbar .brand-marks { min-width: 238px; }
.topbar .brand > div:last-of-type { min-width: 0; }
.topbar .brand > div:nth-child(2) { display: grid; gap: 2px; }
.topbar .brand strong { line-height: 1.1; }
.topbar .brand small { max-width: none; }
.topbar .freshness { height: 60px; min-height: 60px; box-sizing: border-box; padding: 15px 12px 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--muted); align-items:flex-start; }
.topbar .freshness .status-dot { position: relative; top: 1px; margin-left: 2px; flex: 0 0 auto; }
.header-toggle { height: 44px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--muted); color: var(--foreground); cursor: pointer; }
.header-toggle span { color: var(--brand-cyan); font-size: 18px; line-height: 1; }
.header-toggle strong { font-size: 12px; }
.header-toggle:hover { border-color: var(--brand-cyan); }
.view-toggle { margin-bottom: clamp(32px, 3vw, 44px); }
body[data-view-mode="summary"] .view-toggle { margin-bottom: 0; }
.topbar.is-collapsed { min-height: 0; padding-top: 8px; }
.topbar.is-collapsed .brand { grid-template-columns: auto minmax(150px,1fr) auto auto; padding-bottom: 8px; }
.topbar.is-collapsed .brand-marks { min-width: 0; }
.topbar.is-collapsed .nsk-mark { width: 36px; height: 36px; }
.topbar.is-collapsed .rouch-mark { width: 126px; }
.topbar.is-collapsed .brand .eyebrow,.topbar.is-collapsed .brand small { display: none; }
.topbar.is-collapsed .brand strong { font-size: 17px; }
.topbar.is-collapsed .topbar-actions { display: none; }
.topbar-actions { width: 100%; display: grid; grid-template-columns: minmax(150px,190px) minmax(160px,200px) minmax(140px,170px) minmax(125px,150px) auto auto; justify-content: end; align-items: end; gap: var(--space-3); padding: 12px 0 13px; border-top: 1px solid var(--border); }
.topbar-actions > label { min-width: 0; display: grid; gap: 4px; }
.topbar-actions > .site-picker { min-width: 0; display: grid; align-items: initial; gap: 4px; }
.topbar-actions > label > span { font-size: 11px; line-height: 1; font-weight: 700; }
.topbar-actions select { width: 100%; max-width: none; }
.topbar-actions .site-picker select { width: 100%; max-width: none; }
.header-shortcuts { min-height:60px; box-sizing:border-box; display:flex; align-items:flex-end; gap:4px; }
.topbar-actions .help-link,.topbar-actions .account-link { min-height:36px; display:inline-flex; align-items:center; justify-content:center; padding:0 8px; color:var(--foreground); font-size:13px; font-weight:700; text-decoration:none; border:1px solid transparent; border-radius:var(--radius-md); }
.topbar-actions .help-link:hover,.topbar-actions .account-link:hover { border-color:var(--border); background:var(--muted); }
@media (max-width: 980px) { .topbar-actions { grid-template-columns: repeat(4,minmax(0,1fr)) auto; } }
@media (max-width: 720px) { .topbar .brand { grid-template-columns: 1fr auto; } .topbar .brand-marks { min-width: 0; grid-column: 1/-1; } .topbar .freshness { grid-column: 1; grid-row: 3; justify-self: start; } .header-toggle { grid-column: 2; grid-row: 3; } .topbar.is-collapsed .brand { grid-template-columns: 1fr auto; } .topbar.is-collapsed .brand-marks { grid-column:1; grid-row:1; } .topbar.is-collapsed .brand > div:nth-child(2) { display:none; } .topbar.is-collapsed .freshness { grid-column:1; grid-row:2; } .topbar.is-collapsed .header-toggle { grid-column:2; grid-row:2; } .topbar-actions { grid-template-columns: 1fr 1fr; } .topbar-actions .help-link,.topbar-actions .install-app { width: 100%; } }
@media (max-width: 420px) { .topbar-actions { grid-template-columns: 1fr; } }

.account-heading { display:flex; justify-content:space-between; gap:var(--space-4); }
.account-heading p:last-child { margin-bottom:0; color:var(--muted-foreground); }
.account-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); margin-top:var(--space-5); }
.account-grid article { min-width:0; padding:var(--space-4); border:1px solid var(--border); border-radius:var(--radius-md); background:var(--muted); }
.account-grid span,.account-grid strong,.account-grid small { display:block; }
.account-grid span { color:var(--muted-foreground); font-size:12px; }
.account-grid strong { margin-top:6px; font-size:17px; }
.account-grid small { margin-top:5px; overflow-wrap:anywhere; color:var(--muted-foreground); }
.collector-card { display:grid; grid-template-columns:minmax(240px,.8fr) 1.5fr; gap:var(--space-5); margin-top:var(--space-4); padding:var(--space-5); border:1px solid var(--border); border-radius:var(--radius-lg); background:color-mix(in srgb,var(--card) 82%,var(--muted)); }
.collector-card > div { display:flex; align-items:center; gap:var(--space-3); }
.collector-card strong,.collector-card small { display:block; }
.collector-card small { margin-top:4px; color:var(--muted-foreground); }
.collector-dot { flex:0 0 auto; width:18px; height:18px; border-radius:50%; background:var(--muted-foreground); box-shadow:0 0 0 7px color-mix(in srgb,var(--muted-foreground) 14%,transparent); }
.collector-dot.online { background:var(--brand-green); box-shadow:0 0 0 7px color-mix(in srgb,var(--brand-green) 16%,transparent); }
.collector-dot.waiting { background:#F2994A; box-shadow:0 0 0 7px color-mix(in srgb,#F2994A 16%,transparent); }
.collector-dot.offline { background:var(--destructive); box-shadow:0 0 0 7px color-mix(in srgb,var(--destructive) 14%,transparent); }
.collector-card dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); margin:0; }
.collector-card dl div { padding-left:var(--space-3); border-left:1px solid var(--border); }
.collector-card dt { color:var(--muted-foreground); font-size:11px; }
.collector-card dd { margin:6px 0 0; font-size:13px; font-weight:700; }
.account-actions { display:flex; align-items:center; justify-content:space-between; gap:var(--space-4); margin-top:var(--space-4); }
.account-actions p { margin:0; color:var(--muted-foreground); font-size:12px; }
.account-actions button { min-height:42px; padding:8px 14px; border:1px solid var(--border); border-radius:var(--radius-md); background:var(--muted); color:var(--foreground); font-weight:700; cursor:pointer; }
@media(max-width:800px){.account-grid{grid-template-columns:1fr}.collector-card{grid-template-columns:1fr}.collector-card dl{grid-template-columns:1fr}.collector-card dl div{padding:var(--space-2) 0 0;border-left:0;border-top:1px solid var(--border)}}
@media(max-width:560px){.account-heading,.account-actions{display:block}.account-heading .enedis-badge{display:inline-block;margin-top:var(--space-3)}.account-actions form{margin-top:var(--space-3)}.account-actions button{width:100%}}
.brand-marks a { display:flex; align-items:center; border-radius:var(--radius-sm); }
.brand-marks a:focus-visible { outline:2px solid var(--brand-cyan); outline-offset:4px; }
footer a { color:var(--brand-cyan); font-weight:700; text-underline-offset:3px; }
