/* Espace client Concept3D. Traduction du design fourni (prototype React).
   Couleurs et polices identiques au site : marine #1a2744, teal #3DB8AC, fond #f6f5f0. */
.ec {
  --ec-bg: #f6f5f0; --ec-border: #e0ddd6; --ec-teal: #3DB8AC; --ec-teal-dim: rgba(61,184,172,.10);
  --ec-navy: #1a2744; --ec-text: #3a3a3a; --ec-muted: #7a8a9a;
  --ec-serif: 'DM Serif Display', serif; --ec-sans: 'DM Sans', sans-serif;
  background: var(--ec-bg); color: var(--ec-text); font-family: var(--ec-sans);
}
.ec *, .ec *::before, .ec *::after { box-sizing: border-box; }
.ec :where(h1, h2, h3) { font-family: var(--ec-serif); font-weight: 400; color: var(--ec-navy); margin: 0; }
.ec :where(p, ul, ol) { margin: 0; padding: 0; }
.ec :where(a) { color: inherit; }

.ec-crumbs { max-width: 1240px; margin: 0 auto; padding: 32px clamp(24px,5vw,80px) 0; }
.ec-crumbs ol { list-style: none; display: flex; gap: 8px; font-size: 13px; color: var(--ec-muted); flex-wrap: wrap; }
.ec-crumbs a { color: var(--ec-muted); text-decoration: none; }
.ec-crumbs li:last-child { color: var(--ec-navy); font-weight: 500; }

.ec-banner { background: var(--ec-navy); color: #fff; font-size: 13px; padding: 10px clamp(24px,5vw,80px); display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.ec-banner a { color: var(--ec-teal); font-weight: 600; text-decoration: none; }

.ec-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; max-width: 1240px; margin: 0 auto; padding: 24px clamp(24px,5vw,80px) 96px; align-items: start; }
.ec-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--ec-border); border-radius: 12px; padding: 10px; }
.ec-sidebar a, .ec-sidebar button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 12px 14px; border-radius: 8px; font-family: var(--ec-sans); font-size: 14px; font-weight: 500; color: var(--ec-muted); text-decoration: none; transition: all .15s; }
.ec-sidebar a:hover, .ec-sidebar button:hover { background: var(--ec-bg); color: var(--ec-navy); }
.ec-sidebar a.active { background: var(--ec-teal-dim); color: var(--ec-navy); font-weight: 600; }
.ec-sidebar .ec-logout { margin-top: 6px; border-top: 1px solid var(--ec-border); border-radius: 0; padding-top: 14px; }
.ec-sidebar svg { flex-shrink: 0; }
.ec-logout-form { margin: 0; }

.ec-title { font-size: clamp(24px,2.8vw,30px); margin-bottom: 20px; }
.ec-lead { font-size: 15px; color: var(--ec-muted); }
.ec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ec-stack { display: flex; flex-direction: column; gap: 32px; }
.ec-list { display: flex; flex-direction: column; gap: 12px; }

