:root{
  --brand: #0ea5e9;      /* accent Zoïs (bleu) */
  --success: #16a34a;    /* vert succès */
  --error: #ef4444;      /* rouge erreur */
  --ink: #111827;        /* texte */
  --muted: #6b7280;
  --panel: #ffffff;
}

/* ===== MODALS ===== */
.c-modal{
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 9999;
}
.c-modal[aria-hidden="false"]{
  pointer-events: auto;
  opacity: 1;
}
.c-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(9,14,28,.55);
  backdrop-filter: blur(4px);
}

/* Panel */
.c-modal__panel{
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  background: var(--panel);
  border-radius: 18px;
  box-shadow:
    0 18px 50px rgba(0,0,0,.25),
    0 1px 0 rgba(255,255,255,.4) inset;
  padding: clamp(22px, 4vw, 32px);
  transform: translateY(10px) scale(.985);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
  outline: none;
  text-align: center; /* centrage global */
}
.c-modal[aria-hidden="false"] .c-modal__panel{
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Header : icône + titre sur la même ligne, centrés */
.c-modal__header{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

/* Icône */
.c-modal__icon{
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 14px;
  font-size: 26px;
  color: var(--panel);
  margin: 0; /* pas d'espace dessous pour garder l’alignement horizontal */
}
.modal--success .c-modal__icon{
  background: linear-gradient(135deg, var(--success), #22c55e);
  box-shadow: 0 8px 28px rgba(22,163,74,.35), 0 0 0 6px rgba(22,163,74,.12);
}
.modal--error .c-modal__icon{
  background: linear-gradient(135deg, var(--error), #f87171);
  box-shadow: 0 8px 28px rgba(239,68,68,.35), 0 0 0 6px rgba(239,68,68,.12);
}

/* Titres + textes */
.c-modal__title{
  margin: 0;
  font-size: clamp(20px, 3vw, 22px);
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--ink);
}
.c-modal__desc{
  max-width: 46ch;
  margin: 10px auto 18px; /* centré */
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* Actions (centrées) */
.c-modal__actions{
  margin-top: 6px;
  display: flex;
  gap: 12px;
  justify-content: center; /* centré */
}

/* Boutons */
.btn{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform .06s ease, background .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn:active{ transform: translateY(1px); }
.btn:focus-visible{
  outline: 2px solid transparent;
  box-shadow: 0 0 0 4px rgba(14,165,233,.25);
}

.btn--primary{
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #3abff8);
  box-shadow: 0 6px 20px rgba(14,165,233,.32);
}
.btn--primary:hover{ filter: brightness(1.05); }

.btn--ghost{
  background: #eef2f7;
  color: var(--ink);
}
.btn--ghost:hover{ background: #e6ebf2; }

/* Material Symbols réglages */
.material-symbols-outlined{
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 48;
}

/* Accessibilité : réduire animations si demandé */
@media (prefers-reduced-motion: reduce){
  .c-modal,
  .c-modal__panel{
    transition: none !important;
  }
}
