/* steps */
.iedm-step { display:none; }
.iedm-step__nav { margin-top: 16px; display:flex; gap:12px; flex-wrap:wrap; }
.iedm-step-indicator span { 
  margin-right:10px; 
  opacity:.4;
  font-size: 32px;
  font-family: 'Oswald', sans-serif !important; }
.iedm-step-indicator span.active { opacity:1; font-weight:400; }

/* optionnel: masquer login/coupon pour UX clean */
.iedm-steps .woocommerce-form-login-toggle,
.iedm-steps form.woocommerce-form-login,
.iedm-steps .woocommerce-form-coupon-toggle,
.iedm-steps form.checkout_coupon {
  display:none !important;
}

/* cards grid */
.iedm-cards{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:16px;
}
@media (max-width: 980px){
  .iedm-cards{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 480px){
  .iedm-cards{ grid-template-columns:1fr; }
}

.iedm-card{
  display:flex;
  flex-direction:column;
  /* border:1px solid rgba(0,0,0,.12);*/
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  cursor:pointer;
  min-height: 260px;
}
.iedm-card__img img{ width:100%; height:120px; object-fit:cover; display:block; }
.iedm-card__body{ padding:12px; flex:1; display:flex; flex-direction:column; gap:8px; }
.iedm-card__title{ font-weight:700; }
.iedm-card__desc{ opacity:.85; font-size:13px; line-height:1.3; }
.iedm-card__toggle{ padding:12px; display:flex; justify-content:flex-end; align-items:center; gap:10px; }
.iedm-card__toggle input{ position:absolute; opacity:0; pointer-events:none; }

.iedm-switch{
  width:46px; height:26px; border-radius:999px;
  background:rgba(0,0,0,.18); position:relative; display:inline-block;
}
.iedm-switch:after{
  content:""; width:22px; height:22px; border-radius:50%;
  background:#fff; position:absolute; top:2px; left:2px;
  transition:transform .15s ease;
}
.iedm-card input:checked + .iedm-switch{ background:rgba(46, 163, 74, .9); }
.iedm-card input:checked + .iedm-switch:after{ transform:translateX(20px); }

/* ---- Layout général étapes ---- */
.iedm-steps{
  max-width: 1100px;
  margin: 0 auto;
}
.iedm-step{
  background:#fff;
  /* border:1px solid rgba(0,0,0,.08);*/
  border-radius:18px;
  padding:22px;
  /* box-shadow: 0 10px 30px rgba(0,0,0,.05);*/
}
.iedm-step h3 {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 500;
    color: #FFA600 !important;
    font-family: 'Montserrat', sans-serif !important;
    letter-spacing: 2px;
}
.iedm-step p{
  margin:0 0 18px 0;
  opacity:.75;
}

/* ---- Indicateur étapes ---- */
.iedm-steps__header{
  margin-bottom:14px;
}
.iedm-step-indicator span{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  /* background:rgba(0,0,0,.06);*/
  opacity:.5;
  margin-right:10px;
  font-weight:400;
}
.iedm-step-indicator span.active{
  opacity:1;
  /* background:rgba(0,0,0,.10);*/
}

/* ---- Contenu + navigation ---- */
.iedm-step__content{ margin-top: 10px; }
.iedm-step__nav{
  margin-top: 18px;
  display:block;
  justify-content:space-between;
  gap:12px;
}
.iedm-step__nav .button{
  border-radius:999px;
  padding:10px 18px;
}

/* ---- Inputs Woo + Step3 ---- */
.iedm-step input.input-text,
.iedm-step select,
.iedm-step textarea{
  border-radius:12px;
  border:1px solid rgba(0,0,0,.12);
  padding:12px 12px;
  min-height:44px;
}
.iedm-step .form-row label{
  font-weight:600;
  margin-bottom:6px;
  display:block;
}

/* 2 colonnes sur desktop */
@media(min-width: 980px){
  .iedm-step .form-row-first,
  .iedm-step .form-row-last{
    width:48%;
  }
  .iedm-step3-fields .form-row{
    width:48%;
    float:left;
    margin-right:4%;
  }
  .iedm-step3-fields .form-row:nth-child(2n){
    margin-right:0;
  }
  .iedm-step3-fields:after{
    content:"";
    display:block;
    clear:both;
  }
}

/* ---- Cartes Step 1 ---- */
.iedm-cards{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:16px;
}
@media (max-width: 980px){
  .iedm-cards{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (max-width: 480px){
  .iedm-cards{ grid-template-columns:1fr; }
}

.iedm-card{
  border:1px solid rgba(0,0,0,.10);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  cursor:pointer;
  min-height: 250px;
  display:flex;
  flex-direction:column;
  transition: transform .12s ease, box-shadow .12s ease;
}
.iedm-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
}
.iedm-card__img img{
  width:100%;
  height:120px;
  object-fit:cover;
  display:block;
}
.iedm-card__body{
  padding:14px;
  flex:1;
}
.iedm-card__title {
    font-weight: 870;
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    color: #00569A;
}
.iedm-card__desc{
  font-size:13px;
  opacity:.78;
  line-height:1.35;
}

.iedm-card__toggle{
  padding:12px 14px 14px;
  display:flex;
  justify-content:flex-end;
}
.iedm-card__toggle input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.iedm-switch{
  width:52px; height:28px;
  border-radius:999px;
  background:rgba(0,0,0,.18);
  position:relative;
}
.iedm-switch:after{
  content:"";
  width:24px; height:24px;
  border-radius:50%;
  background:#fff;
  position:absolute;
  top:2px; left:2px;
  transition: transform .15s ease;
}
.iedm-card input:checked + .iedm-switch{
  background: #80BA2A;
}
.iedm-card input:checked + .iedm-switch:after{
  transform: translateX(24px);
}

/* Divi peut casser les colonnes Woo */
.iedm-step .form-row-first,
.iedm-step .form-row-last{
  float:left;
  clear:none;
}
.iedm-step .form-row-wide{
  clear:both;
}

.iedm-step-error{
  padding:12px 14px;
  border-radius:12px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  margin-bottom: 14px;
  font-weight: 600;
}

.iedm-step-error{
  padding:12px 14px;
  border-radius:12px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  margin-bottom: 14px;
  font-weight: 600;
}

.iedm-email-exists{
  margin: 10px 0 14px;
  padding:12px 14px;
  border-radius:12px;
  background: rgba(255, 193, 7, 0.14);
  border: 1px solid rgba(255, 193, 7, 0.35);
  font-weight: 600;
}

.iedm-step__nav .button.is-disabled{
  opacity: .5;
  cursor: not-allowed;
}

/* Cache le titre/colonne "Informations complémentaires" si le thème le laisse */
.iedm-steps #order_review_heading,
.iedm-steps #ship-to-different-address,
.iedm-steps .woocommerce-additional-fields,
.iedm-steps .woocommerce-additional-fields__field-wrapper,
.iedm-steps h3#order_review_heading,
.iedm-steps h3.woocommerce-additional-fields__title,
.iedm-steps .woocommerce-additional-fields__title {
  display: none !important;
}

.iedm-steps .col2-set .col-1,
.iedm-steps .col2-set .col-2{
  float: none !important;
  width: 100% !important;
}

.woocommerce-billing-fields h3 {
  display: none !important;
}

.iedm-qty-locked{
  display:inline-block;
  min-width:34px;
  text-align:center;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  font-weight:700;
}


/* ===== Step indicator colors ===== */
.iedm-step-indicator span{
  opacity: 1; /* override old opacity behavior */
  color:#9aa3af; /* gris à venir */
  font-weight:400;
}
.iedm-step-indicator span.active{
  color:#2563eb; /* bleu actif */
  font-weight:400;
}
.iedm-step-indicator span.done{
  color:#80BA2A; /* vert terminé */
}

/* ===== Option cards: border + grayscale image ===== */
.iedm-card{
  border:2px solid #d1d5db;
}
.iedm-card__img img{
  filter: grayscale(1);
  opacity:.85;
  transition: filter .15s ease, opacity .15s ease;
}
.iedm-card.is-checked{
  border-color:#80BA2A;
}
.iedm-card.is-checked .iedm-card__img img{
  filter: grayscale(0);
  opacity:1;
}

/* multiselect (intérêts) */
.iedm-multiselect{
  width:100%;
  min-height:120px;
}


/* Enhanced selects (SelectWoo/Select2) */
.iedm-step3-fields .select2-container{width:100% !important;}
.iedm-step3-fields .select2-selection{min-height:44px; padding:6px 10px; border-radius:12px;}
.iedm-step3-fields .select2-selection__rendered{line-height:30px;}
.iedm-step3-fields .select2-selection__arrow{height:44px;}
/* Augmente le nombre d’items visibles dans les dropdown SelectWoo / Select2 */
.select2-container--default .select2-results > .select2-results__options,
.select2-container--woocommerce .select2-results > .select2-results__options{
  max-height: 520px; 
}

/* Bouton Suivant */
button.button.iedm-next {
    color: #fff;
    background: #0289F4;
    font-size: 20px;
    padding: 12px 28px;
    position: relative;
    float: right;
}

/* Flèche droite */
button.button.iedm-next::after {
    font-family: "ETmodules";
    content: "\34"; 
    font-size: 20px;
    margin-left: 10px;
    vertical-align: middle;
}


/* Bouton Retour */
button.button.iedm-back {
    color: #fff;
    background: #ADABAB;
    font-size: 20px;
    padding: 12px 28px;
    position: relative;
}

/* Flèche gauche */
button.button.iedm-back::before {
    font-family: "ETmodules";
    content: "\35"; 
    font-size: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

/* Supprimer flèche par défaut Divi */
button.button.iedm-back::after {
    display: none;
}


/* ===== Validation inline (sous le champ) ===== */
.iedm-field-error{
  margin-top:6px;
  font-size:13px;
  line-height:1.3;
  color:#b00020;
}

.iedm-has-error input,
.iedm-has-error select,
.iedm-has-error textarea{
  border-color:#b00020 !important;
  outline: none;
}