.ec-btn { display: inline-block; background: var(--ec-navy); color: #fff !important; padding: 13px 22px; border-radius: 7px; font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; border: none; cursor: pointer; font-family: var(--ec-sans); transition: background .2s; }
.ec-btn:hover { background: var(--ec-teal); }
.ec-link { background: none; border: none; cursor: pointer; font-size: 13px; color: var(--ec-teal); font-weight: 600; text-decoration: none; font-family: var(--ec-sans); }

.ec-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ec-stat { background: #fff; border: 1px solid var(--ec-border); border-radius: 12px; padding: 20px; }
.ec-stat-icon { width: 36px; height: 36px; border-radius: 9px; background: var(--ec-teal-dim); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.ec-stat-value { font-family: var(--ec-serif); font-size: 26px; color: var(--ec-navy); line-height: 1; }
.ec-stat-label { font-size: 12px; color: var(--ec-muted); margin-top: 4px; }

.ec-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.ec-section-head h2 { font-size: 20px; }

.ec-card { background: #fff; border: 1px solid var(--ec-border); border-radius: 12px; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; }
.ec-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.ec-card-ref { font-size: 12px; color: var(--ec-muted); margin-bottom: 4px; }
.ec-card h3 { font-size: 19px; overflow-wrap: anywhere; }
.ec-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ec-tag { font-size: 12px; color: var(--ec-teal); background: var(--ec-teal-dim); padding: 4px 10px; border-radius: 100px; }
.ec-card-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--ec-border); flex-wrap: wrap; gap: 10px; }
.ec-price { font-family: var(--ec-serif); font-size: 20px; color: var(--ec-navy); }
.ec-track { font-size: 12px; color: var(--ec-muted); }

.ec-pill { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 100px; white-space: nowrap; border: 1px solid; }
.ec-pill.attente    { background: #fff; color: var(--ec-muted); border-color: var(--ec-border); }
.ec-pill.recue      { background: #fff; color: var(--ec-navy); border-color: var(--ec-navy); }
.ec-pill.production { background: var(--ec-navy); color: #fff; border-color: var(--ec-navy); }
.ec-pill.expediee   { background: var(--ec-teal-dim); color: var(--ec-teal); border-color: var(--ec-teal); }
.ec-pill.livree     { background: var(--ec-teal); color: #fff; border-color: var(--ec-teal); }
.ec-pill.annulee    { background: #f0eeea; color: var(--ec-muted); border-color: var(--ec-border); }

.ec-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.ec-filter { padding: 8px 16px; border-radius: 100px; border: 1.5px solid var(--ec-border); background: #fff; color: var(--ec-muted); font-size: 13px; font-weight: 500; text-decoration: none; }
.ec-filter.on { border-color: var(--ec-teal); background: var(--ec-teal-dim); color: var(--ec-teal); font-weight: 600; }
.ec-empty { font-size: 14px; color: var(--ec-muted); padding: 32px 0; text-align: center; }

.ec-parts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ec-part { background: #fff; border: 1px solid var(--ec-border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ec-part-top { display: flex; gap: 14px; }
.ec-part-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--ec-teal-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ec-part h3 { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.ec-part-file { font-size: 12px; color: var(--ec-muted); margin-top: 3px; overflow-wrap: anywhere; }
.ec-part-foot { font-size: 12px; color: var(--ec-muted); padding-top: 10px; border-top: 1px solid var(--ec-border); }

.ec-form { background: #fff; border: 1px solid var(--ec-border); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.ec-form + .ec-form { margin-top: 20px; }
.ec-form-title { font-size: 20px; }
.ec-form .ec-flash { margin-bottom: 0; }
button.ec-btn { border: none; cursor: pointer; font-family: var(--ec-sans); }
.ec-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ec-label { font-size: 12px; color: var(--ec-navy); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; display: block; }
.ec-value { background: var(--ec-bg); border: 1px solid var(--ec-border); border-radius: 8px; padding: 12px 14px; font-size: 14px; min-height: 46px; overflow-wrap: anywhere; }
.ec-note { font-size: 13px; color: var(--ec-muted); line-height: 1.6; }
.ec-input { width: 100%; background: var(--ec-bg); border: 1px solid var(--ec-border); border-radius: 8px; padding: 13px 15px; font-family: var(--ec-sans); font-size: 15px; color: var(--ec-text); outline: none; }
.ec-input:focus { border-color: var(--ec-teal); }

.ec-auth-wrap { padding: 56px clamp(24px,5vw,80px) 96px; }
.ec-auth { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; max-width: 1040px; margin: 0 auto; align-items: stretch; }
.ec-auth-card { background: #fff; border: 1px solid var(--ec-border); border-radius: 16px; padding: clamp(28px,4vw,44px); }
.ec-auth-card h1 { font-size: clamp(26px,3vw,32px); margin-bottom: 22px; }
.ec-auth-side { background: var(--ec-navy); border-radius: 16px; padding: clamp(28px,4vw,44px); color: #fff; }
.ec-auth-side h2 { color: #fff; font-size: clamp(24px,2.6vw,30px); line-height: 1.2; margin-bottom: 28px; }
.ec-auth-side h2 em { color: var(--ec-teal); }
.ec-eyebrow { font-size: 12px; color: var(--ec-teal); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 14px; }
.ec-perks { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.ec-perks li { display: flex; gap: 14px; align-items: flex-start; }
.ec-perks .ec-check { width: 26px; height: 26px; border-radius: 50%; background: var(--ec-teal); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.ec-perks strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.ec-perks span { font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.6; }
.ec-switch { display: flex; gap: 4px; background: var(--ec-bg); border: 1px solid var(--ec-border); border-radius: 100px; padding: 4px; margin-bottom: 26px; }
.ec [hidden] { display: none !important; }
.ec-formstack { display: flex; flex-direction: column; gap: 16px; }
.ec-row-between { display: flex; justify-content: space-between; align-items: baseline; }
.ec-switch a { flex: 1; text-align: center; padding: 11px; border-radius: 100px; font-size: 14px; font-weight: 500; color: var(--ec-muted); text-decoration: none; }
.ec-switch a.on { background: var(--ec-navy); color: #fff; font-weight: 600; }
.ec-flash { background: var(--ec-teal-dim); border: 1px solid var(--ec-teal); color: var(--ec-navy); border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-bottom: 18px; }
.ec-submit { width: 100%; background: var(--ec-navy); color: #fff; padding: 15px; border: none; border-radius: 8px; font-family: var(--ec-sans); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s; }
.ec-submit:hover { background: var(--ec-teal); }
.ec-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ec-muted); line-height: 1.6; }
.ec-consent input { margin-top: 4px; accent-color: var(--ec-teal); }
.ec-auth-foot { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--ec-border); text-align: center; }
.ec-auth-foot a { color: var(--ec-teal); font-weight: 600; text-decoration: none; font-size: 14px; }

.ec-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--ec-border); border-radius: 12px; overflow: hidden; }
.ec-table th, .ec-table td { text-align: left; padding: 12px 16px; font-size: 14px; border-top: 1px solid var(--ec-border); }
.ec-table th { background: var(--ec-bg); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ec-navy); border-top: none; }

@media (max-width: 900px) {
  .ec-layout { grid-template-columns: 1fr; gap: 20px; }
  .ec-sidebar { position: static; flex-direction: row; flex-wrap: wrap; }
  .ec-sidebar a, .ec-sidebar button { width: auto; flex: 1 1 auto; justify-content: center; }
  .ec-sidebar .ec-nav-text { display: none; }
  .ec-stats { grid-template-columns: 1fr 1fr; }
  .ec-parts, .ec-grid2 { grid-template-columns: 1fr; }
  .ec-auth { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .ec-sidebar { flex-direction: column; }
  .ec-sidebar .ec-nav-text { display: inline; }
}

/* Chargement d'une section sans rechargement de page */
[data-ec-panel] { transition: opacity .15s; }
.ec-loading [data-ec-panel] { opacity: .45; pointer-events: none; }

/* Panneau latéral de connexion (contenu de la fenêtre intégrée) */
.ec-panel { margin: 0; min-height: 100vh; background: #fff; }
.ec-panel-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.ec-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 28px; border-bottom: 1px solid var(--ec-border); }
.ec-panel-head img { height: 30px; width: auto; }
.ec-panel-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ec-border); background: #fff; cursor: pointer; font-size: 20px; line-height: 1; color: var(--ec-navy); }
.ec-panel-close:hover { background: var(--ec-bg); }
.ec-panel-body { flex: 1; padding: 28px; overflow-y: auto; }
.ec-panel-title { font-size: 28px; margin-bottom: 6px; }
.ec-panel-foot { padding: 18px 28px; border-top: 1px solid var(--ec-border); background: var(--ec-bg); text-align: center; }
.ec-panel-foot a { font-size: 13px; color: var(--ec-navy); font-weight: 600; text-decoration: none; }
.ec-panel-menu { display: flex; flex-direction: column; gap: 4px; }
.ec-panel-menu a { display: block; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--ec-border); font-size: 14px; font-weight: 500; color: var(--ec-navy); text-decoration: none; }
.ec-panel-menu a:hover { background: var(--ec-teal-dim); border-color: var(--ec-teal); }
.ec-submit-light { background: #fff; color: var(--ec-navy); border: 1.5px solid var(--ec-border); }
.ec-submit-light:hover { background: var(--ec-bg); }

.ec-flash-error { background: #fdf0f0; border-color: #e0a0a0; color: #7a2a2a; }
.ec-auth.ec-auth-single { grid-template-columns: 1fr; max-width: 520px; }
.cf-turnstile { min-height: 65px; }

/* Après un changement de rubrique, le script donne le focus au titre (lecteurs d'écran). Safari y dessine alors
   un contour qu'il faut ensuite aller « défaire » en cliquant ailleurs : le titre n'est pas interactif, on le masque. */
[data-ec-panel] h1:focus { outline: none; }
