/*
 * Alerte Pellet — création d'une alerte utilisateur.
 * Powered by JeyZee
 */

:root{
  color-scheme:dark;
  --bg:#0b1017;
  --panel:#121a24;
  --panel-soft:#17212d;
  --border:#263445;
  --text:#f7f9fc;
  --muted:#98a7b8;
  --orange:#ff7a1a;
  --orange-soft:rgba(255,122,26,.14);
}

*{
  box-sizing:border-box;
}

html{
  background:var(--bg);
}

body{
  margin:0;
  min-height:100vh;
  color:var(--text);
  background:
    radial-gradient(
      circle at top,
      #162231 0,
      var(--bg) 42%
    );
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select{
  font:inherit;
}

[hidden]{
  display:none !important;
}

.user-alert-header{
  border-bottom:1px solid var(--border);
  background:rgba(11,16,23,.9);
  backdrop-filter:blur(14px);
}

.user-alert-header-inner{
  width:min(100% - 28px,960px);
  min-height:72px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.user-alert-brand{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--text);
  font-weight:900;
  text-decoration:none;
}

.user-alert-logo{
  width:42px;
  height:42px;
  object-fit:contain;
}

.user-alert-back{
  color:var(--muted);
  font-size:13px;
  font-weight:700;
  text-decoration:none;
}

.user-alert-shell{
  width:min(100% - 28px,860px);
  margin:0 auto;
  padding:34px 0 60px;
}

.user-alert-heading{
  margin-bottom:26px;
}

.user-alert-eyebrow{
  margin:0 0 8px;
  color:var(--orange);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.user-alert-heading h1{
  margin:0;
  font-size:clamp(30px,7vw,46px);
  line-height:1.05;
}

.user-alert-heading > p:last-child{
  max-width:680px;
  margin:14px 0 0;
  color:var(--muted);
  line-height:1.6;
}

.user-alert-form{
  display:grid;
  gap:16px;
}

.user-alert-card{
  padding:20px;
  border:1px solid var(--border);
  border-radius:20px;
  background:rgba(18,26,36,.94);
}

.user-alert-card-heading{
  display:flex;
  align-items:flex-start;
  gap:14px;
}

.user-alert-step{
  width:34px;
  height:34px;
  flex:0 0 34px;
  display:grid;
  place-items:center;
  border-radius:999px;
  color:#1d0d02;
  background:var(--orange);
  font-weight:950;
}

.user-alert-card h2{
  margin:2px 0 5px;
  font-size:18px;
}

.user-alert-card-heading p{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.user-alert-placeholder{
  margin-top:18px;
  padding:16px;
  border:1px dashed #39495c;
  border-radius:14px;
  color:var(--muted);
  background:rgba(11,16,23,.45);
  font-size:13px;
  line-height:1.5;
}

.user-alert-fields{
  margin-top:18px;
  display:grid;
  gap:12px;
}

.user-alert-fields label{
  display:grid;
  gap:7px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.user-alert-fields input,
.user-alert-fields select{
  width:100%;
  min-height:46px;
  padding:0 13px;
  border:1px solid var(--border);
  border-radius:12px;
  color:var(--text);
  background:#0d141d;
}

.user-alert-trigger-grid{
  margin-top:18px;
  display:grid;
  gap:10px;
}

.user-alert-trigger{
  min-height:50px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:13px;
  background:var(--panel-soft);
  font-weight:800;
}

.user-alert-actions{
  margin-top:4px;
  padding:20px;
  border:1px solid rgba(255,122,26,.38);
  border-radius:20px;
  background:
    linear-gradient(
      135deg,
      var(--orange-soft),
      rgba(18,26,36,.96) 58%
    );
}

.user-alert-primary{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 18px;
  border:0;
  border-radius:12px;
  color:#1d0d02;
  background:var(--orange);
  font-weight:950;
  text-decoration:none;
}

.user-alert-primary:disabled{
  cursor:not-allowed;
  opacity:.52;
}

.user-alert-actions p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:12px;
}

.user-alert-powered{
  margin:26px 0 0;
  color:var(--muted);
  text-align:center;
  font-size:12px;
}

.user-alert-powered strong{
  color:var(--orange);
}

.user-alert-state{
  min-height:360px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  text-align:center;
  color:var(--muted);
}

.user-alert-spinner{
  width:34px;
  height:34px;
  border:3px solid #293747;
  border-top-color:var(--orange);
  border-radius:999px;
  animation:user-alert-spin .8s linear infinite;
}

.user-alert-error strong{
  color:var(--text);
  font-size:18px;
}

.user-alert-error p{
  margin:0 0 8px;
}

@keyframes user-alert-spin{
  to{
    transform:rotate(360deg);
  }
}

@media(min-width:700px){
  .user-alert-card{
    padding:24px;
  }

  .user-alert-fields{
    grid-template-columns:1.4fr .6fr;
  }

  .user-alert-trigger-grid{
    grid-template-columns:repeat(3,1fr);
  }
}

/* P3-USER-ALERTS-DYNAMIC-CATALOG-UI-2026-10-01 */

.user-alert-choice-grid{
  margin-top:18px;
  display:grid;
  gap:10px;
}

.user-alert-choice{
  min-height:52px;
  display:flex;
  align-items:flex-start;
  gap:11px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:13px;
  background:var(--panel-soft);
  cursor:pointer;
}

.user-alert-choice:hover{
  border-color:#40536a;
}

.user-alert-choice:has(input:checked){
  border-color:rgba(255,122,26,.72);
  background:rgba(255,122,26,.10);
}

.user-alert-choice input{
  margin:4px 0 0;
  accent-color:var(--orange);
}

.user-alert-choice-copy{
  min-width:0;
  display:grid;
  gap:3px;
}

.user-alert-choice-copy strong{
  color:var(--text);
  font-size:14px;
  line-height:1.35;
}

.user-alert-choice-copy small{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.user-alert-choice-all{
  border-style:dashed;
}

.user-alert-choice-grid-stores{
  max-height:420px;
  overflow:auto;
  padding-right:4px;
}

.user-alert-choice-grid-products{
  max-height:520px;
  overflow:auto;
  padding-right:4px;
}

@media(min-width:700px){
  .user-alert-choice-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .user-alert-choice-grid-products{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* P3-USER-ALERTS-FORM-STATE-V1-2026-10-01 */

.user-alert-trigger-fields{
  margin-top:16px;
  display:grid;
  gap:12px;
}

.user-alert-trigger-fields > label{
  display:grid;
  gap:7px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}

.user-alert-input-suffix{
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:8px;
}

.user-alert-input-suffix input{
  width:100%;
  min-height:46px;
  padding:0 13px;
  border:1px solid var(--border);
  border-radius:12px;
  color:var(--text);
  background:#0d141d;
}

.user-alert-input-suffix > span{
  min-width:34px;
  color:var(--muted);
  font-weight:900;
  text-align:center;
}

.user-alert-validation{
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:13px;
  color:var(--muted);
  background:rgba(18,26,36,.76);
  font-size:13px;
  line-height:1.45;
}

.user-alert-validation[data-state="ready"]{
  border-color:rgba(66,196,120,.45);
  color:#b8f4cf;
  background:rgba(66,196,120,.08);
}

/* AP-02 E2E-R006 — non-blocking coverage warning. Powered by JeyZee. */
.user-alert-validation[data-state="warning"]{
  border-color:rgba(255,192,91,.65);
  color:#ffe0a3;
  background:rgba(255,192,91,.09);
}

.user-alert-validation[data-state="invalid"]{
  border-color:rgba(255,122,26,.30);
}

@media(min-width:700px){
  .user-alert-trigger-fields{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* P3-USER-ALERTS-GEO-ZONE-D1-ALIGNMENT-2026-10-01 */

.user-alert-geo-actions{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}

.user-alert-secondary{
  min-height:44px;
  padding:0 15px;
  border:1px solid var(--border);
  border-radius:12px;
  color:var(--text);
  background:var(--panel-soft);
  font-weight:900;
  cursor:pointer;
}

.user-alert-secondary:hover{
  border-color:rgba(255,122,26,.60);
}

.user-alert-secondary:disabled{
  cursor:wait;
  opacity:.62;
}

.user-alert-location-status{
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}

.user-alert-location-status[data-state="success"]{
  color:#b8f4cf;
}

.user-alert-location-status[data-state="error"]{
  color:#ffc09a;
}

.user-alert-location-status[data-state="loading"]{
  color:var(--text);
}
