
:root{
  --amz-orange:#ff8a00;
  --amz-orange-dark:#d96f00;
  --amz-navy:#0b243d;
  --amz-navy-2:#123a5b;
  --amz-text:#334155;
  --amz-muted:#64748b;
  --amz-line:#e2e8f0;
  --amz-bg:#f6f8fb;
}
.amz-portal-shell{max-width:1180px;margin:36px auto 70px;padding:0 18px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:var(--amz-text);box-sizing:border-box}
.amz-portal-shell *{box-sizing:border-box}
.amz-portal-top{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:22px;padding:32px 34px;background:linear-gradient(135deg,#fff5e8,#fff 78%);border:1px solid #ffd6a0;border-left:6px solid var(--amz-orange);border-radius:18px;box-shadow:0 10px 32px rgba(15,39,66,.07)}
.amz-portal-top h1{margin:10px 0 6px;font-size:32px;line-height:1.2;color:var(--amz-navy)}
.amz-portal-top p{margin:0;color:var(--amz-muted)}
.amz-portal-welcome{display:block;min-width:0}
.amz-client-greeting{display:block!important;visibility:visible!important;opacity:1!important;margin:0 0 8px!important;padding:0!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif!important;font-size:30px!important;line-height:1.2!important;font-weight:800!important;color:var(--amz-navy)!important;text-transform:none!important}
.amz-brand-pill{display:inline-block;padding:7px 12px;border-radius:999px;background:#fff0dc;border:1px solid #ffd19a;color:#d97706;font-size:12px;font-weight:800;letter-spacing:.25px}
.amz-logout{display:inline-block;white-space:nowrap;border:1px solid rgba(220,38,38,.28);padding:10px 15px;border-radius:10px;text-decoration:none;color:#b42318;font-weight:700;background:rgba(220,38,38,.10);transition:all .2s ease}
.amz-logout:hover{background:rgba(220,38,38,.18);border-color:rgba(220,38,38,.42);color:#991b1b;text-decoration:none}
.amz-case-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.amz-case-tab{padding:9px 13px;border:1px solid var(--amz-line);border-radius:999px;text-decoration:none;color:#475569;background:#fff;font-weight:700;font-size:13px}
.amz-case-tab.active{background:var(--amz-navy);color:#fff;border-color:var(--amz-navy)}
.amz-case-card{padding:30px 32px;background:#fff;border:1px solid #e5e7eb;border-radius:18px;box-shadow:0 10px 34px rgba(15,39,66,.06)}
.amz-case-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding-bottom:22px;border-bottom:1px solid #edf0f3}
.amz-case-number{font-weight:800;color:var(--amz-orange);font-size:13px;letter-spacing:.2px}
.amz-case-head h2{margin:6px 0 4px;color:var(--amz-navy);font-size:25px}
.amz-case-head p{margin:0;color:#94a3b8;font-size:13px}
.amz-case-status{padding:8px 12px;border-radius:999px;font-weight:800;font-size:12px}
.amz-case-status.active{background:#fff4e5;color:#c56a00;border:1px solid #ffd5a1}
.amz-case-status.closed{background:#ecfdf3;color:#067647;border:1px solid #abefc6}
.amz-progress-row{display:flex;justify-content:space-between;align-items:center;margin:24px 0 8px;font-size:14px}
.amz-progress-row strong{color:var(--amz-navy)}
.amz-progress-row span{color:var(--amz-orange);font-weight:800}
.amz-progress{height:10px;border-radius:999px;background:#edf1f5;overflow:hidden}
.amz-progress span{display:block;height:100%;background:linear-gradient(90deg,var(--amz-orange),#ffad3c);border-radius:999px}
.amz-steps{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:24px 0}
.amz-step{padding:15px 12px;background:#f8fafc;border:1px solid var(--amz-line);border-radius:12px;text-align:center}
.amz-step-icon{width:34px;height:34px;margin:0 auto 8px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;background:#e8edf3;color:#64748b}
.amz-step strong{display:block;font-size:13px;color:#475569;line-height:1.35}
.amz-step small{display:block;margin-top:4px;color:#94a3b8;font-size:11px}
.amz-step.done{background:#f1fbf5;border-color:#cdeed9}
.amz-step.done .amz-step-icon{background:#159455;color:#fff}
.amz-step.current{background:#fff8ee;border-color:#ffd39d}
.amz-step.current .amz-step-icon{background:var(--amz-orange);color:#fff}
.amz-step.current strong{color:#9a5200}
.amz-summary{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin:0 0 22px}
.amz-summary>div{padding:15px 18px;border-radius:11px;background:#f8fafc;border:1px solid var(--amz-line)}
.amz-summary span{display:block;color:#94a3b8;font-size:12px;margin-bottom:3px}
.amz-summary strong{color:var(--amz-navy)}
.amz-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:20px}
.amz-panel{border:1px solid var(--amz-line);border-radius:15px;overflow:hidden;background:#fff}
.amz-panel-title{padding:18px 20px;background:#f8fafc;border-bottom:1px solid var(--amz-line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.amz-panel-title>div{display:flex;align-items:center;gap:8px}
.amz-panel-title h3{margin:0;color:var(--amz-navy);font-size:18px}
.amz-panel-title small{color:#94a3b8}
.amz-thread{padding:18px;max-height:440px;overflow:auto;background:#fbfcfe}
.amz-thread-empty{padding:18px;border:1px dashed #d7dee8;border-radius:10px;text-align:center;color:#94a3b8;font-size:14px}
.amz-msg{max-width:84%;margin:0 0 13px;padding:13px 15px;border-radius:13px}
.amz-msg.admin{background:#fff4e5;border:1px solid #ffd6a0;margin-right:auto}
.amz-msg.client{background:#eef4f8;border:1px solid #dce7ef;margin-left:auto}
.amz-msg-meta{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px;font-size:12px}
.amz-msg-meta strong{color:var(--amz-navy)}
.amz-msg-meta span{color:#94a3b8}
.amz-msg-body{font-size:14px;line-height:1.6;color:#3f4f63}
.amz-message-form{padding:16px;border-top:1px solid var(--amz-line)}
.amz-message-form textarea{width:100%;min-height:100px;border:1px solid #d7dee8;border-radius:10px;padding:12px 13px;font:inherit;resize:vertical}
.amz-message-form button,.amz-upload button{margin-top:10px;border:0;border-radius:9px;background:var(--amz-orange);color:#fff;padding:11px 16px;font-weight:800;cursor:pointer}
.amz-message-form button:hover,.amz-upload button:hover{background:var(--amz-orange-dark)}
.amz-doc-list{padding:16px}
.amz-doc{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #eef1f4}
.amz-doc:last-child{border-bottom:0}
.amz-doc-icon{width:38px;height:38px;border-radius:9px;background:#fff4e5;display:flex;align-items:center;justify-content:center}
.amz-doc-info{flex:1;min-width:0}
.amz-doc-info strong{display:block;color:var(--amz-navy);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.amz-doc-info small{display:block;color:#94a3b8;font-size:11px;margin-top:2px}
.amz-doc a{font-size:12px;font-weight:800;color:var(--amz-orange);text-decoration:none}
.amz-upload{padding:16px;border-top:1px solid var(--amz-line)}
.amz-upload label{display:block;border:1px dashed #cbd5e1;border-radius:11px;padding:16px;text-align:center;background:#f8fafc;cursor:pointer}
.amz-upload label span{display:block;color:var(--amz-navy);font-weight:800;margin-bottom:8px}
.amz-upload label input{max-width:100%}
.amz-upload>small{display:block;margin-top:7px;color:#94a3b8;font-size:11px}
.amz-security-note{margin-top:18px;padding:14px 16px;border-radius:11px;background:#f8fafc;border:1px solid var(--amz-line);color:#64748b;font-size:12px}
.amz-notice{margin:0 0 18px;padding:13px 16px;border-radius:10px;font-weight:700;font-size:13px}
.amz-notice.success{background:#ecfdf3;border:1px solid #abefc6;color:#067647}
.amz-notice.error{background:#fef3f2;border:1px solid #fecdca;color:#b42318}
.amz-login-card{max-width:720px;width:min(100%,720px);margin:70px auto;padding:40px;background:#fff;border:1px solid var(--amz-line);border-top:5px solid var(--amz-orange);border-radius:18px;box-shadow:0 16px 45px rgba(15,39,66,.09)}
.amz-login-card h2{margin:14px 0 8px;color:var(--amz-navy);font-size:27px}
.amz-login-card p{color:var(--amz-muted)}
.amz-login-card label{font-weight:700;color:#475569;font-size:13px}
.amz-login-card input[type=text],.amz-login-card input[type=password]{width:100%;border:1px solid #d7dee8;border-radius:9px;padding:12px;margin-top:5px}
.amz-login-card input[type=submit]{width:100%;border:0;border-radius:9px;background:var(--amz-orange);color:#fff;padding:12px 16px;font-weight:800;cursor:pointer}
.amz-login-links{text-align:center;margin-bottom:0!important}
.amz-login-links a{color:var(--amz-orange);font-weight:700;text-decoration:none}
.amz-empty{padding:36px;background:#fff;border:1px solid var(--amz-line);border-radius:15px;text-align:center}
@media(max-width:900px){
 .amz-steps{grid-template-columns:repeat(3,1fr)}
 .amz-grid{grid-template-columns:1fr}
}
@media(max-width:650px){
 .amz-portal-shell{padding:0 10px;margin-top:18px}
 .amz-portal-top{padding:24px 20px;align-items:flex-start;flex-direction:column}
 .amz-portal-top h1{font-size:26px}
 .amz-client-greeting{font-size:26px!important}
 .amz-case-card{padding:22px 18px}
 .amz-case-head{flex-direction:column}
 .amz-steps{grid-template-columns:repeat(2,1fr)}
 .amz-summary{grid-template-columns:1fr}
 .amz-panel-title{align-items:flex-start;flex-direction:column}
 .amz-msg{max-width:94%}
}

/* V1.1 - Authentification 100% AMZ Strategy */
.amz-auth-form{margin-top:20px}
.amz-auth-form label{display:block;margin:0 0 14px;font-weight:700;color:#475569;font-size:13px}
.amz-auth-form input[type=email],.amz-auth-form input[type=password],.amz-auth-form input[type=text]{width:100%;margin-top:6px;border:1px solid #d7dee8;border-radius:9px;padding:12px 13px;font:inherit;background:#fff;color:#24364b;outline:none}
.amz-auth-form input:focus{border-color:#ffad4a;box-shadow:0 0 0 3px rgba(255,138,0,.12)}
.amz-auth-form button{width:100%;border:0;border-radius:9px;background:#ff8a00;color:#fff;padding:13px 16px;font-weight:800;cursor:pointer;font-size:14px}
.amz-auth-form button:hover{background:#d96f00}
.amz-auth-form .amz-remember{display:flex;align-items:center;gap:8px;font-weight:600;color:#64748b}
.amz-auth-form .amz-remember input{margin:0}

/* V1.1.8 */
.amz-login-card h2{max-width:620px}
@media(max-width:650px){
  .amz-login-card{padding:26px 20px}
}


/* ===== V1.2.0 — suivi enrichi ===== */
.amz-summary-three{grid-template-columns:repeat(3,1fr)}
.amz-summary>div{position:relative}
.amz-summary>div>small:not(.amz-payment-badge){display:block;margin-top:4px;color:#94a3b8;font-size:11px}
.amz-payment-badge{display:inline-block!important;margin-top:7px;padding:4px 8px;border-radius:999px;font-size:10px!important;font-weight:800}
.amz-payment-badge.paid{background:#ecfdf3;color:#067647;border:1px solid #abefc6}
.amz-payment-badge.pending{background:#fff7ed;color:#b45309;border:1px solid #fed7aa}
.amz-payment-badge.partial{background:#fffbeb;color:#a16207;border:1px solid #fde68a}
.amz-payment-badge.refunded{background:#f1f5f9;color:#64748b;border:1px solid #dce3ea}

.amz-next-action{display:grid;grid-template-columns:46px 1fr;gap:15px;align-items:flex-start;margin:0 0 18px;padding:19px 20px;border-radius:13px;border:1px solid #dce5ee;background:#f8fafc}
.amz-next-action.action{background:#fff7ed;border-color:#fed7aa}
.amz-next-action.waiting{background:#f8fafc;border-color:#dce5ee}
.amz-next-action.success{background:#ecfdf3;border-color:#abefc6}
.amz-next-action.info{background:#eff6ff;border-color:#bfdbfe}
.amz-next-icon{width:40px;height:40px;border-radius:11px;display:flex;align-items:center;justify-content:center;background:#fff;font-size:20px;box-shadow:0 3px 10px rgba(15,39,66,.06)}
.amz-next-body>span{display:block;color:#94a3b8;font-size:10px;font-weight:800;letter-spacing:.45px}
.amz-next-body h3{margin:3px 0 5px;color:var(--amz-navy);font-size:17px}
.amz-next-body p{margin:0;color:#526174;font-size:13px;line-height:1.6}
.amz-deadline{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid rgba(148,163,184,.22);font-size:11px}
.amz-deadline strong{color:#334155}
.amz-deadline span{padding:4px 8px;border-radius:999px;background:#fff;color:#b45309;font-weight:800}

.amz-case-contact-grid{display:grid;grid-template-columns:1.3fr .7fr;gap:14px;margin:0 0 20px}
.amz-case-contact-card{padding:15px 18px;border:1px solid var(--amz-line);border-radius:11px;background:#fff}
.amz-case-contact-card>span{display:block;margin-bottom:4px;color:#94a3b8;font-size:11px;font-weight:700}
.amz-case-contact-card>a,.amz-case-contact-card>strong{display:block;color:var(--amz-navy);font-size:13px;font-weight:800;text-decoration:none;overflow-wrap:anywhere}
.amz-case-contact-card>a:hover{color:var(--amz-orange)}
.amz-case-contact-card>small{display:block;margin-top:4px;color:#94a3b8;font-size:10px;line-height:1.45}

.amz-timeline{margin-top:18px;border:1px solid var(--amz-line);border-radius:13px;background:#fff;overflow:hidden}
.amz-timeline summary{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:16px 18px;background:#f8fafc;cursor:pointer;list-style:none;font-weight:800;color:var(--amz-navy)}
.amz-timeline summary::-webkit-details-marker{display:none}
.amz-timeline summary small{color:#94a3b8;font-size:11px;font-weight:500}
.amz-timeline-list{padding:8px 18px 12px}
.amz-timeline-item{display:grid;grid-template-columns:32px 1fr auto;gap:11px;align-items:flex-start;padding:12px 0;border-bottom:1px solid #eef1f4}
.amz-timeline-item:last-child{border-bottom:0}
.amz-timeline-icon{width:30px;height:30px;border-radius:9px;background:#f8fafc;display:flex;align-items:center;justify-content:center}
.amz-timeline-copy strong{display:block;color:var(--amz-navy);font-size:12px}
.amz-timeline-copy p{margin:2px 0 0;color:#64748b;font-size:11px;line-height:1.45}
.amz-timeline-item time{color:#94a3b8;font-size:10px;white-space:nowrap}

@media(max-width:900px){
 .amz-summary-three{grid-template-columns:1fr 1fr}
 .amz-case-contact-grid{grid-template-columns:1fr}
}
@media(max-width:650px){
 .amz-summary-three{grid-template-columns:1fr}
 .amz-next-action{grid-template-columns:1fr}
 .amz-timeline-item{grid-template-columns:32px 1fr}
 .amz-timeline-item time{grid-column:2}
}


/* V1.2.1 — messages reçus par e-mail */
.amz-msg.client_email{
  background:#eef4f8;
  border:1px dashed #b8c9d8;
  margin-left:auto;
}
.amz-msg.client_email .amz-msg-meta strong::after{
  content:" ✉";
  color:#64748b;
}


/* V1.2.2 — aperçu administrateur */
.amz-admin-preview-banner{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin:0 0 14px;
  padding:12px 16px;
  border:1px solid #fed7aa;
  border-radius:11px;
  background:#fff7ed;
  color:#9a5200;
}
.amz-admin-preview-banner strong{color:#9a5200}
.amz-admin-preview-banner span{flex:1;font-size:12px;color:#a16207}
.amz-admin-preview-banner a{font-size:12px;font-weight:800;color:#9a5200;text-decoration:none}
.amz-preview-badge{
  display:inline-flex;
  align-items:center;
  padding:8px 11px;
  border-radius:999px;
  background:#fff0dc;
  border:1px solid #ffd19a;
  color:#b65d00;
  font-size:10px;
  font-weight:900;
  letter-spacing:.5px;
}
.amz-preview-readonly{
  margin-top:14px;
  padding:12px 14px;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
  color:#64748b;
  font-size:11px;
}


/* V1.2.4 — espace client simplifié */
.amz-summary>div:first-child>strong{
  display:block;
  margin-bottom:12px;
}
.amz-payment-badge{
  margin-top:0!important;
}

/* Les blocs adresse dossier / suivi et échéance ne sont plus affichés côté client. */


/* ===== V1.2.5 — paiement premium + historique défilant ===== */

/* Neutralise l'ancien badge de paiement */
.amz-payment-badge{display:none!important}

.amz-summary-payment{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

.amz-summary-payment .amz-amount-value{
  display:block;
  margin:4px 0 17px!important;
  font-size:24px;
  line-height:1.15;
  font-weight:800;
  color:var(--amz-navy);
}

.amz-payment-status{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-width:148px;
  padding:8px 11px;
  border:1px solid #dbe3ea;
  border-radius:10px;
  background:#fff;
  box-shadow:0 2px 7px rgba(15,39,66,.035);
}

.amz-payment-status-icon{
  flex:0 0 25px;
  width:25px;
  height:25px;
  display:flex!important;
  align-items:center;
  justify-content:center;
  margin:0!important;
  border-radius:50%;
  font-size:13px!important;
  font-weight:900;
  line-height:1;
}

.amz-payment-status-copy{
  display:block!important;
  margin:0!important;
}

.amz-payment-status-copy small{
  display:block;
  margin:0 0 1px;
  color:#94a3b8;
  font-size:9px;
  line-height:1.2;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.25px;
}

.amz-payment-status-copy strong{
  display:block;
  margin:0!important;
  font-size:12px;
  line-height:1.25;
  font-weight:800;
}

.amz-payment-status.paid{
  border-color:#bbebce;
  background:#f5fcf7;
}
.amz-payment-status.paid .amz-payment-status-icon{
  background:#dcfce7;
  color:#15803d;
}
.amz-payment-status.paid .amz-payment-status-copy strong{color:#166534}

.amz-payment-status.pending{
  border-color:#fed7aa;
  background:#fffaf4;
}
.amz-payment-status.pending .amz-payment-status-icon{
  background:#ffedd5;
  color:#c2410c;
}
.amz-payment-status.pending .amz-payment-status-copy strong{color:#9a3412}

.amz-payment-status.partial{
  border-color:#fde68a;
  background:#fffdf3;
}
.amz-payment-status.partial .amz-payment-status-icon{
  background:#fef3c7;
  color:#a16207;
}
.amz-payment-status.partial .amz-payment-status-copy strong{color:#854d0e}

.amz-payment-status.refunded{
  border-color:#dce3ea;
  background:#f8fafc;
}
.amz-payment-status.refunded .amz-payment-status-icon{
  background:#e2e8f0;
  color:#475569;
}
.amz-payment-status.refunded .amz-payment-status-copy strong{color:#475569}

/* Historique : 5 événements visibles, les suivants au scroll */
.amz-timeline[open] .amz-timeline-list{
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  max-height:380px; /* fallback avant calcul JS */
}

.amz-timeline-list{
  scrollbar-width:thin;
  scrollbar-color:#cbd5e1 transparent;
}

.amz-timeline-list::-webkit-scrollbar{width:7px}
.amz-timeline-list::-webkit-scrollbar-track{background:transparent}
.amz-timeline-list::-webkit-scrollbar-thumb{
  background:#cbd5e1;
  border-radius:999px;
}
.amz-timeline-list::-webkit-scrollbar-thumb:hover{background:#94a3b8}

.amz-timeline-item{
  min-height:58px;
}

@media(max-width:650px){
  .amz-summary-payment .amz-amount-value{font-size:22px}
  .amz-payment-status{min-width:0;width:100%}
}


/* ===== V1.2.9 — halo de progression renforcé ===== */
.amz-progress{
  position:relative;
  overflow:visible;
}

.amz-progress span{
  position:relative;
  overflow:visible;
}

/* Point orange fixe */
.amz-progress span::after{
  content:"";
  position:absolute;
  top:50%;
  right:-9px;
  width:18px;
  height:18px;
  border-radius:50%;
  transform:translateY(-50%);
  background:#f18102;
  border:0;
  box-shadow:
    0 3px 11px rgba(241,129,2,.38),
    0 0 0 3px rgba(241,129,2,.10);
  z-index:3;
}

/* Halo plus visible, plus large et plus lent */
.amz-progress span::before{
  content:"";
  position:absolute;
  top:50%;
  right:-9px;
  width:18px;
  height:18px;
  border-radius:50%;
  transform:translateY(-50%) scale(1);
  background:rgba(241,129,2,.48);
  box-shadow:
    0 0 0 2px rgba(241,129,2,.22),
    0 0 18px rgba(241,129,2,.28);
  z-index:2;
  pointer-events:none;
  animation:amzProgressHaloStrong 2.1s ease-out infinite;
  transform-origin:center;
  will-change:transform,opacity;
}

@keyframes amzProgressHaloStrong{
  0%{
    transform:translateY(-50%) scale(1);
    opacity:.78;
  }
  35%{
    opacity:.50;
  }
  68%{
    opacity:.22;
  }
  100%{
    transform:translateY(-50%) scale(3.6);
    opacity:0;
  }
}

@media (prefers-reduced-motion: reduce){
  .amz-progress span::before{
    animation:none!important;
    opacity:.18;
    transform:translateY(-50%) scale(2);
  }
}


/* ===== V1.3.0 — état final vert + célébration ===== */
.amz-case-status.closed{
  background:#ecfdf3;
  color:#067647;
  border:1px solid #abefc6;
}

.amz-progress-row span.is-complete{
  color:#159455;
}

.amz-progress.is-complete{
  background:#e6f6ec;
}

.amz-progress.is-complete span{
  background:linear-gradient(90deg,#16a34a,#57d37d);
}

/* Point final vert */
.amz-progress.is-complete span::after{
  background:#16a34a!important;
  box-shadow:
    0 3px 11px rgba(22,163,74,.34),
    0 0 0 3px rgba(22,163,74,.10)!important;
}

/* Halo vert */
.amz-progress.is-complete span::before{
  background:rgba(22,163,74,.44)!important;
  box-shadow:
    0 0 0 2px rgba(22,163,74,.22),
    0 0 18px rgba(22,163,74,.26)!important;
  animation:amzProgressHaloSuccess 2.1s ease-out infinite!important;
}

@keyframes amzProgressHaloSuccess{
  0%{
    transform:translateY(-50%) scale(1);
    opacity:.82;
  }
  35%{
    opacity:.52;
  }
  70%{
    opacity:.20;
  }
  100%{
    transform:translateY(-50%) scale(3.8);
    opacity:0;
  }
}

/* Petits éclats festifs autour du point final */
.amz-progress-celebration{
  position:absolute;
  top:50%;
  right:-17px;
  width:42px;
  height:42px;
  transform:translateY(-50%);
  pointer-events:none;
  z-index:4;
}

.amz-progress-celebration::before,
.amz-progress-celebration::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:50%;
}

.amz-progress-celebration::before{
  background:
    radial-gradient(circle, #ffd54a 0 2px, transparent 2.5px) 50% 4px/8px 8px no-repeat,
    radial-gradient(circle, #22c55e 0 2px, transparent 2.5px) 80% 30%/8px 8px no-repeat,
    radial-gradient(circle, #60a5fa 0 2px, transparent 2.5px) 84% 72%/8px 8px no-repeat,
    radial-gradient(circle, #fb7185 0 2px, transparent 2.5px) 50% 100%/8px 8px no-repeat,
    radial-gradient(circle, #a78bfa 0 2px, transparent 2.5px) 14% 70%/8px 8px no-repeat,
    radial-gradient(circle, #f59e0b 0 2px, transparent 2.5px) 12% 28%/8px 8px no-repeat;
  animation:amzBurstSpin 3.2s linear infinite;
  opacity:.95;
}

.amz-progress-celebration::after{
  background:
    linear-gradient(#ffd54a,#ffd54a) 50% 0/2px 10px no-repeat,
    linear-gradient(#4ade80,#4ade80) 100% 50%/10px 2px no-repeat,
    linear-gradient(#60a5fa,#60a5fa) 50% 100%/2px 10px no-repeat,
    linear-gradient(#fb7185,#fb7185) 0 50%/10px 2px no-repeat,
    linear-gradient(#f59e0b,#f59e0b) 84% 16%/2px 9px no-repeat,
    linear-gradient(#a78bfa,#a78bfa) 18% 84%/2px 9px no-repeat;
  animation:amzBurstTwinkle 1.8s ease-in-out infinite;
  opacity:.8;
}

@keyframes amzBurstSpin{
  0%{transform:scale(.92) rotate(0deg); opacity:.85}
  50%{transform:scale(1.05) rotate(10deg); opacity:1}
  100%{transform:scale(.92) rotate(360deg); opacity:.85}
}

@keyframes amzBurstTwinkle{
  0%,100%{transform:scale(.9); opacity:.55}
  50%{transform:scale(1.08); opacity:1}
}

.amz-step.complete{
  background:#f1fbf5;
  border-color:#b9e7c9;
  box-shadow:0 4px 14px rgba(21,148,85,.08);
}
.amz-step.complete .amz-step-icon{
  background:#159455;
  color:#fff;
  box-shadow:0 0 0 5px rgba(21,148,85,.12);
}
.amz-step.complete strong{
  color:#146534;
}
.amz-step.complete small{
  color:#4f7b63;
}

@media (prefers-reduced-motion: reduce){
  .amz-progress.is-complete span::before,
  .amz-progress-celebration::before,
  .amz-progress-celebration::after{
    animation:none!important;
  }
}


/* ===== V1.3.1 — cadre compte client à droite ===== */
.amz-action-account-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  gap:16px;
  align-items:stretch;
  margin:0 0 20px;
}

.amz-action-account-grid .amz-next-action{
  margin:0;
  height:100%;
}

.amz-account-card{
  padding:18px;
  border:1px solid #dce5ee;
  border-radius:13px;
  background:#fff;
  box-shadow:0 5px 16px rgba(15,39,66,.035);
}

.amz-account-card-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding-bottom:13px;
  border-bottom:1px solid #edf0f3;
}

.amz-account-card-head>span{
  width:38px;
  height:38px;
  border-radius:11px;
  background:#fff4e5;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:17px;
}

.amz-account-card-head small{
  display:block;
  margin-bottom:2px;
  color:#94a3b8;
  font-size:9px;
  font-weight:800;
  letter-spacing:.35px;
}

.amz-account-card-head strong{
  display:block;
  color:var(--amz-navy);
  font-size:14px;
}

.amz-account-info{
  display:grid;
  gap:9px;
  padding:13px 0;
}

.amz-account-info>div{
  padding:10px 11px;
  border:1px solid #edf0f3;
  border-radius:9px;
  background:#f8fafc;
}

.amz-account-info span{
  display:block;
  margin-bottom:3px;
  color:#94a3b8;
  font-size:9px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.25px;
}

.amz-account-info strong{
  display:block;
  color:#24364b;
  font-size:11px;
  overflow-wrap:anywhere;
}

.amz-account-email{
  text-transform:none;
}

.amz-account-password-form{
  padding-top:13px;
  border-top:1px solid #edf0f3;
}

.amz-account-form-title{
  margin-bottom:10px;
}

.amz-account-form-title strong{
  display:block;
  color:var(--amz-navy);
  font-size:12px;
}

.amz-account-form-title small{
  display:block;
  margin-top:3px;
  color:#94a3b8;
  font-size:9px;
  line-height:1.4;
}

.amz-account-password-form label{
  display:block;
  margin:0 0 8px;
  color:#526174;
  font-size:10px;
  font-weight:700;
}

.amz-account-password-form input{
  width:100%;
  margin-top:4px;
  padding:9px 10px;
  border:1px solid #d7dee8;
  border-radius:8px;
  background:#fff;
  color:#24364b;
  font:inherit;
  outline:none;
}

.amz-account-password-form input:focus{
  border-color:#ffad4a;
  box-shadow:0 0 0 3px rgba(255,138,0,.10);
}

.amz-account-password-form button{
  width:100%;
  margin-top:4px;
  padding:9px 11px;
  border:0;
  border-radius:8px;
  background:var(--amz-navy);
  color:#fff;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

.amz-account-password-form button:hover{
  background:var(--amz-navy-2);
}

@media(max-width:980px){
  .amz-action-account-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:650px){
  .amz-account-card{
    padding:16px;
  }
}


/* ===== V1.3.3 — typographie espace client légèrement agrandie ===== */

.amz-portal-shell{
  font-size:15px;
}

.amz-client-greeting{
  font-size:32px!important;
}

.amz-portal-top p{
  font-size:15px;
}

.amz-case-number{
  font-size:14px;
}

.amz-case-head h2{
  font-size:27px;
}

.amz-case-head p{
  font-size:14px;
}

.amz-case-status{
  font-size:13px;
}

.amz-progress-row{
  font-size:15px;
}

.amz-step strong{
  font-size:14px;
}

.amz-step small{
  font-size:12px;
}

.amz-summary span{
  font-size:13px;
}

.amz-summary strong{
  font-size:16px;
}

.amz-summary>div>small:not(.amz-payment-badge){
  font-size:12px;
}

.amz-summary-payment .amz-amount-value{
  font-size:26px;
}

.amz-payment-status-copy small{
  font-size:10px;
}

.amz-payment-status-copy strong{
  font-size:13px;
}

.amz-next-body>span{
  font-size:11px;
}

.amz-next-body h3{
  font-size:19px;
}

.amz-next-body p{
  font-size:14px;
}

.amz-panel-title h3{
  font-size:19px;
}

.amz-panel-title small{
  font-size:12px;
}

.amz-msg-meta{
  font-size:13px;
}

.amz-msg-body{
  font-size:15px;
}

.amz-message-form textarea{
  font-size:15px;
}

.amz-doc-info strong{
  font-size:14px;
}

.amz-doc-info small{
  font-size:12px;
}

.amz-doc a{
  font-size:13px;
}

.amz-upload>small{
  font-size:12px;
}

.amz-security-note{
  font-size:13px;
}

/* Cadre Mon compte client */
.amz-account-card-head small{
  font-size:10px;
}

.amz-account-card-head strong{
  font-size:16px;
}

.amz-account-info span{
  font-size:10px;
}

.amz-account-info strong{
  font-size:13px;
}

.amz-account-form-title strong{
  font-size:13px;
}

.amz-account-form-title small{
  font-size:10px;
}

.amz-account-password-form label{
  font-size:11px;
}

.amz-account-password-form input{
  font-size:13px;
}

.amz-account-password-form button{
  font-size:11px;
}

/* Historique */
.amz-timeline summary{
  font-size:14px;
}

.amz-timeline summary small{
  font-size:12px;
}

.amz-timeline-copy strong{
  font-size:13px;
}

.amz-timeline-copy p{
  font-size:12px;
}

.amz-timeline-item time{
  font-size:11px;
}

@media(max-width:650px){
  .amz-client-greeting{
    font-size:28px!important;
  }

  .amz-case-head h2{
    font-size:24px;
  }

  .amz-summary-payment .amz-amount-value{
    font-size:24px;
  }
}


/* ===== V1.3.4 — modification du mot de passe sur page dédiée ===== */

.amz-account-password-link-wrap{
  padding-top:13px;
  border-top:1px solid #edf0f3;
}

.amz-account-password-link{
  display:grid;
  grid-template-columns:36px 1fr auto;
  gap:10px;
  align-items:center;
  padding:11px 12px;
  border:1px solid #dce5ee;
  border-radius:10px;
  background:#f8fafc;
  color:var(--amz-navy)!important;
  text-decoration:none!important;
  transition:all .18s ease;
}

.amz-account-password-link:hover{
  background:#fff7ed;
  border-color:#fed7aa;
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(15,39,66,.05);
}

.amz-account-password-link-icon{
  width:34px;
  height:34px;
  display:flex!important;
  align-items:center;
  justify-content:center;
  margin:0!important;
  border-radius:9px;
  background:#fff4e5;
  font-size:16px!important;
}

.amz-account-password-link strong{
  display:block;
  font-size:12px;
  line-height:1.3;
  color:var(--amz-navy);
}

.amz-account-password-link small{
  display:block;
  margin-top:2px;
  color:#94a3b8;
  font-size:10px;
}

.amz-account-password-arrow{
  margin:0!important;
  color:var(--amz-orange)!important;
  font-size:18px!important;
  font-weight:800;
}

/* Page dédiée */
.amz-password-page{
  max-width:720px;
  margin:0 auto;
}

.amz-password-page-head{
  margin-bottom:18px;
  padding:28px 30px;
  border:1px solid #ffd6a0;
  border-left:5px solid var(--amz-orange);
  border-radius:16px;
  background:linear-gradient(135deg,#fff5e8,#fff 82%);
  box-shadow:0 8px 25px rgba(15,39,66,.05);
}

.amz-password-page-head h2{
  margin:14px 0 7px;
  color:var(--amz-navy);
  font-size:27px;
}

.amz-password-page-head p{
  margin:0;
  color:#64748b;
  font-size:14px;
  line-height:1.6;
}

.amz-password-back{
  display:inline-block;
  margin-bottom:12px;
  color:#64748b!important;
  text-decoration:none!important;
  font-size:12px;
  font-weight:700;
}

.amz-password-back:hover{
  color:var(--amz-orange)!important;
}

.amz-password-page-card{
  padding:28px 30px;
  border:1px solid var(--amz-line);
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 32px rgba(15,39,66,.055);
}

.amz-password-client-reminder{
  margin-bottom:20px;
  padding:14px 16px;
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:#f8fafc;
}

.amz-password-client-reminder span{
  display:block;
  margin-bottom:4px;
  color:#94a3b8;
  font-size:10px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.3px;
}

.amz-password-client-reminder strong{
  display:block;
  color:var(--amz-navy);
  font-size:15px;
}

.amz-password-client-reminder small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-size:12px;
}

.amz-password-page-form label{
  display:block;
  margin-bottom:14px;
  color:#475569;
  font-size:13px;
  font-weight:700;
}

.amz-password-page-form input{
  width:100%;
  margin-top:6px;
  padding:12px 13px;
  border:1px solid #d7dee8;
  border-radius:9px;
  background:#fff;
  color:#24364b;
  font:inherit;
  outline:none;
}

.amz-password-page-form input:focus{
  border-color:#ffad4a;
  box-shadow:0 0 0 3px rgba(255,138,0,.11);
}

.amz-password-help{
  margin:-2px 0 16px;
  color:#94a3b8;
  font-size:11px;
  line-height:1.5;
}

.amz-password-page-form button{
  width:100%;
  border:0;
  border-radius:10px;
  background:var(--amz-orange);
  color:#fff;
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
}

.amz-password-page-form button:hover{
  background:var(--amz-orange-dark);
}

@media(max-width:650px){
  .amz-password-page-head,
  .amz-password-page-card{
    padding:22px 18px;
  }

  .amz-password-page-head h2{
    font-size:24px;
  }
}


/* ===== V1.3.5 — textes détaillés + ressources par étape ===== */
.amz-next-action{
  min-height:100%;
}

.amz-next-body{
  min-width:0;
}

.amz-next-copy{
  margin-top:7px;
}

.amz-next-copy p{
  margin:0 0 11px;
  color:#526174;
  font-size:14px;
  line-height:1.72;
}

.amz-next-copy p:last-child{
  margin-bottom:0;
}

.amz-stage-resources{
  margin-top:17px;
  padding-top:15px;
  border-top:1px solid rgba(148,163,184,.24);
}

.amz-stage-resources-title{
  display:flex;
  align-items:center;
  gap:7px;
  margin-bottom:9px;
}

.amz-stage-resources-title>span{
  margin:0!important;
  color:inherit!important;
  font-size:14px!important;
}

.amz-stage-resources-title strong{
  color:var(--amz-navy);
  font-size:12px;
}

.amz-stage-resource-links{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.amz-stage-resource-links a{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 10px;
  border:1px solid #dce5ee;
  border-radius:9px;
  background:#fff;
  color:#405168!important;
  text-decoration:none!important;
  font-size:11px;
  font-weight:700;
  line-height:1.3;
  transition:all .18s ease;
}

.amz-stage-resource-links a:hover{
  border-color:#ffbf72;
  background:#fff8ee;
  color:#a85500!important;
  transform:translateY(-1px);
}

.amz-stage-resource-links a span{
  margin:0!important;
  color:var(--amz-orange)!important;
  font-size:13px!important;
  font-weight:900;
}

@media(max-width:650px){
  .amz-next-copy p{
    font-size:13px;
    line-height:1.65;
  }

  .amz-stage-resource-links{
    flex-direction:column;
  }

  .amz-stage-resource-links a{
    width:100%;
    justify-content:space-between;
  }
}
